/* CSS Variables - Color Palette */
:root {
    /* Primary Colors */
    --deep-night: #1A1A2E;
    --dark-purple: #2C2C40;
    --muted-purple: #3A3A5A;
    
    /* Accent Colors */
    --vibrant-violet: #6E40B0;
    --soft-lavender: #A07ED9;
    --crown-gold: #FFD700;
    
    /* Text Colors */
    --white: #FFFFFF;
    --light-gray: #CCCCCC;
    --gray: #888888;
    
    /* Status Colors */
    --success: #4CAF50;
    --warning: #FFC107;
    --error: #F44336;
    
    /* Sleep Quality Colors */
    --good-sleep: #4CAF50;
    --average-sleep: #FFC107;
    --poor-sleep: #F44336;
    
    /* Sleep Phase Colors */
    --rem-sleep: #535CE1;
    --deep-sleep: #323A9E;
    --light-sleep: #6BB6FF;
    --awake-sleep: #8E8E93;
    
    /* Typography */
    --font-family: 'Poppins', sans-serif;
    
    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-xxl: 64px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background-color: var(--deep-night);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    letter-spacing: -1px;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.5px;
}

h3 {
    font-size: 1.5rem;
    letter-spacing: -0.2px;
}

h4 {
    font-size: 1.25rem;
}

p {
    font-size: 1rem;
    color: var(--light-gray);
    font-weight: 400;
}

/* App Store Buttons */
.app-store-buttons {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: center;
}

.app-store-btn {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: var(--white);
    color: var(--deep-night);
    padding: 16px 32px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 800;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--white);
    min-width: 220px;
    position: relative;
    overflow: hidden;
}

.app-store-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.app-store-btn:hover::before {
    left: 100%;
}

.app-store-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    background: #ffffff;
    border-color: #e0e0e0;
}

.app-store-btn:active {
    transform: translateY(-1px) scale(0.98);
}

.app-store-btn i {
    font-size: 2rem;
    color: var(--vibrant-violet);
    transition: transform 0.3s ease;
}

.app-store-btn:hover i {
    transform: scale(1.1) rotate(5deg);
}

.store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.small-text {
    font-size: 0.75rem;
    color: #666666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 2px;
}

.large-text {
    font-size: 1.25rem;
    color: var(--deep-night);
    font-weight: 900;
    letter-spacing: 0.5px;
}

/* Enhanced mobile styling for app store buttons */
@media (max-width: 768px) {
    .app-store-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }
    
    .app-store-btn {
        min-width: 280px;
        padding: 18px 36px;
        font-size: 1.1rem;
    }
    
    .large-text {
        font-size: 1.375rem;
    }
}

/* Additional hover effects for better visibility */
.app-store-btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(110, 64, 176, 0.3);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--vibrant-violet), var(--soft-lavender));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--vibrant-violet);
}

.btn-secondary:hover {
    background: var(--vibrant-violet);
    color: var(--white);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--light-gray);
    border: 1px solid var(--muted-purple);
}

.btn-ghost:hover {
    background: var(--muted-purple);
    color: var(--white);
    border-color: var(--muted-purple);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--deep-night);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid var(--muted-purple);
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

.app-icon-placeholder {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--vibrant-violet), var(--soft-lavender));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

.app-icon-placeholder span {
    transform: rotate(-10deg);
}

.logo i {
    font-size: 1.25rem;
    color: var(--vibrant-violet);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--light-gray);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--white);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--vibrant-violet);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, var(--dark-purple), var(--deep-night));
    z-index: -1;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--white), var(--light-gray));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--light-gray);
}

.hero-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--vibrant-violet);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Phone Mockup */
.phone-mockup {
    position: relative;
    width: 300px;
    height: 600px;
    background: var(--dark-purple);
    border-radius: 30px;
    border: 8px solid #000;
    box-shadow: var(--shadow-lg);
    margin: 0 auto;
    overflow: hidden;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--deep-night), var(--dark-purple));
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.sleep-score-widget {
    text-align: center;
}

.score-circle {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: conic-gradient(var(--vibrant-violet) 0% 85%, var(--muted-purple) 85% 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
    box-shadow: var(--shadow-md);
}

.score-circle::before {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--deep-night);
    z-index: 1;
}

.score-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
    z-index: 2;
}

.score-label {
    font-size: 0.875rem;
    color: var(--light-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}

.sleep-phases {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
}

.phase {
    background: var(--muted-purple);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s ease;
}

.phase:hover {
    transform: translateY(-2px);
    background: var(--dark-purple);
}

.phase span:first-child {
    display: block;
    font-size: 0.875rem;
    color: var(--light-gray);
    margin-bottom: 0.5rem;
}

.phase span:last-child {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
}

/* Sections */
section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--white), var(--light-gray));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--light-gray);
}

/* Features Section */
.features {
    background: linear-gradient(180deg, var(--deep-night), var(--dark-purple));
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--dark-purple);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--muted-purple);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--vibrant-violet);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--vibrant-violet), var(--soft-lavender));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.5rem;
    color: var(--white);
}

.feature-card h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature-card p {
    color: var(--light-gray);
}

/* How It Works Section */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step {
    background: var(--dark-purple);
    padding: 2rem;
    border-radius: 16px;
    border-left: 4px solid var(--vibrant-violet);
    position: relative;
    transition: all 0.3s ease;
}

.step:hover {
    transform: translateX(10px);
    background: var(--muted-purple);
}

.step-number {
    position: absolute;
    top: -15px;
    left: -15px;
    width: 40px;
    height: 40px;
    background: var(--vibrant-violet);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    box-shadow: var(--shadow-sm);
}

.step-content h3 {
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.step-content p {
    color: var(--light-gray);
}

/* Premium Section */
.premium {
    background: linear-gradient(180deg, var(--dark-purple), var(--deep-night));
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--dark-purple);
    border: 1px solid var(--muted-purple);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pricing-card:hover {
    transform: translateY(-5px);
    border-color: var(--vibrant-violet);
    box-shadow: var(--shadow-lg);
}

.pricing-card.premium {
    border-color: var(--crown-gold);
    background: linear-gradient(180deg, var(--dark-purple), #252535);
}

.pricing-card.premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--crown-gold), var(--vibrant-violet));
}

.card-header {
    margin-bottom: 2rem;
}

.card-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--light-gray);
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--white);
}

.currency {
    font-size: 1.5rem;
    margin-right: 5px;
}

.period {
    font-size: 1rem;
    color: var(--light-gray);
    font-weight: 400;
}

.badge {
    display: inline-block;
    background: var(--crown-gold);
    color: var(--deep-night);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 1rem;
}

.features-list {
    list-style: none;
    margin-bottom: 2rem;
    text-align: left;
}

.features-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--muted-purple);
    color: var(--light-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.features-list li:last-child {
    border-bottom: none;
}

.features-list li i {
    color: var(--vibrant-violet);
    font-size: 0.875rem;
}

/* Testimonials Section */
.testimonials {
    background: linear-gradient(180deg, var(--deep-night), var(--dark-purple));
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.testimonial-card {
    background: var(--dark-purple);
    padding: 2rem;
    border-radius: 16px;
    border: 1px solid var(--muted-purple);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    border-color: var(--vibrant-violet);
    box-shadow: var(--shadow-md);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--vibrant-violet), var(--soft-lavender));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--white);
}

.user-info h4 {
    margin-bottom: 0.25rem;
    font-size: 1.125rem;
}

.rating {
    color: var(--crown-gold);
    font-size: 0.875rem;
}

.testimonial-text {
    font-style: italic;
    color: var(--light-gray);
    line-height: 1.8;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, var(--vibrant-violet), var(--soft-lavender));
    text-align: center;
    color: var(--white);
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Footer */
.footer {
    background: var(--deep-night);
    border-top: 1px solid var(--muted-purple);
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    color: var(--white);
}

.footer-section p {
    margin-bottom: 1.5rem;
    color: var(--light-gray);
}

.footer-section ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.footer-section ul li a {
    color: var(--light-gray);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--vibrant-violet);
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--dark-purple);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--vibrant-violet);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--muted-purple);
    color: var(--gray);
}

/* Responsive Design */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .phone-mockup {
        width: 250px;
        height: 500px;
    }
    
    .score-circle {
        width: 140px;
        height: 140px;
    }
    
    .score-value {
        font-size: 2rem;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .nav-links {
        display: none;
    }
}

@media (max-width: 600px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
}