:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --background: #0f172a;
    --surface: #1e293b;
    --surface-light: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #475569;
    --success: #10b981;
    --error: #ef4444;
    --shadow: rgba(0, 0, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    position: relative;
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem 0;
}

header h1 {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

footer {
    text-align: center;
    padding: 10px 0;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* Responsive */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    header h1 {
        font-size: 2rem;
    }
}

/* Search section */
.search-section {
    margin-bottom: 3rem;
    display: flex;
    gap: 1rem;
}

.search-section input {
    flex: 1;
    padding: 1.25rem 1.5rem;
    font-size: 1rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.search-section input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-section input::placeholder {
    color: var(--text-secondary);
}

.search-section button {
    background: linear-gradient(135deg, var(--primary-color), #ec4899);
    border: none;
    border-radius: 1rem;
    padding: 1rem 2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

.search-section button:hover {
    opacity: 0.85;
}

/* Beta badge */
.beta-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    color: #fff;
    padding: 0.15em 0.6em;
    border-radius: 0.4em;
    vertical-align: super;
    -webkit-text-fill-color: #fff;
    margin-left: 0.25rem;
}

/* Beta gate overlay */
.beta-gate {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: var(--background);
    display: flex;
    align-items: center;
    justify-content: center;
}

.beta-gate-dialog {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2.5rem;
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.beta-gate-dialog h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.beta-gate-dialog p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.beta-gate-dialog input {
    width: 100%;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.beta-gate-dialog input:focus {
    border-color: var(--primary-color);
}

.beta-gate-dialog button {
    width: 100%;
    padding: 0.85rem;
    font-size: 1rem;
    font-weight: 600;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.beta-gate-dialog button:hover {
    background: var(--primary-hover);
}

.beta-key-error {
    color: var(--error) !important;
    font-size: 0.875rem;
    margin-top: 0.75rem;
    margin-bottom: 0 !important;
    min-height: 1.2em;
}

/* Results area */
#results {
    margin-top: 1rem;
}

.results-loading {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-secondary);
}

.results-loading .loading-dots {
    display: inline-flex;
    gap: 4px;
    margin-bottom: 0.75rem;
}

.results-loading .loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.results-loading .loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.results-loading .loading-dots span:nth-child(2) { animation-delay: -0.16s; }

.results-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--error);
    color: var(--error);
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
}
