:root {
    --bg-primary: #0a0a0b;
    --bg-secondary: #111113;
    --bg-card: #161618;
    --bg-input: #1c1c1f;
    --text-primary: #f5f5f7;
    --text-secondary: #8e8e93;
    --text-muted: #636366;
    --accent: #00ff88;
    --accent-glow: rgba(0, 255, 136, 0.3);
    --accent-secondary: #ff3366;
    --border: rgba(255, 255, 255, 0.08);
    --border-focus: rgba(0, 255, 136, 0.5);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    --font-display: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --premium-gold: #ffd700;
    --premium-glow: rgba(255, 215, 0, 0.3);
}

[data-theme="light"] {
    --bg-primary: #fafaf9;
    --bg-secondary: #f5f5f4;
    --bg-card: #ffffff;
    --bg-input: #f0f0ef;
    --text-primary: #0a0a0b;
    --text-secondary: #52525b;
    --text-muted: #a1a1aa;
    --accent: #00cc6a;
    --accent-glow: rgba(0, 204, 106, 0.2);
    --border: rgba(0, 0, 0, 0.08);
    --border-focus: rgba(0, 204, 106, 0.5);
    --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-display);
    background: var(--bg-primary);
    color: var(--text-primary);
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.noise {
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.gradient-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent);
    top: -200px;
    right: -200px;
    animation: float 20s ease-in-out infinite;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--accent-secondary);
    bottom: -150px;
    left: -150px;
    animation: float 25s ease-in-out infinite reverse;
}

[data-theme="light"] .gradient-orb {
    opacity: 0.15;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -30px) scale(1.05);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.95);
    }
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
    gap: 1rem;
}

.social-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.social-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.1);
}

.install-buttons {
    display: flex;
    gap: 0.5rem;
}

.install-btn {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--accent);
    border: none;
    border-radius: 8px;
    color: var(--bg-primary);
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.install-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px var(--accent-glow);
}

.install-btn.ios-install {
    background: linear-gradient(135deg, #007AFF, #5856D6);
}

.install-btn.android-install {
    background: linear-gradient(135deg, #34A853, #4285F4);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.5rem;
    border-radius: 12px;
    transform: rotate(-3deg);
    transition: transform 0.3s ease;
}

.logo:hover .logo-icon {
    transform: rotate(3deg) scale(1.05);
}

.logo-text {
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.nav-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.premium-btn {
    display: none;
    /* Hidden until user base grows */
    width: 44px;
    height: 44px;
    /*display: flex;*/
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--premium-gold), #ffaa00);
    border: none;
    border-radius: 12px;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: premiumPulse 2s ease-in-out infinite;
}

.premium-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px var(--premium-glow);
}

@keyframes premiumPulse {

    0%,
    100% {
        box-shadow: 0 0 10px var(--premium-glow);
    }

    50% {
        box-shadow: 0 0 20px var(--premium-glow);
    }
}

.language-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-btn:hover {
    border-color: var(--accent);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 140px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 100;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown button {
    width: 100%;
    padding: 0.625rem 0.875rem;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.875rem;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.lang-dropdown button:hover {
    background: var(--bg-input);
}

.theme-toggle {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
}

[data-theme="light"] .sun-icon {
    display: block;
}

[data-theme="light"] .moon-icon {
    display: none;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 2rem 1rem;
    position: relative;
    z-index: 5;
    min-height: 0;
}

.hero-text {
    text-align: center;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease-out;
}

.title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.boxes-container {
    display: flex;
    align-items: stretch;
    gap: 1.5rem;
    width: 100%;
    max-width: 900px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.box {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.box:hover {
    border-color: var(--border-focus);
    box-shadow: var(--shadow), 0 0 40px var(--accent-glow);
}

.box-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.box-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--accent);
    text-transform: uppercase;
}

.box-decoration {
    width: 40px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 2px;
}

.code-display {
    display: flex;
    justify-content: center;
    gap: 0.375rem;
    perspective: 500px;
    margin-bottom: 0.75rem;
}

.copy-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 0.75rem;
}

.copy-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.copy-btn.copied {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-glow);
}

.code-char {
    width: 38px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: var(--font-mono);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--accent);
    transition: all 0.3s ease;
}

.code-char.flip {
    animation: flipChar 0.4s ease-out;
}

@keyframes flipChar {
    0% {
        transform: rotateX(0deg);
    }

    50% {
        transform: rotateX(90deg);
    }

    100% {
        transform: rotateX(0deg);
    }
}

.generate-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-family: var(--font-display);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1.25rem;
}

.generate-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    border-style: solid;
}

.generate-btn:hover svg {
    animation: spin 0.5s ease;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.secret-section {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.secret-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.secret-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.9375rem;
    line-height: 1.4;
    outline: none;
    transition: all 0.2s ease;
}

.secret-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.secret-input::placeholder {
    color: var(--text-muted);
}

.start-chat-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    border: none;
    border-radius: 12px;
    color: var(--bg-primary);
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.25rem;
}

.start-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.5rem;
}

.divider-text {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.join-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.join-input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: var(--font-display);
    font-size: 0.9375rem;
    line-height: 1.4;
    outline: none;
    transition: all 0.2s ease;
}

.join-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.join-input::placeholder {
    color: var(--text-muted);
}

.code-input {
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
    background: var(--bg-primary);
    padding: 1rem;
}

.join-btn {
    width: 100%;
    padding: 1rem;
    background: transparent;
    border: 2px solid var(--accent);
    border-radius: 12px;
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 0.5rem;
}

.join-btn:hover {
    background: var(--accent);
    color: var(--bg-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    position: relative;
    z-index: 5;
    flex-shrink: 0;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-dot {
    width: 4px;
    height: 4px;
    background: var(--text-muted);
    border-radius: 50%;
}

.copyright {
    font-size: 0.75rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .header {
        padding: 1rem 1.25rem;
    }

    .main-content {
        padding: 1rem 1.25rem;
    }

    .boxes-container {
        flex-direction: column;
        gap: 1rem;
    }

    .divider {
        padding: 0.5rem 0;
    }

    .box {
        padding: 1.5rem;
    }

    .code-char {
        width: 34px;
        height: 46px;
        font-size: 1.25rem;
    }

    .hero-text {
        margin-bottom: 2rem;
    }

    .title {
        font-size: 1.75rem;
    }

    .subtitle {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none;
    }

    .code-char {
        width: 30px;
        height: 42px;
        font-size: 1.125rem;
        gap: 0.25rem;
    }

    .code-display {
        gap: 0.25rem;
    }
}