:root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-color: #ffffff;
    --accent-secondary: #e0e0e0;
    --accent-glow: rgba(255, 255, 255, 0.2);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.15);
    --font-main: 'Science Grotesque', sans-serif;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background: #000000;
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Musical Notes Floating Animation */
body::after {
    content: '♪ ♫ ♩ ♬';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    font-size: 2rem;
    color: #ffffff;
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    letter-spacing: 100px;
    animation: floatNotes 20s ease-in-out infinite;
}

@keyframes floatNotes {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

/* Background Ambient Glow */
.background-glow {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70vw;
    height: 70vw;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
    animation: pulse 4s ease-in-out infinite;
}

/* Spiral Logo Background */
.spiral-logo-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 1;
    overflow: hidden;
}

.spiral-logo-frame {
    width: 100%;
    height: 100%;
    border: none;
    background: transparent;
    filter: none;
}

@keyframes pulse {

    0%,
    100% {
        transform: translate(-50%, -50%) scale(0.9);
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.4;
    }

    50% {
        transform: translate(-50%, -50%) scale(1.1);
        opacity: 0.6;
    }
}

/* Strings Canvas */
#strings-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: auto;
    cursor: default;
}

/* Spiral Background SVG - Full brightness, no opacity - TESTING: z-index 999 */
#spiral-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999;
    pointer-events: none;
}

/* Hero Section */
.hero {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: column;
    text-align: center;
    padding: 3.125vh 20px 3.125vh;
    position: relative;
    z-index: 10;
    pointer-events: none;
}

.hero-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Heading Box */
.heading-box {
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 12;
    pointer-events: auto;
}

h1 {
    margin: 0;
    padding: 0;
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 0 40px rgba(255, 255, 255, 0.3);
}

h1 .text-gradient {
    background: linear-gradient(135deg, #ffffff, #d0d0d0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Scale Selector Dropdown */
.scale-selector {
    position: fixed;
    left: 50%;
    width: 25vw;
    height: 6.25vh;
    margin-left: -12.5vw;
    border: 1px solid rgb(255, 255, 255);
    background: transparent;
    color: rgb(255, 255, 255);
    font-family: 'Science Grotesque', monospace;
    font-size: 1rem;
    font-weight: 200;
    text-align: center;
    padding: 0 10px;
    cursor: pointer;
    z-index: 12;
    pointer-events: auto;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.scale-selector:focus {
    background: rgba(255, 255, 255, 0.1);
}

.scale-selector option {
    background: #000000;
    color: rgb(255, 255, 255);
    font-family: 'Science Grotesque', monospace;
}

/* Sound Selector Dropdown */
.sound-selector {
    position: fixed;
    left: 50%;
    width: 12.5vw;
    height: 3.125vh;
    margin-left: -6.25vw;
    border: 0.5px solid rgb(255, 255, 255);
    background: transparent;
    color: rgb(255, 255, 255);
    font-family: 'Science Grotesque', monospace;
    font-size: 0.5rem;
    font-weight: 100;
    text-align: center;
    padding: 0 10px;
    cursor: pointer;
    z-index: 12;
    pointer-events: auto;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.sound-selector:focus {
    background: rgba(255, 255, 255, 0.1);
}

.sound-selector option {
    background: #000000;
    color: rgb(255, 255, 255);
    font-family: 'Science Grotesque', monospace;
}

/* Download Button Box */
.btn-download {
    border: 1.25px solid var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400;
    /* Will be set closer to 250 by font-family if available */
    font-family: 'Science Grotesque', sans-serif;
    transition: all var(--transition-speed) ease;
    position: fixed;
    overflow: hidden;
    z-index: 12;
    pointer-events: auto;
}

.btn-download:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: none;
}

.btn-text {
    white-space: nowrap;
    letter-spacing: 2.5px;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg {
    width: 12px;
    height: 12px;
    transition: transform var(--transition-speed) ease;
}

.btn-download:hover .btn-icon svg {
    transform: translateY(2px);
}

/* Animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 1rem;
    }

    .heading-box {
        width: 50vw;
        height: 8vh;
    }

    .btn-download {
        width: 25vw;
        height: 4vh;
        font-size: 0.6rem;
    }

    .btn-icon svg {
        width: 10px;
        height: 10px;
    }

    .background-glow {
        width: 100vw;
        height: 100vw;
    }

    body::after {
        font-size: 1.5rem;
        letter-spacing: 50px;
    }
}

/* ========================================
   AUTHENTICATION & PAYMENT UI STYLES
   ======================================== */

/* Auth Container - Individual button positioning */
.auth-container {
    position: fixed;
    z-index: 1000;
    pointer-events: auto;
}

/* Sign In Button Container (Left Side) */
.sign-in-btn-container {
    position: fixed;
    z-index: 1000;
    pointer-events: auto;
}

/* Subscribe Button Container (Right Side) */
.subscribe-btn-container {
    position: fixed;
    z-index: 1000;
    pointer-events: auto;
}

/* Auth Buttons */
.auth-btn,
.subscribe-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    color: #ffffff;
    font-family: 'Science Grotesque', sans-serif;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.auth-btn:hover,
.subscribe-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
}

.subscribe-btn {
    background: rgba(255, 255, 255, 0.1);
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.8);
    color: #ffffff;
    font-family: 'Science Grotesque', sans-serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.user-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.user-email-short {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* User Dropdown */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 280px;
    background: rgba(0, 0, 0, 0.95);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dropdown-email {
    color: #ffffff;
    font-size: 14px;
    margin-bottom: 8px;
    word-break: break-all;
}

.dropdown-status {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    display: inline-block;
}

.dropdown-status.free {
    background: rgba(150, 150, 150, 0.2);
    color: #a0a0a0;
}

.dropdown-status.premium {
    background: rgba(100, 255, 100, 0.2);
    color: #90ff90;
}

.dropdown-expiry {
    font-size: 11px;
    color: #aaa;
    margin-top: 6px;
    font-style: italic;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: 'Science Grotesque', sans-serif;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.dropdown-item svg {
    width: 16px;
    height: 16px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 40px;
    max-width: 500px;
    width: 90%;
    z-index: 2001;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-content {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    color: #ff9090;
    transform: rotate(90deg);
}

.modal-content h2 {
    color: #ffffff;
    font-family: 'Science Grotesque', sans-serif;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

.modal-description {
    color: #a0a0a0;
    font-size: 14px;
    text-align: center;
    margin-bottom: 32px;
}

.modal-note {
    color: #707070;
    font-size: 12px;
    text-align: center;
    margin-top: 24px;
}

/* Auth Modal */
.auth-modal-content {
    max-width: 400px;
}

.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    background: #ffffff;
    border: none;
    color: #000000;
    font-family: 'Science Grotesque', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.google-signin-btn:hover {
    background: #f0f0f0;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.3);
}

/* Payment Modal */
.payment-modal-content {
    max-width: 800px;
}

.pricing-plans {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.plan-card {
    position: relative;
    padding: 32px 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plan-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.15);
}

.plan-card.featured {
    border-color: #90ff90;
    background: rgba(100, 255, 100, 0.05);
}

.plan-card.featured:hover {
    background: rgba(100, 255, 100, 0.1);
    box-shadow: 0 8px 30px rgba(100, 255, 100, 0.2);
}

.featured-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #90ff90;
    color: #000000;
    padding: 4px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.plan-card h3 {
    color: #ffffff;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.plan-price {
    color: #ffffff;
    font-size: 32px;
    font-weight: 700;
    margin: 16px 0;
}

.plan-description {
    color: #a0a0a0;
    font-size: 14px;
    margin-bottom: 24px;
}

.plan-btn {
    width: 100%;
    padding: 12px 24px;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    color: #ffffff;
    font-family: 'Science Grotesque', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plan-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

.plan-card.featured .plan-btn {
    border-color: #90ff90;
    color: #90ff90;
}

.plan-card.featured .plan-btn:hover {
    background: rgba(100, 255, 100, 0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        top: 16px;
        right: 16px;
        gap: 8px;
    }

    .auth-btn,
    .subscribe-btn,
    .user-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .user-email-short {
        max-width: 100px;
    }

    .user-dropdown {
        min-width: 240px;
    }

    .modal-content {
        padding: 24px;
        width: 95%;
    }

    .modal-content h2 {
        font-size: 22px;
    }

    .pricing-plans {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .plan-card {
        padding: 24px 16px;
    }

    .plan-price {
        font-size: 28px;
    }
}

/* ========================================
   PASSKEY AUTHENTICATION STYLES
   ======================================== */

.email-input {
    width: 100%;
    padding: 14px 18px;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Science Grotesque', sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
}

.email-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.08);
}

.email-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.passkey-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Science Grotesque', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.passkey-btn:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.passkey-btn:active {
    transform: translateY(0);
}

/* Email OAuth Button */
.email-oauth-btn {
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, rgba(100, 150, 255, 0.2), rgba(100, 150, 255, 0.1));
    border: 1.5px solid rgba(100, 150, 255, 0.4);
    border-radius: 8px;
    color: #ffffff;
    font-family: 'Science Grotesque', sans-serif;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.email-oauth-btn:hover {
    background: linear-gradient(135deg, rgba(100, 150, 255, 0.3), rgba(100, 150, 255, 0.2));
    border-color: rgba(100, 150, 255, 0.6);
    box-shadow: 0 0 20px rgba(100, 150, 255, 0.3);
    transform: translateY(-2px);
}

.email-oauth-btn:active {
    transform: translateY(0);
}

.modal-note a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-note a:hover {
    color: #ffffff;
}