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

body {
    font-family: 'Livvic', sans-serif;
    overflow: hidden;
    width: 100vw;
    height: 100vh;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: white;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.loading-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loader-text {
    font-family: 'Livvic', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #1e293b;
    animation: pulse 1.5s infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Main Container */
.app-container {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    position: relative;
}

/* LEFT SIDE */
.left-side {
    width: 35%;
    position: relative;
    overflow: hidden;
    transition: all 700ms;
}

/* Gradient Backgrounds */
.left-side.planner {
    background: linear-gradient(to bottom right, #dbeafe, #bfdbfe, #bfdbfe);
}

.left-side.study {
    background: linear-gradient(to bottom right, #3b82f6, #2563eb, #1d4ed8);
}

.left-side.practice {
    background: linear-gradient(to bottom right, #1e40af, #1e3a8a, #0f172a);
}

/* Decorative Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    transition: background-color 700ms;
}

.blob-1 {
    top: 80px;
    left: 40px;
    width: 128px;
    height: 128px;
}

.blob-2 {
    bottom: 80px;
    right: 40px;
    width: 160px;
    height: 160px;
}

.blob-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 192px;
    height: 192px;
}

.blob-1.planner { background-color: rgba(147, 197, 253, 0.3); }
.blob-2.planner { background-color: rgba(147, 197, 253, 0.25); }
.blob-3.planner { background-color: rgba(147, 197, 253, 0.2); }

.blob-1.study { background-color: rgba(96, 165, 250, 0.3); }
.blob-2.study { background-color: rgba(96, 165, 250, 0.25); }
.blob-3.study { background-color: rgba(96, 165, 250, 0.2); }

.blob-1.practice { background-color: rgba(37, 99, 235, 0.3); }
.blob-2.practice { background-color: rgba(37, 99, 235, 0.25); }
.blob-3.practice { background-color: rgba(37, 99, 235, 0.2); }

/* Left Content */
.left-content {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px;
}

/* Icon Center */
.icon-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-perspective {
    position: relative;
    perspective: 1000px;
}

.icon-3d-container {
    transform-style: preserve-3d;
    transition: all 700ms;
    animation: float 6s ease-in-out infinite;
}

.icon-card {
    width: 192px;
    height: 192px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(40px);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transform-style: preserve-3d;
}

/* Glow Effect */
.icon-glow {
    position: absolute;
    inset: 0;
    border-radius: 24px;
    transition: background 700ms;
}

.icon-glow.planner {
    background: linear-gradient(to bottom right, rgba(191, 219, 254, 0.4), transparent);
}

.icon-glow.study {
    background: linear-gradient(to bottom right, rgba(147, 197, 253, 0.4), transparent);
}

.icon-glow.practice {
    background: linear-gradient(to bottom right, rgba(96, 165, 250, 0.4), transparent);
}

/* Icon Wrapper */
.icon-wrapper {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: scale(1);
    transition: transform 300ms, background-color 700ms;
    perspective: 1000px; /* Enable 3D space for children */
}

/* Base class for the SVG icon within the wrapper to be flippable */
.icon {
    width: 48px;
    height: 48px;
    color: white;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
    transform-style: preserve-3d;
}

/* Flip animation class to be toggled in JS */
.icon.flip-active {
    transform: rotateY(180deg);
}

.icon-wrapper:hover {
    transform: scale(1.1);
}

.icon-wrapper.planner { background-color: #60a5fa; }
.icon-wrapper.study { background-color: #2563eb; }
.icon-wrapper.practice { background-color: #1e3a8a; }

/* Right side content animations */
.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out forwards;
}

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

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


/* Corner Accents */
.accent {
    position: absolute;
    border-radius: 50%;
    transition: background-color 700ms;
}

.accent-1 {
    top: 12px;
    right: 12px;
    width: 8px;
    height: 8px;
}

.accent-2 {
    bottom: 16px;
    left: 16px;
    width: 6px;
    height: 6px;
}

.accent-1.planner { background-color: rgba(147, 197, 253, 0.4); }
.accent-2.planner { background-color: rgba(147, 197, 253, 0.3); }

.accent-1.study { background-color: rgba(96, 165, 250, 0.4); }
.accent-2.study { background-color: rgba(96, 165, 250, 0.3); }

.accent-1.practice { background-color: rgba(37, 99, 235, 0.4); }
.accent-2.practice { background-color: rgba(37, 99, 235, 0.3); }

/* Icon Shadow */
.icon-shadow {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 32px);
    width: 144px;
    height: 24px;
    background: rgba(0, 0, 0, 0.1);
    filter: blur(20px);
    border-radius: 50%;
}

/* App Name Section */
.app-name-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.app-name {
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.025em;
    transition: color 700ms;
}

.app-name.planner { color: #1e293b; }
.app-name.study { color: white; }
.app-name.practice { color: white; }

/* App Indicators */
.app-indicators {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}

.indicator {
    height: 4px;
    border-radius: 9999px;
    transition: all 300ms;
    border: none;
    cursor: pointer;
    padding: 0;
}

.indicator.inactive {
    width: 4px;
}

.indicator.active {
    width: 24px;
}

.indicator.planner { background-color: #1e293b; }
.indicator.planner.inactive { background-color: rgba(30, 41, 59, 0.4); }

.indicator.study { background-color: white; }
.indicator.study.inactive { background-color: rgba(255, 255, 255, 0.4); }

.indicator.practice { background-color: white; }
.indicator.practice.inactive { background-color: rgba(255, 255, 255, 0.4); }

/* RIGHT SIDE */
.right-side {
    width: 65%;
    background: white;
    padding: 32px;
    display: flex;
    align-items: center;
}

.right-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Navigation Header */
.nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    background-color: #f1f5f9;
    padding: 6px 12px;
    border-radius: 9999px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-dot.live {
    background-color: #22c55e;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.status-dot.coming-soon {
    background-color: #f97316;
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #f1f5f9;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 200ms;
}

.nav-btn:hover {
    background-color: #e2e8f0;
    transform: scale(1.1);
}

.nav-icon {
    width: 16px;
    height: 16px;
    color: #475569;
}

.nav-btn:hover .nav-icon {
    color: #1e293b;
}

/* Title Section */
.title-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.main-title {
    font-size: 30px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.25;
}

.subtitle {
    font-size: 16px;
    font-weight: 600;
    color: #475569;
}

.description {
    font-size: 14px;
    color: #475569;
    line-height: 1.625;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-card {
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    border: 1px solid #f1f5f9;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.stat-label {
    font-size: 12px;
    color: #475569;
    margin-top: 2px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    transition: border-color 200ms;
}

.feature-card:hover {
    border-color: #cbd5e1;
}

.feature-content {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.feature-icon-wrapper {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background-color 700ms;
}

.feature-icon-wrapper.planner { background-color: #60a5fa; }
.feature-icon-wrapper.study { background-color: #2563eb; }
.feature-icon-wrapper.practice { background-color: #1e3a8a; }

.feature-icon {
    width: 16px;
    height: 16px;
    color: white;
}

.feature-text {
    flex: 1;
    min-width: 0;
}

.feature-title {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.feature-description {
    font-size: 12px;
    color: #475569;
    line-height: 1.4;
}

/* CTA Section */
.cta-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cta-button {
    width: 100%;
    padding: 14px 24px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    font-size: 16px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 300ms;
}

.cta-button.planner {
    background: linear-gradient(to right, #60a5fa, #3b82f6);
}

.cta-button.study {
    background: linear-gradient(to right, #2563eb, #1d4ed8);
}

.cta-button.practice {
    background: linear-gradient(to right, #1e40af, #1e3a8a);
}

.cta-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.cta-button.planner:hover {
    box-shadow: 0 20px 25px -5px rgba(96, 165, 250, 0.3);
}

.cta-button.study:hover {
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.3);
}

.cta-button.practice:hover {
    box-shadow: 0 20px 25px -5px rgba(30, 64, 175, 0.3);
}

.cta-arrow {
    width: 20px;
    height: 20px;
    transition: transform 300ms;
}

.cta-button:hover .cta-arrow {
    transform: translateX(4px);
}

.cta-subtext {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 12px;
    color: #475569;
}

.cta-benefit {
    display: flex;
    align-items: center;
    gap: 4px;
}

.check-icon {
    width: 14px;
    height: 14px;
    color: #16a34a;
}

.benefit-separator {
    width: 4px;
    height: 4px;
    background-color: #94a3b8;
    border-radius: 50%;
}

/* Logo */
.brand-logo {
    position: fixed;
    top: 24px;
    left: 32px;
    z-index: 1000;
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 8px;
}

.brand-logo .logo-text {
    font-family: 'Livvic', sans-serif;
    font-weight: 700;
    font-size: 24px;
    letter-spacing: -0.025em;
    /* Blue gradient like planner logo */
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.brand-logo .logo-text.white-mode {
    background: none;
    -webkit-text-fill-color: white;
    color: white;
}

.brand-logo .beta-badge {
    background: #eff6ff;
    color: #3b82f6;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 99px;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.brand-logo .beta-badge.white-mode {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Dropdown */
.dropdown-container {
    position: fixed;
    top: 24px;
    right: 32px;
    z-index: 1000;
}

.dropdown-button {
    width: 44px;
    height: 44px;
    background-color: #0f172a;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 200ms;
}

.dropdown-button:hover {
    background-color: #1e293b;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

.chevron-icon {
    width: 20px;
    height: 20px;
    transition: transform 200ms;
}

.chevron-icon.open {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 8px 0;
    min-width: 160px;
    border: 1px solid #e2e8f0;
}

.dropdown-section-header {
    padding: 8px 12px;
    border-bottom: 1px solid #e2e8f0;
}

.dropdown-section-border {
    border-top: 1px solid #e2e8f0;
    margin-top: 4px;
}

.dropdown-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #0f172a;
}

.dropdown-item {
    display: block;
    padding: 8px 16px;
    font-size: 14px;
    color: #334155;
    text-decoration: none;
    transition: background-color 200ms;
}

.dropdown-item:hover {
    background-color: #f8fafc;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsive Design - Mobile Friendly */
@media screen and (max-width: 900px) {
    body {
        overflow-y: auto; /* Enable vertical scrolling */
        height: auto;
    }

    .app-container {
        flex-direction: column;
        height: auto;
        overflow: visible;
        display: flex;
    }

    /* Ensure elements stack correctly */
    .left-side {
        width: 100%;
        height: 60vh; /* Hero section height */
        min-height: 420px;
        border-bottom-left-radius: 32px;
        border-bottom-right-radius: 32px;
        z-index: 1; /* Behind right side overlap */
        padding: 24px;
    }
    
    .left-content {
        padding-top: 60px; /* Space for top bar */
        align-items: center;
    }
    
    .app-name-section {
        align-items: center;
        text-align: center;
    }

    .icon-card {
        width: 150px;
        height: 150px;
    }
    
    .icon-wrapper {
        width: 70px;
        height: 70px;
    }

    /* Content Section */
    .right-side {
        width: 100%;
        margin-top: -40px; /* Overlap effect */
        border-top-left-radius: 32px;
        border-top-right-radius: 32px;
        padding: 32px 24px;
        z-index: 10;
        position: relative;
        background: white;
        box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
    }
    
    /* Stats and Grids */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    
    .features-grid {
        grid-template-columns: 1fr; /* Stack features vertical */
    }
    
    /* Navigation Header */
    .nav-header {
        margin-bottom: 24px;
    }

    .main-title {
        font-size: 26px;
    }
    
    /* Fix Navigation Buttons/Logo for Scroll */
    .brand-logo {
        position: absolute; /* Scroll with page */
        top: 20px;
        left: 20px;
    }
    
    .dropdown-container {
        position: absolute; /* Scroll with page */
        top: 20px;
        right: 20px;
    }

    /* Reorder content for mobile to move CTA button higher */
    .right-content {
        display: flex;
        flex-direction: column;
    }
    
    .nav-header { order: 1; }
    .title-section { order: 2; margin-bottom: 24px; }
    .cta-section { order: 3; margin-bottom: 24px; margin-top: 12px; }
    .stats-grid { order: 4; }
    .features-grid { order: 5; }
    
    /* Hide decorative blobs that might overflow or look weird */
    .blob {
        opacity: 0.6;
    }
}

@media screen and (max-width: 480px) {
    .left-side {
        height: 55vh;
        min-height: 380px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr; /* Stack stats on very small screens */
    }
    
    .stat-card {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 12px 16px;
        text-align: left;
    }
    
    .stat-label {
        margin-top: 0;
    }
    
    .main-title {
        font-size: 24px;
    }
    
    .subtitle {
        font-size: 15px;
    }
}

