/* ===================================================
   GLOBAL STYLES & RESET
   =================================================== */

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

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8faff;
    --text-primary: #000000;
    --text-secondary: #666666;
    --border-color: rgba(37, 99, 235, 0.15);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(37, 99, 235, 0.2);
    --shadow: 0 8px 32px rgba(37, 99, 235, 0.12);
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #0a0e1a;
        --text-primary: #ffffff;
        --text-secondary: #999999;
        --border-color: rgba(59, 130, 246, 0.2);
        --glass-bg: rgba(0, 0, 0, 0.7);
        --glass-border: rgba(59, 130, 246, 0.25);
        --shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
        --accent: #3b82f6;
        --accent-hover: #60a5fa;
    }
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

/* ===================================================
   ANIMATED BACKGROUND
   =================================================== */

.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, #0a1628 0%, #1a2f4a 50%, #0d1b2a 100%);
    overflow: hidden;
    transition: background 0.3s ease;
}

@media (prefers-color-scheme: light) {
    .background {
        background: linear-gradient(135deg, #f0f9ff 0%, #dbeafe 50%, #e0f2fe 100%);
    }
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.6;
    animation: float 25s infinite ease-in-out;
}

.blob-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.4) 0%, rgba(59, 130, 246, 0.2) 50%, transparent 70%);
    top: -15%;
    left: -10%;
    animation-delay: 0s;
}

@media (prefers-color-scheme: light) {
    .blob-1 {
        background: radial-gradient(circle, rgba(34, 211, 238, 0.3) 0%, rgba(59, 130, 246, 0.15) 50%, transparent 70%);
    }
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.3) 0%, rgba(37, 99, 235, 0.15) 50%, transparent 70%);
    top: 40%;
    right: -10%;
    animation-delay: 8s;
}

@media (prefers-color-scheme: light) {
    .blob-2 {
        background: radial-gradient(circle, rgba(96, 165, 250, 0.25) 0%, rgba(37, 99, 235, 0.1) 50%, transparent 70%);
    }
}

.blob-3 {
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(14, 165, 233, 0.35) 0%, rgba(34, 211, 238, 0.2) 50%, transparent 70%);
    bottom: -20%;
    left: 25%;
    animation-delay: 15s;
}

@media (prefers-color-scheme: light) {
    .blob-3 {
        background: radial-gradient(circle, rgba(14, 165, 233, 0.2) 0%, rgba(34, 211, 238, 0.15) 50%, transparent 70%);
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(50px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-30px, 30px) scale(0.9);
    }
}

/* ===================================================
   CONTAINER & LAYOUT
   =================================================== */

.container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===================================================
   GLASS MORPHISM CARDS
   =================================================== */

.glass-card {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
    padding: 40px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: dark) {
    .glass-card:hover {
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.7);
    }
}

/* ===================================================
   HERO SECTION
   =================================================== */

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
}

@media (max-width: 768px) {
    .hero {
        justify-content: center;
        text-align: center;
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    width: 100%;
    align-items: center;
}

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

.hero-main {
    animation: fadeInUp 0.8s ease-out;
    overflow: visible;
    z-index: 10;
    position: relative;
}

/* Prevent hero card from shifting the dropdown on hover */
.hero-main:hover {
    transform: none;
}

.hero-side {
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

@media (max-width: 1024px) {
    .hero-side {
        display: none;
    }
}

.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .logo {
        justify-content: center;
    }
}

.logo-icon {
    font-size: 64px;
    line-height: 1;
    animation: float-icon 3s infinite ease-in-out;
}

.logo-image {
    width: 64px;
    height: 64px;
    object-fit: contain;
    animation: float-icon 3s infinite ease-in-out;
}

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

.logo-text {
    font-size: 72px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -2px;
}

.tagline {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.4;
    color: var(--text-primary);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    line-height: 1.8;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

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

/* ===================================================
   TESTING NOTICE
   =================================================== */

.testing-notice {
    margin: 24px 0;
    padding: 20px 24px;
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

@media (prefers-color-scheme: dark) {
    .testing-notice {
        background: rgba(245, 158, 11, 0.15);
        border-color: rgba(245, 158, 11, 0.4);
    }
}

.notice-icon {
    font-size: 24px;
    flex-shrink: 0;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.notice-content {
    flex: 1;
}

.notice-content h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #d97706;
}

@media (prefers-color-scheme: dark) {
    .notice-content h4 {
        color: #fbbf24;
    }
}

.notice-content p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.notice-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.notice-link:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* ===================================================
   BUTTONS
   =================================================== */

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: flex-start;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

@media (max-width: 768px) {
    .cta-buttons {
        justify-content: center;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 36px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.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;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--accent);
    color: var(--bg-primary);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.btn-icon {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.btn-primary:hover .btn-icon {
    transform: translateX(5px);
}

.btn-secondary:hover .btn-icon {
    transform: translateY(5px);
}

/* ===================================================
   FEATURES SECTION
   =================================================== */

.features {
    padding: 80px 0;
    opacity: 0;
    animation: fadeIn 1s ease-out 0.8s forwards;
}

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

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    text-align: center;
    padding: 40px 30px;
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out both;
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }
.feature-card:nth-child(5) { animation-delay: 0.5s; }
.feature-card:nth-child(6) { animation-delay: 0.6s; }

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.feature-card:hover .feature-icon {
    transform: scale(1.2) rotate(5deg);
}

.feature-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ===================================================
   FOOTER
   =================================================== */

.footer {
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    padding: 30px;
}

.footer p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.footer-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.footer-link:hover {
    opacity: 0.6;
}

.separator {
    color: var(--text-secondary);
}

.footer-year {
    font-size: 14px;
    opacity: 0.6;
}

/* ===================================================
   FLOATING DOCK
   =================================================== */

.floating-dock {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    padding: 0.75rem 1rem;
    border-radius: 50px;
    box-shadow: 0 8px 32px 0 rgba(37, 99, 235, 0.2);
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
    animation: slideUp 0.5s ease-out;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
    box-sizing: border-box;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@media (prefers-color-scheme: dark) {
    .floating-dock {
        box-shadow: 0 8px 32px 0 rgba(59, 130, 246, 0.25);
    }
}

.dock-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: transparent;
    border: none;
}

.dock-item svg {
    width: 24px;
    height: 24px;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), color 0.2s ease;
}

.dock-item:hover {
    background: var(--bg-secondary);
    transform: translateY(-5px);
}

.dock-item:hover svg {
    transform: scale(1.1);
    color: var(--accent);
}

.dock-item:active {
    transform: translateY(-3px) scale(0.95);
}

.dock-divider {
    width: 1px;
    height: 32px;
    background: var(--glass-border);
    margin: 0 0.25rem;
}

/* ===================================================
   RESPONSIVE DESIGN
   =================================================== */

@media (max-width: 768px) {
    .logo-text {
        font-size: 48px;
    }

    .tagline {
        font-size: 24px;
    }

    .description {
        font-size: 16px;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .glass-card {
        padding: 30px 20px;
    }

    .blob {
        filter: blur(60px);
    }
}

@media (max-width: 480px) {
    .logo-icon {
        font-size: 48px;
    }

    .logo-text {
        font-size: 36px;
    }

    .tagline {
        font-size: 20px;
    }

    .feature-icon {
        font-size: 36px;
    }
}

/* ===================================================
   SMOOTH SCROLLING ANIMATIONS
   =================================================== */

.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================
   LIQUID GLASS EFFECT ON HOVER
   =================================================== */

.glass-card {
    position: relative;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    background: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.1) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0.1) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.glass-card:hover::before {
    opacity: 1;
}

/* ===================================================
   ANIMATED TODO DEMO
   =================================================== */

.demo-preview {
    padding: 32px;
    position: relative;
    overflow: hidden;
}

.demo-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
    text-align: center;
}

.demo-todolist {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.demo-task {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
}

@media (prefers-color-scheme: light) {
    .demo-task {
        background: rgba(255, 255, 255, 0.5);
        border: 1px solid rgba(59, 130, 246, 0.15);
    }
}

.demo-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--text-secondary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    background: transparent;
}

.demo-checkbox .checkmark {
    opacity: 0;
    transform: scale(0);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    color: #ffffff;
}

.demo-task.completed .demo-checkbox {
    background: var(--accent);
    border-color: var(--accent);
}

.demo-task.completed .demo-checkbox .checkmark {
    opacity: 1;
    transform: scale(1);
}

.demo-task.completed .demo-task-text {
    text-decoration: line-through;
    opacity: 0.5;
}

.demo-task-text {
    font-size: 15px;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

/* ===================================================
   RIPPLE EFFECT
   =================================================== */

.btn {
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    pointer-events: none;
}

.btn:active::after {
    width: 200px;
    height: 200px;
}

/* ===================================================
   DOWNLOAD DROPDOWN
   =================================================== */

.download-wrapper {
    position: relative;
    display: inline-block;
    z-index: 1100;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-download .download-chevron {
    flex-shrink: 0;
    transition: transform 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-download[aria-expanded="true"] .download-chevron {
    transform: rotate(180deg);
}

/* ── Dropdown panel ── */

.download-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    width: 320px;
    padding: 12px;
    background: rgba(20, 20, 20, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition:
        opacity 180ms cubic-bezier(0.16, 1, 0.3, 1),
        transform 180ms cubic-bezier(0.16, 1, 0.3, 1);
}

.download-dropdown.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* ── Each OS row ── */

.download-option {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 64px;
    padding: 12px 14px;
    border-radius: 12px;
    text-decoration: none;
    color: #ffffff;
    cursor: pointer;
    transition: background 150ms ease;
    position: relative;
}

.download-option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.download-option:active {
    background: rgba(255, 255, 255, 0.1);
}

/* ── Detected OS highlight ── */

.download-option.detected {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
    color: #ffffff;
}

.download-option.detected:hover {
    background: linear-gradient(90deg, #4b90fc, #3170ee);
}

.download-option.detected:active {
    background: linear-gradient(90deg, #3a7de6, #2058d0);
}

/* ── Icon ── */

.download-option-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
}

.download-option.detected .download-option-icon {
    color: #ffffff;
}

/* ── Text info ── */

.download-option-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.download-option-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff;
}

.download-option-subtitle {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.3;
}

.download-option.detected .download-option-subtitle {
    color: rgba(255, 255, 255, 0.85);
}

/* ── DETECTED badge ── */

.download-detected-badge {
    display: none;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    flex-shrink: 0;
    white-space: nowrap;
}

.download-option.detected .download-detected-badge {
    display: inline-block;
}

/* ── Footer ── */

.download-dropdown-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 8px;
    padding-top: 10px;
    text-align: center;
}

.download-dropdown-footer a {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
    text-decoration: none;
    transition: color 150ms ease;
}

.download-dropdown-footer a:hover {
    color: rgba(255, 255, 255, 0.75);
}
