/* 
 * Timeline Landing Page
 * Matching Timeline.app exactly
 * Colors and styles from SwiftUI code
 */

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

:root {
    /* Exact colors from Timeline3DView.swift */
    --bg-top: #0B0B0C;
    --bg-bottom: #121316;
    
    /* Exact opacities from MilestoneCard.swift and other views */
    --card-bg: rgba(255, 255, 255, 0.12);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-hover: rgba(255, 255, 255, 0.1);
    --selected-border: rgba(255, 255, 255, 0.2);
    --emoji-bg: rgba(255, 255, 255, 0.12);
    --selected-emoji-bg: rgba(255, 255, 255, 0.18);
    --control-bg: rgba(255, 255, 255, 0.15);
    
    /* Shadows from app */
    --shadow-light: rgba(0, 0, 0, 0.15);
    --shadow-medium: rgba(0, 0, 0, 0.2);
    --shadow-strong: rgba(0, 0, 0, 0.3);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', system-ui, sans-serif;
    background: linear-gradient(180deg, var(--bg-top) 0%, var(--bg-bottom) 100%);
    color: white;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Toolbar (TopToolbar.swift) */
.toolbar {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.toolbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 100px;
    box-shadow: 0 5px 10px var(--shadow-medium);
    pointer-events: auto;
    position: relative;
    z-index: 101;
}

.toolbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
}

.app-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.brand-name {
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
}

.brand-product {
    font-size: 15px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
}

.toolbar-nav {
    display: flex;
    gap: 24px;
    align-items: center;
    pointer-events: auto;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: white;
}

/* Hamburger Menu */
.hamburger-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    z-index: 102;
    pointer-events: auto;
    position: relative;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.hamburger-menu span {
    display: block;
    width: 24px;
    height: 2px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

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

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-menu {
    position: absolute;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(40px) saturate(180%);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
    opacity: 0;
    transform: translateX(-50%) translateY(-20px);
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active .mobile-menu {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.mobile-nav-link {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 16px 20px;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-align: center;
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding: 120px 40px 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 1200px;
    position: relative;
    z-index: 10;
    margin-top: 40px;
    pointer-events: none;
}

.brand {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.hero-content h1 {
    font-size: clamp(40px, 7vw, 72px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
    margin-bottom: 20px;
}

.subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    margin-bottom: 14px;
}

.scroll-hint {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    animation: bounce 2s ease-in-out infinite;
}

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

/* Interactive 3D Timeline (exact from Timeline3DView.swift) */
.timeline-3d {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    perspective: 1200px;
    perspective-origin: 50% 50%;
    pointer-events: none;
}

/* Date markers container */
#date-markers {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Date marker (from Timeline3DView.swift line 43-56) */
.date-marker {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: rgba(255, 255, 255, 0.7);
    pointer-events: none;
    transform-origin: center;
    will-change: transform, opacity;
}

.marker-dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
}

/* Milestone 3D container */
.milestone-3d {
    position: absolute;
    top: 50%;
    left: 50%;
    transform-style: preserve-3d;
    will-change: transform, opacity, filter;
    pointer-events: auto;
}


/* Milestone Card (exact from MilestoneCard.swift) */
.milestone-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    min-width: 140px;
    background: var(--card-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: none;
    border-radius: 16px;
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.2);
    transform-origin: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.milestone-card.selected {
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.2),
        0 12px 24px rgba(0, 0, 0, 0.3);
}

.milestone-card:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-4px);
    box-shadow: 
        inset 0 1px 0 0 rgba(255, 255, 255, 0.18),
        0 12px 20px rgba(0, 0, 0, 0.25);
}


/* Emoji container (from MilestoneCard.swift line 14-18) */
.emoji-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: var(--emoji-bg);
    border-radius: 14px;
}

.milestone-card.selected .emoji-container {
    background: var(--selected-emoji-bg);
}

.emoji {
    font-size: 32px;
    line-height: 1;
}

/* Card text (from MilestoneCard.swift line 21-30) */
.card-title {
    font-size: 15px;
    font-weight: 600;
    color: white;
    text-align: center;
    line-height: 1.2;
}

.card-date {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
}


/* Persona Selector (Bottom Control Style) */
.persona-selector {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--card-border);
    border-radius: 100px;
    box-shadow: 0 5px 10px var(--shadow-medium);
    z-index: 100;
}

.persona-label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    white-space: nowrap;
    flex-shrink: 0;
}

.persona-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: center;
}

.persona-btn {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.persona-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

.persona-btn.active {
    background: var(--control-bg);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

/* Habits Section */
.habits-section {
    padding: 120px 40px;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.habits-section h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 3rem;
}

/* 24-Hour Habit Clock - EXACT sizing from Mac app */
.habit-clock-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100vh;
    min-height: 700px;
    padding: 40px;
}

.habit-clock {
    position: relative;
    /* Larger size for better visibility */
    width: min(80vw, 80vh);
    height: min(80vw, 80vh);
    max-width: 1000px;
    max-height: 1000px;
    min-width: 400px;
    min-height: 400px;
}

/* Clock Ring (SVG) - EXACT from Mac app */
.clock-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* SVG text styling for clock numbers */
.clock-ring text {
    user-select: none;
    -webkit-user-select: none;
}

/* Make major hour markers more prominent */
.clock-ring line {
    shape-rendering: crispEdges;
}

/* Habit Arcs Container - EXACT from Mac app */
.habit-arcs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

/* Individual Habit Arc */
.habit-arc {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.habit-arc svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.habit-arc path {
    transition: opacity 0.3s ease;
}

.habit-arc .clickable {
    cursor: pointer;
    pointer-events: auto;
}

/* Habit Emoji on Arc - EXACT from Mac app */
.habit-emoji-on-arc {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 5;
    transition: opacity 0.3s ease;
    user-select: none;
}

/* Checkmark for completed habits - EXACT from Mac app */
.habit-checkmark {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 6;
    animation: checkmarkAppear 0.3s ease-out;
}

.habit-checkmark svg {
    display: block;
}

@keyframes checkmarkAppear {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Live Time Indicator - EXACT from Mac app */
.time-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none;
}

.time-indicator-pulse {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 70%);
    transform: translate(-50%, -50%);
}

.time-indicator-pulse.animating {
    animation: pulse 2s ease-in-out infinite;
}

.time-indicator-dot {
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.time-indicator-dot::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.7;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.3;
    }
}

/* Clock Center Content */
.clock-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 240px;
    max-width: 48%;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.clock-date-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.clock-date {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

.clock-weekday {
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.current-habit-card {
    width: 100%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
}

.current-habit-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.2);
}

.current-habit-card.completed {
    background: rgba(255, 255, 255, 0.04);
    transform: scale(0.98);
    border-width: 2px;
}

.current-habit-card.completed:hover {
    transform: scale(0.98) translateY(-2px);
}

.habit-emoji-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 14px;
}

.habit-emoji-container .emoji {
    font-size: 32px;
}

.habit-emoji-container.completed .emoji {
    opacity: 0.5;
}

.habit-emoji-container .checkmark-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    animation: checkmarkAppear 0.3s ease-out;
}

.habit-emoji-container .checkmark-badge svg {
    display: block;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.habit-now-label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 4px;
}

.habit-title {
    font-size: 15px;
    font-weight: 600;
    color: white;
    text-align: center;
    margin-bottom: 4px;
}

.habit-time-range {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
}

.habit-hint {
    font-size: 9px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.4);
}

/* Free time card */
.free-time-card {
    width: 100%;
    padding: 20px;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* Upcoming habits list */
.upcoming-habits {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.upcoming-label {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.4);
    text-align: left;
}

.upcoming-habit-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 10px;
}

.upcoming-habit-emoji {
    font-size: 16px;
}

.upcoming-habit-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.upcoming-habit-title {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    text-align: left;
}

.upcoming-habit-time {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
    text-align: left;
}



/* Vision Board Section - EXACT from VisionCard.swift and VisionShowcaseView.swift */
.vision-section {
    padding: 120px 40px;
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
}

.vision-section h2 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: white;
    margin-bottom: 16px;
}

.vision-cards-container {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.vision-cards {
    display: flex;
    gap: 30px; /* EXACT from VisionShowcaseView.swift line 34: HStack(spacing: 30) */
    justify-content: center;
    flex-wrap: wrap;
    max-width: 720px; /* 3 cards * 200px + 2 gaps * 30px + some padding */
}

/* Vision Card - EXACT from VisionCard.swift lines 17-97 */
.vision-card {
    width: 200px; /* EXACT from line 96 */
    height: 200px;
    border-radius: 12px; /* EXACT from line 21: cornerRadius: 12 */
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vision-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.vision-card-image {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.vision-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* EXACT from line 34: .scaledToFill() */
    display: block;
}

/* Title overlay - EXACT from lines 74-94 */
.vision-card-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 8px 12px; /* EXACT from lines 83-84 */
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0),
        rgba(0, 0, 0, 0.7)
    ); /* EXACT from lines 86-92 */
}

.vision-card-title span {
    font-size: 13px; /* EXACT from line 77 */
    font-weight: 600; /* semibold */
    color: white;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: left; /* Left-aligned like in app */
}

/* Features Section */
.features {
    padding: 120px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.features h2 {
    font-size: clamp(40px, 6vw, 64px);
    font-weight: 800;
    text-align: center;
    margin-bottom: 80px;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

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

.feature {
    padding: 32px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    text-align: center;
    transition: all 0.3s ease;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--card-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px var(--shadow-medium);
}

.feature-preview {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.feature h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
}

.feature p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Small milestone cards in features */
.milestone-card-small {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    min-width: 110px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 4px 8px var(--shadow-light);
    margin: 8px;
    transform: scale(0.9);
}

.milestone-card-small .emoji-container {
    width: 44px;
    height: 44px;
}

.milestone-card-small .emoji {
    font-size: 24px;
}

.milestone-card-small .card-title {
    font-size: 13px;
}

.milestone-card-small .card-date {
    font-size: 11px;
}

/* Habit Strip (from HabitStripView.swift) */
.habit-strip {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
}

.habit-week {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.day-header {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
}

.day-cell {
    display: flex;
    gap: 6px;
}

/* Habit emoji (line 48-55 in HabitStripView.swift) */
.habit-emoji {
    font-size: 16px;
    padding: 6px;
    background: var(--emoji-bg);
    border-radius: 8px;
    position: relative;
}

.habit-emoji.completed {
    background: rgba(255, 255, 255, 0.9);
}

.habit-emoji.completed::after {
    content: '✓';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 14px;
    height: 14px;
    background: #4CD964;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

/* Depth preview */
.depth-preview {
    display: flex;
    align-items: center;
    gap: 16px;
}

.depth-card {
    font-size: 48px;
    transition: all 0.3s ease;
}

/* macOS window */
.macos-window {
    width: 200px;
    height: 120px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
}

.window-controls {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
}

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

.dot.red { background: #FF5F57; }
.dot.yellow { background: #FFBD2E; }
.dot.green { background: #28CA42; }

.window-content {
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(100% - 44px);
}

.emoji-large {
    font-size: 48px;
}

/* Privacy icon */
.privacy-icon {
    font-size: 64px;
}

/* Keyboard keys */
.keyboard-keys {
    display: flex;
    gap: 12px;
}

.key {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 8px;
    font-size: 20px;
    font-weight: 600;
}

/* Download Section */
.download {
    padding: 120px 40px;
    display: flex;
    justify-content: center;
}

.download-card {
    max-width: 500px;
    padding: 48px;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 32px;
    text-align: center;
    box-shadow: 0 20px 40px var(--shadow-strong);
}

.beta-badge {
    display: inline-block;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--card-border);
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 24px;
}

.download-card h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
}

.download-card p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 32px;
}

.download-card .download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--control-bg);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 24px;
}

.download-card .download-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.download-card .download-btn svg {
    opacity: 0.8;
}

.email-form {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
}

.email-form input {
    flex: 1;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: white;
    font-size: 15px;
}

.email-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.email-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--card-border-hover);
}

.submit-btn {
    padding: 14px 28px;
    background: var(--control-bg);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.submit-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.requirements {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* Footer */
.footer {
    padding: 40px 40px 160px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 80px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.footer-sep {
    opacity: 0.3;
}

.footer-content a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-content a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: clamp(42px, 7vw, 72px);
    }
    
    .subtitle {
        font-size: 18px;
    }
    
    /* Scale milestone cards slightly on medium screens */
    .milestone-card {
        transform: scale(0.85);
        margin: -10px;
    }
    
    .timeline-preview {
        width: 600px;
        height: 400px;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .habit-clock-container {
        min-height: 650px;
    }
    
    .habit-clock {
        width: min(75vw, 75vh);
        height: min(75vw, 75vh);
        max-width: 750px;
        max-height: 750px;
    }
}

@media (max-width: 768px) {
    .toolbar-content {
        padding: 10px 16px;
        gap: 12px;
    }
    
    .app-icon {
        width: 24px;
        height: 24px;
    }
    
    .brand-name {
        font-size: 15px;
    }
    
    /* Hide desktop nav and show hamburger menu on mobile */
    .toolbar-nav {
        display: none;
    }
    
    .hamburger-menu {
        display: flex;
    }
    
    .tool-btn.circle {
        width: 32px;
        height: 32px;
    }
    
    .hero {
        padding: 80px 20px 60px;
        min-height: 100vh;
    }
    
    .hero-content {
        margin-top: 40px;
    }
    
    .brand {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .hero-content h1 {
        font-size: clamp(36px, 10vw, 56px);
        margin-bottom: 16px;
    }
    
    .subtitle {
        font-size: 16px;
        line-height: 1.5;
        margin-bottom: 12px;
    }
    
    .scroll-hint {
        font-size: 12px;
    }
    
    /* Scale down milestone cards on mobile */
    .milestone-card {
        transform: scale(0.75);
        margin: -20px;
    }
    
    /* Adjust persona selector for mobile */
    .persona-selector {
        bottom: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        width: auto;
        max-width: calc(100% - 20px);
        padding: 10px 12px;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
    }
    
    .persona-selector::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .persona-label {
        font-size: 11px;
        flex-shrink: 0;
    }
    
    .persona-buttons {
        gap: 6px;
        flex-shrink: 0;
    }
    
    .persona-btn {
        padding: 8px 14px;
        font-size: 12px;
        min-width: auto;
        flex-shrink: 0;
        white-space: nowrap;
    }
    
    .timeline-preview {
        width: 100%;
        max-width: 400px;
        height: 350px;
        transform: scale(0.8);
    }
    
    .bottom-control {
        flex-wrap: wrap;
        padding: 12px 16px;
        gap: 12px;
    }
    
    .features {
        padding: 80px 20px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .download {
        padding: 80px 20px;
    }
    
    .download-card {
        padding: 32px 24px;
    }
    
    .email-form {
        flex-direction: column;
    }
    
    /* Habits section mobile */
    .habits-section {
        padding: 80px 20px;
    }
    
    .habit-clock-container {
        min-height: 500px;
        padding: 10px 10px;
    }
    
    .habit-clock {
        width: min(80vw, 80vh);
        height: min(80vw, 80vh);
        max-width: 500px;
        max-height: 500px;
        min-width: 350px;
        min-height: 350px;
    }
    
    /* Hide upcoming habits on mobile to save space */
    .upcoming-habits {
        display: none;
    }
    
    /* Hide habit cards on mobile, only show date */
    .current-habit-card,
    .free-time-card {
        display: none;
    }
    
    .clock-center {
        width: auto;
        max-width: 90%;
        gap: 8px;
    }
    
    .clock-ring text {
        font-size: 8px;
    }
    
    .clock-date {
        font-size: 9px;
    }
    
    .clock-weekday {
        font-size: 16px;
    }
    
    .upcoming-habit-item {
        padding: 6px 10px;
    }
    
    .upcoming-habit-emoji {
        font-size: 14px;
    }
    
    .upcoming-habit-title {
        font-size: 10px;
    }
    
    .upcoming-habit-time {
        font-size: 9px;
    }
}
