:root {
    --primary-color: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --secondary-color: #e9d5ff;
    --secondary-light: #f3e8ff;
    --text-dark: #1f2937;
    --text-medium: #374151;
    --text-light: #6b7280;
    --bg-gradient-start: #e9d5ff;
    --bg-gradient-middle: #ffffff;
    --bg-gradient-end: #f3e8ff;
    --bg-gradient-accent1: #ddd6fe;
    --bg-gradient-accent2: #ede9fe;
    --bg-gradient-accent3: #f5f3ff;
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    width: 100%;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    color: var(--text-medium);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

.gradient-background {
    background-size: 300% 300%;
    background-image: 
        radial-gradient(
            at 0% 0%,
            var(--bg-gradient-accent1) 0%, 
            transparent 50%
        ),
        radial-gradient(
            at 100% 0%,
            var(--bg-gradient-start) 0%, 
            transparent 60%
        ),
        radial-gradient(
            at 100% 100%,
            var(--bg-gradient-accent2) 0%, 
            transparent 65%
        ),
        radial-gradient(
            at 0% 100%,
            var(--bg-gradient-accent3) 0%, 
            transparent 55%
        ),
        radial-gradient(
            at 50% 50%,
            var(--bg-gradient-middle) 0%, 
            var(--bg-gradient-end) 100%
        );
    animation: gradient-shift 20s ease infinite alternate;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
    width: 100%;
}

a {
    text-decoration: none;
}

@keyframes gradient-shift {
    0% { background-position: 0% 0%; }
    20% { background-position: 20% 20%; }
    40% { background-position: 60% 10%; }
    60% { background-position: 40% 50%; }
    80% { background-position: 10% 70%; }
    100% { background-position: 30% 30%; }
}

.sound-wave-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sound-wave {
    position: absolute;
    border-radius: 47% 53% 51% 49% / 48% 46% 54% 52%;
    transform-origin: center;
    opacity: 0.15;
    background: none;
    border-style: solid;
    will-change: transform, border-radius;
    transform: translateZ(0);
}

.wave1 {
    width: 120%;
    height: 120%;
    top: -10%;
    left: -10%;
    border: 2px solid var(--primary-light);
    animation: wave1 30s linear infinite;
}

.wave2 {
    width: 110%;
    height: 110%;
    top: -5%;
    left: -5%;
    border: 3px solid var(--primary-color);
    animation: wave2 35s linear infinite;
}

.wave3 {
    width: 130%;
    height: 130%;
    top: -15%;
    left: -15%;
    border: 2px solid var(--secondary-color);
    animation: wave3 40s linear infinite;
}

@keyframes wave1 {
    0% {
        transform: rotate(0deg) scale(1);
        border-radius: 47% 53% 51% 49% / 48% 46% 54% 52%;
    }
    50% {
        transform: rotate(180deg) scale(0.95);
        border-radius: 48% 52% 57% 43% / 54% 48% 52% 46%;
    }
    100% {
        transform: rotate(360deg) scale(1);
        border-radius: 47% 53% 51% 49% / 48% 46% 54% 52%;
    }
}

@keyframes wave2 {
    0% {
        transform: rotate(360deg) scale(1);
        border-radius: 53% 47% 46% 54% / 45% 53% 47% 55%;
    }
    50% {
        transform: rotate(180deg) scale(1.05);
        border-radius: 52% 48% 43% 57% / 51% 54% 46% 49%;
    }
    100% {
        transform: rotate(0deg) scale(1);
        border-radius: 53% 47% 46% 54% / 45% 53% 47% 55%;
    }
}

@keyframes wave3 {
    0% {
        transform: rotate(180deg) scale(0.95);
        border-radius: 48% 52% 57% 43% / 54% 48% 52% 46%;
    }
    50% {
        transform: rotate(0deg) scale(1);
        border-radius: 47% 53% 51% 49% / 48% 46% 54% 52%;
    }
    100% {
        transform: rotate(-180deg) scale(0.95);
        border-radius: 48% 52% 57% 43% / 54% 48% 52% 46%;
    }
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: all var(--transition-speed) ease;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo span {
    color: var(--primary-color);
}

.desktop-nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    background: none;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    color: var(--text-medium);
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-btn:hover {
    background: var(--secondary-light);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.nav-btn.active {
    background: var(--secondary-light);
    color: var(--primary-dark);
}

.nav-btn.login-trigger,
.nav-btn[href="/dashboard"],
.nav-btn[href^="https://accounts.google.com"] {
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.2);
}

.nav-btn.login-trigger:hover,
.nav-btn[href="/dashboard"]:hover,
.nav-btn[href^="https://accounts.google.com"]:hover {
    background: var(--primary-dark);
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    cursor: pointer;
    position: relative;
    z-index: 1001;
    margin-left: auto;
}

.mobile-menu-btn span {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--primary-color);
    transition: all 0.3s ease;
    border-radius: 4px;
    position: relative;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 20px;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    z-index: 999;
    transform: translateY(-120%);
    transition: transform 0.4s ease;
    margin-top: 0;
}

.mobile-nav.open {
    transform: translateY(0);
}

.mobile-nav .nav-btn {
    width: 100%;
    max-width: 200px;
    text-align: center;
    display: block;
    margin: 0 auto;
    padding: 10px 16px;
}

.mobile-nav .nav-btn[href="/dashboard"],
.mobile-nav .nav-btn[href^="https://accounts.google.com"] {
    width: 100%;
    max-width: 180px;
    margin: 0 auto;
    text-align: center;
    padding: 10px 16px;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    height: 70px;
}

.header.scrolled + .mobile-nav,
header.scrolled ~ .mobile-nav {
    top: 70px;
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    padding: 12px 28px;
    border-radius: 30px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: none;
    outline: none;
}

.btn.primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
    position: relative;
}

.btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
}

.btn.secondary {
    background: transparent;
    color: var(--text-medium);
    border: 2px solid var(--primary-light);
}

.btn.secondary:hover {
    background: var(--secondary-light);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-dark);
    margin-bottom: 60px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

.footer {
    background: var(--text-dark);
    color: white;
    padding: 80px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.footer-logo span {
    color: var(--primary-light);
}

.footer-links {
    display: flex;
    justify-content: space-between;
}

.link-group h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--secondary-light);
}

.link-group a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.link-group a:hover {
    color: white;
}

.footer-social {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

.footer-social a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.login-modal-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.login-modal {
    background: rgba(255, 255, 255, 0.95);
    padding: 2.5rem;
    border-radius: 24px;
    position: relative;
    width: 90%;
    max-width: 520px;
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(139, 92, 246, 0.05),
        0 0 20px rgba(139, 92, 246, 0.1),
        0 10px 30px -10px rgba(2, 1, 1, 0.1);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.login-modal-overlay.visible .login-modal {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.login-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-light);
    padding: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-dark);
    transform: rotate(90deg);
}

.login-modal-content {
    text-align: center;
}

.modal-youtube-icon {
    font-size: 3.5rem;
    color: #ff0000;
    margin-bottom: 1.5rem;
    display: block;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

.login-modal-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, var(--text-dark) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.modal-description {
    margin-bottom: 2rem;
}

.modal-description p {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.modal-description .login-subtext {
    font-size: 0.95rem;
    color: var(--text-light);
    opacity: 0.85;
    font-style: italic;
}

.youtube-login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #ff0000;
    color: white;
    padding: 16px 24px;
    min-height: 52px;
    line-height: 1;
    box-sizing: border-box;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 4px 15px rgba(255, 0, 0, 0.2),
        0 0 0 1px rgba(255, 0, 0, 0.1);
    transform: translateY(0);
    width: 100%;
    max-width: 300px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.youtube-login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.youtube-login-btn:hover {
    background: #cc0000;
    transform: translateY(-3px);
    box-shadow: 
        0 6px 20px rgba(255, 0, 0, 0.3),
        0 0 0 1px rgba(255, 0, 0, 0.15);
}

.youtube-login-btn:hover::before {
    opacity: 1;
}

.youtube-login-btn:active {
    transform: translateY(-1px);
}

.youtube-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.modal-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.modal-footer p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.modal-footer a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

.modal-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .login-modal {
        padding: 2rem;
        border-radius: 20px;
        max-width: 100%;
    }

    .modal-youtube-icon {
        font-size: 2.8rem;
        margin-bottom: 1.25rem;
    }

    .login-modal-content h2 {
        font-size: 1.6rem;
    }

    .modal-description p {
        font-size: 1rem;
    }

    .youtube-login-btn {
        padding: 14px 20px;
        min-height: 48px;
        font-size: 1rem;
    }

    .modal-icon svg {
        width: 40px;
        height: 40px;
    }
}

.fade-in {
    animation: fadeIn 1s ease forwards;
}

.slide-up {
    animation: slideUp 0.8s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-logo {
        text-align: center;
        margin-bottom: 10px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
        width: 100%;
    }
    
    .link-group {
        width: 100%;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-nav {
        display: flex;
    }

    .section-title {
        font-size: 2rem;
    }

    .container {
        padding: 0 20px;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .footer {
        padding: 60px 0 30px;
    }
    
    .footer-content {
        gap: 30px;
    }
    
    .link-group h4 {
        margin-bottom: 15px;
    }
    
    .link-group a {
        margin-bottom: 8px;
    }
    
    .footer-social {
        gap: 20px;
    }
    
    .footer-social a {
        width: 45px;
        height: 45px;
    }

    .wave1, .wave2, .wave3 {
        animation-duration: 30s;
        opacity: 0.12;
    }
    
    .wave3 {
        display: none;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 40px;
    }
    
    .btn {
        padding: 10px 16px;
    }
    
    .footer {
        padding: 60px 0 30px;
    }
    
    .footer-logo h2 {
        font-size: 1.6rem;
    }
    
    .link-group h4 {
        font-size: 1.1rem;
    }
    
    .link-group a {
        font-size: 0.95rem;
    }
    
    .footer-bottom {
        font-size: 0.85rem;
    }
}

@media (hover: none) {
    .nav-btn:active {
        background: var(--secondary-light);
        color: var(--primary-dark);
    }
    
    .btn.primary:active {
        background: var(--primary-dark);
        transform: translateY(-1px);
    }
    
    .btn.secondary:active {
        background: var(--secondary-light);
        color: var(--primary-dark);
        transform: translateY(-1px);
    }
    
    .footer-social a:active {
        background: var(--primary-color);
    }
}

@supports (-webkit-touch-callout: none) {
    .hero {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
    
    .app-container {
        min-height: 100vh;
        min-height: -webkit-fill-available;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sound-wave {
        animation: none !important;
        opacity: 0.08;
    }

    .fade-in,
    .slide-up {
        animation: none !important;
        opacity: 1;
        transform: none;
    }
}