:root {
    --color-primary: #0077b6;
    --color-primary-dark: #023e8a;
    --color-secondary: #00b4d8;
    --color-accent: #90e0ef;
    --color-bg: #f8fafc;
    --color-surface: #ffffff;
    --color-text-main: #1a202c;
    --color-text-muted: #718096;
    --radius-lg: 20px;
    --radius-md: 12px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --gradient-primary: linear-gradient(135deg, #0077b6 0%, #0096c7 100%);
    --gradient-card: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    --gradient-gold: linear-gradient(135deg, #fff3b0 0%, #ca8a04 100%);
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Pretendard', sans-serif; -webkit-font-smoothing: antialiased; }
body { background: var(--color-bg); color: var(--color-text-main); padding-bottom: 90px; }

/* Utilities */
.hidden { display: none !important; }
.active { display: block; }
.text-danger { color: #e53e3e; }

/* Layout */
.app-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.logo { font-weight: 800; font-size: 1.3rem; color: var(--color-primary-dark); display: flex; align-items: center; gap: 0.5rem; letter-spacing: -0.5px; }
.logo-icon { font-size: 1.5rem; filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1)); }

.desktop-nav { display: none; }
@media (min-width: 768px) {
    .desktop-nav { display: block; }
    .desktop-nav ul { display: flex; list-style: none; gap: 2rem; }
    .nav-link { text-decoration: none; color: var(--color-text-muted); font-weight: 600; transition: color 0.2s; font-size: 0.95rem; }
    .nav-link.active { color: var(--color-primary); position: relative; }
    .nav-link.active::after { content:''; position: absolute; bottom: -5px; left: 0; width: 100%; height: 2px; background: var(--color-primary); border-radius: 2px; }
    .mobile-bottom-nav { display: none !important; }
    body { padding-bottom: 0; }
}

.app-container { max-width: 600px; margin: 0 auto; padding: 1.5rem 1rem; }
.page-section { animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

.page-header { margin-bottom: 2rem; text-align: center; }
.page-header h2 { color: var(--color-primary-dark); font-size: 1.75rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 0.5rem; }
.page-header p { color: var(--color-text-muted); font-size: 1rem; }

/* Cards */
.feature-card, .form-card, .result-card, .club-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    border: 1px solid rgba(255,255,255,0.5);
    transition: transform 0.2s, box-shadow 0.2s;
}
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Main Plan Card (Highlighted) */
.main-plan-card {
    background: linear-gradient(145deg, #ffffff 0%, #f0f9ff 100%);
    border: 1px solid #bae6fd;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.main-plan-card::before {
    content: ''; position: absolute; top: 0; left: 0; width: 4px; height: 100%;
    background: var(--color-primary);
}

.card-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.card-header .icon { font-size: 1.5rem; background: #e0f2fe; color: #0284c7; padding: 0.75rem; border-radius: 50%; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; }
.card-header h3 { font-size: 1.2rem; font-weight: 700; color: var(--color-text-main); }

.card-footer { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid rgba(0,0,0,0.05); display: flex; justify-content: space-between; align-items: center; }
.status-badge { background: var(--color-primary); color: white; padding: 0.3rem 0.8rem; border-radius: 20px; font-size: 0.8rem; font-weight: 600; box-shadow: 0 2px 5px rgba(0,119,182,0.3); }
.tap-hint { font-size: 0.85rem; color: var(--color-primary); font-weight: 600; cursor: pointer; transition: opacity 0.2s; }
.tap-hint:hover { opacity: 0.8; }

/* Typography */
.hero-mini { text-align: center; margin-bottom: 2rem; padding: 1rem 0; }
.hero-mini h1 { font-size: 1.6rem; font-weight: 800; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 0.5rem; letter-spacing: -0.5px; }
.hero-mini p { font-size: 0.95rem; color: var(--color-text-muted); }

.big-number { font-size: 2.5rem; font-weight: 800; color: var(--color-text-main); letter-spacing: -1px; }
.big-number-sm { font-size: 1.8rem; font-weight: 700; color: var(--color-secondary); }

/* Forms */
.logger-form label { display: block; margin-bottom: 0.6rem; font-weight: 600; font-size: 0.95rem; color: #4a5568; }
.input-group, .form-group { margin-bottom: 1.25rem; }
.form-row { display: flex; gap: 1rem; }
.form-group.half { flex: 1; }

input[type="text"], input[type="number"], input[type="date"], select, textarea {
    width: 100%; padding: 0.9rem; border: 1px solid #e2e8f0; border-radius: 10px; font-size: 1rem; transition: all 0.2s; background: #f8fafc;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-primary); background: white; box-shadow: 0 0 0 3px rgba(0,119,182,0.1); }

.mood-selector { display: flex; gap: 0.75rem; }
.mood-btn { flex: 1; text-align: center; padding: 1.25rem 0.5rem; border: 2px solid #e2e8f0; border-radius: 12px; cursor: pointer; transition: all 0.2s; background: white; }
input[name="mood"]:checked + .mood-btn { border-color: var(--color-primary); background: #f0f9ff; color: var(--color-primary); transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* Buttons */
button { cursor: pointer; border: none; font-family: inherit; }
.primary-btn { width: 100%; background: var(--gradient-primary); color: white; padding: 1rem; border-radius: 12px; font-weight: 700; font-size: 1.05rem; transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 6px rgba(0,119,182,0.3); }
.primary-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 12px rgba(0,119,182,0.4); }
.secondary-btn { background: white; border: 1px solid #e2e8f0; color: var(--color-text-main); padding: 0.75rem 1.5rem; border-radius: 8px; font-weight: 600; transition: all 0.2s; }
.secondary-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }
.floating-submit-btn {
    width: 100%; background: var(--color-primary); color: white; padding: 1.1rem; border-radius: 14px; font-weight: 700; font-size: 1.1rem;
    box-shadow: 0 8px 20px rgba(0, 119, 182, 0.4); transition: transform 0.2s;
}
.floating-submit-btn:active { transform: scale(0.98); }
.link-btn { background: none; color: var(--color-primary); font-weight: 600; font-size: 0.95rem; margin-top: 0.5rem; display: inline-flex; align-items: center; gap: 4px; }
.link-btn::after { content: '→'; font-size: 1.1em; transition: transform 0.2s; }
.link-btn:hover::after { transform: translateX(3px); }

/* Navigation */
.mobile-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    display: flex; justify-content: space-around;
    padding: 0.8rem 0 1.5rem 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.05);
    z-index: 1000;
    border-top: 1px solid rgba(0,0,0,0.05);
}
.nav-item { display: flex; flex-direction: column; align-items: center; color: #a0aec0; text-decoration: none; font-size: 0.7rem; gap: 0.3rem; transition: color 0.2s; }
.nav-item.active { color: var(--color-primary); font-weight: 600; }
.nav-icon { font-size: 1.5rem; transition: transform 0.2s; }
.nav-item.active .nav-icon { transform: translateY(-3px); }

/* Modals */
.modal-overlay, .onboarding-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex; align-items: center; justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(8px);
}
.modal-overlay.hidden, .onboarding-overlay:not(.active) { display: none; }
.modal-content, .onboarding-content {
    background: white; width: 90%; max-width: 450px;
    padding: 2rem; border-radius: 24px;
    max-height: 85vh; overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.modal-header h2 { font-size: 1.5rem; font-weight: 800; color: #1a202c; }
.close-btn { background: #f1f5f9; width: 32px; height: 32px; border-radius: 50%; font-size: 1.2rem; color: #64748b; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.close-btn:hover { background: #e2e8f0; color: #ef4444; }

/* Onboarding */
.level-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.5rem; }
.level-card {
    display: flex; align-items: center; gap: 1rem; text-align: left;
    background: white; padding: 1.25rem; border-radius: 16px;
    border: 2px solid #e2e8f0; transition: all 0.2s;
    box-shadow: var(--shadow-sm);
}
.level-card:hover { border-color: var(--color-primary); background: #f0f9ff; transform: scale(1.02); box-shadow: var(--shadow-md); }
.level-icon { font-size: 2.2rem; background: #f8fafc; padding: 0.5rem; border-radius: 12px; }

/* Lists & Feeds */
.activity-list li { padding: 1rem 0; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; justify-content: space-between; }
.activity-list li strong { color: var(--color-primary-dark); font-size: 1.1rem; }

.feed-item {
    background: white; padding: 1.25rem; border-radius: 16px; margin-bottom: 1rem;
    box-shadow: var(--shadow-sm); border: 1px solid #f1f5f9;
}
.feed-head { margin-bottom: 0.8rem; padding-bottom: 0.8rem; border-bottom: 1px solid #f8fafc; }
.feed-user { font-size: 1rem; color: #2d3748; }

/* Upload Zone */
.upload-zone {
    border: 2px dashed #cbd5e0; border-radius: 20px;
    padding: 3rem 1rem; text-align: center; cursor: pointer; transition: all 0.2s;
    background: #f8fafc;
}
.upload-zone:hover { border-color: var(--color-primary); background: #f0f9ff; }

/* Club Logo */
.club-logo-img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; margin-right: 0.75rem; border: 2px solid white; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.club-logo-img-large { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 4px solid white; box-shadow: var(--shadow-md); margin-bottom: 0.5rem; }

/* YouTube Link Button */
.yt-link-btn {
    display: inline-flex; align-items: center; gap: 4px;
    background: #ff0000; color: white;
    padding: 2px 8px; border-radius: 4px;
    font-size: 0.7rem; font-weight: 700;
    text-decoration: none; margin-left: 8px;
    vertical-align: middle; opacity: 0.9;
}
.yt-link-btn:hover { opacity: 1; transform: scale(1.05); }
.yt-icon { width: 12px; height: 12px; fill: white; }

/* Workout Modal Sections */
.workout-section { margin-bottom: 1.5rem; }
.workout-section h4 { font-size: 1rem; font-weight: 700; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.75rem; border-left: 3px solid var(--color-primary); padding-left: 0.75rem; }
.workout-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.85rem 1rem; background: #f8fafc; border-radius: 10px; margin-bottom: 0.5rem;
    border: 1px solid #f1f5f9;
}
.workout-item strong { color: var(--color-primary-dark); font-size: 1.05rem; }
.workout-desc-row { display: flex; align-items: center; }

/* Disclaimer */
.yt-disclaimer {
    font-size: 0.8rem; color: #718096; background: #f7fafc; padding: 0.75rem; border-radius: 8px; margin-top: 1.5rem; text-align: center; border: 1px solid #e2e8f0;
}