/* ============================================
   iOS-like Modern Design System
   ============================================ */
:root {
    --primary: #007AFF;
    --primary-light: #5AC8FA;
    --secondary: #5856D6;
    --success: #34C759;
    --warning: #FF9500;
    --danger: #FF3B30;
    --gray-1: #8E8E93;
    --gray-2: #AEAEB2;
    --gray-3: #C7C7CC;
    --gray-4: #D1D1D6;
    --gray-5: #E5E5EA;
    --gray-6: #F2F2F7;
    --text: #1C1C1E;
    --text-secondary: #3C3C43;
    --background: #F2F2F7;
    --card: #FFFFFF;
    --shadow: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-xs: 8px;
    --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Hiragino Sans', sans-serif;
}

/* ============================================
   Base
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--background);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
.hidden { display: none !important; }

.container { max-width: 600px; margin: 0 auto; padding: 0 16px; }

/* ============================================
   Loading & Error
   ============================================ */
.loading, .error {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 32px;
    text-align: center;
}

.loading-spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--gray-5);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.error-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, #FF6B6B, var(--danger));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
}

/* ============================================
   Header - Hero Style
   ============================================ */
.header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #fff;
    padding: 48px 0 80px;
    text-align: center;
    position: relative;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--background);
    border-radius: 32px 32px 0 0;
}

.plan-title {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.plan-meta {
    font-size: 14px;
    opacity: 0.85;
}

/* ============================================
   Floating App CTA (Top)
   ============================================ */
.app-cta-float {
    position: relative;
    z-index: 10;
    margin-top: -50px;
    padding: 0 16px 24px;
}

.app-cta-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.app-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.app-icon svg { width: 32px; height: 32px; fill: #fff; }

.app-cta-info { flex: 1; min-width: 0; }

.app-cta-info h3 {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 2px;
}

.app-cta-info p {
    font-size: 13px;
    color: var(--gray-1);
}

.app-cta-btn {
    background: var(--primary);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    white-space: nowrap;
    transition: transform 0.2s, box-shadow 0.2s;
}

.app-cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,122,255,0.4);
    color: #fff;
}

/* ============================================
   Schedule
   ============================================ */
.main { padding: 8px 0 32px; }

.schedule { display: flex; flex-direction: column; gap: 24px; }

/* Date Section */
.date-section { display: flex; flex-direction: column; gap: 12px; }

.date-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    padding: 0 4px;
}

.date-header svg { width: 22px; height: 22px; fill: var(--primary); }

/* Spot Card - iOS Style */
.spot-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.spot-card:active {
    transform: scale(0.98);
}

.spot-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--gray-5);
}

.spot-image-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--gray-5), var(--gray-4));
    display: flex;
    align-items: center;
    justify-content: center;
}

.spot-image-placeholder svg { width: 40px; height: 40px; fill: var(--gray-2); }

.spot-content { padding: 16px; }

.spot-time {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.spot-time svg { width: 14px; height: 14px; fill: currentColor; }

.spot-name {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 6px;
    letter-spacing: -0.3px;
}

.spot-address {
    font-size: 14px;
    color: var(--gray-1);
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 4px;
}

.spot-address svg { width: 14px; height: 14px; fill: var(--gray-2); flex-shrink: 0; margin-top: 2px; }

.spot-note {
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--gray-6);
    padding: 12px;
    border-radius: var(--radius-xs);
    margin-bottom: 12px;
}

.spot-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.spot-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    padding: 8px 14px;
    background: rgba(0,122,255,0.1);
    border-radius: 20px;
    transition: background 0.2s;
}

.spot-link:hover { background: rgba(0,122,255,0.2); color: var(--primary); }

.spot-link svg { width: 16px; height: 16px; fill: currentColor; }

/* Route Indicator */
.route-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    margin-left: 20px;
}

.route-line {
    width: 2px;
    height: 20px;
    background: var(--gray-4);
    border-radius: 1px;
}

.route-link {
    font-size: 13px;
    color: var(--gray-1);
    display: flex;
    align-items: center;
    gap: 4px;
}

.route-link:hover { color: var(--primary); }
.route-link svg { width: 14px; height: 14px; fill: currentColor; }

/* ============================================
   Bottom App CTA - Full Width
   ============================================ */
.app-cta-bottom {
    background: linear-gradient(135deg, #1C1C1E 0%, #2C2C2E 100%);
    padding: 40px 16px;
    text-align: center;
}

.app-cta-bottom-content {
    max-width: 400px;
    margin: 0 auto;
}

.app-cta-bottom h2 {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
}

.app-cta-bottom p {
    color: var(--gray-2);
    font-size: 15px;
    margin-bottom: 24px;
}

.app-store-btn {
    display: inline-block;
    transition: transform 0.2s;
}

.app-store-btn:hover { transform: scale(1.05); }
.app-store-btn img { height: 50px; width: auto; }

/* ============================================
   Ad Banner
   ============================================ */
.ad-banner {
    padding: 16px;
    background: var(--card);
}

.ad-container {
    min-height: 90px;
    background: var(--gray-6);
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-2);
    font-size: 12px;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: var(--text);
    color: #fff;
    padding: 24px 16px;
    text-align: center;
}

.footer p { font-size: 12px; opacity: 0.6; margin-bottom: 12px; }

.footer-nav { display: flex; justify-content: center; gap: 24px; }

.footer-nav a { font-size: 12px; color: #fff; opacity: 0.6; }
.footer-nav a:hover { opacity: 1; color: #fff; }

/* ============================================
   Button
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: #0056b3;
    color: #fff;
    transform: scale(1.02);
}

/* ============================================
   Responsive
   ============================================ */
@media (min-width: 768px) {
    .header { padding: 64px 0 100px; }
    .header::after { bottom: -40px; height: 80px; }
    .plan-title { font-size: 36px; }
    .app-cta-float { margin-top: -60px; }
    .spot-image { height: 220px; }
}
