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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f5f5f5;
    min-height: 100vh;
    padding-bottom: 80px;
}

/* ========== HEADER ========== */
.header {
    background: #000000;
    padding: 14px 20px;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}
.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo-icon-container { position: relative; }
.logo-icon {
    width: 32px; height: 32px;
    background: #000;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
}
.logo-svg { width: 18px; height: 18px; fill: #fff; }
.logo-pulse {
    position: absolute; top: -2px; right: -2px;
    width: 10px; height: 10px;
    background: #FE2C55; border-radius: 50%;
    border: 2px solid #000;
    animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.8; transform: scale(1.2); }
}
.logo-text { display: flex; flex-direction: column; }
.logo-title { font-size: 18px; font-weight: 700; color: #fff; line-height: 1; }
.logo-subtitle { font-size: 12px; color: rgba(255,255,255,0.9); line-height: 1; margin-top: 2px; }

.header-right {
    display: flex; align-items: center; gap: 8px;
}
.level-badge {
    background: #111;
    padding: 6px 12px;
    border-radius: 12px;
    display: flex; align-items: center; gap: 4px;
    border: 1.5px solid #FE2C55;
}
.level-icon { font-size: 14px; color: #FE2C55; }
.level-name { font-size: 12px; font-weight: 700; color: #FE2C55; }

.header-balance {
    background: #fff;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.balance-text { color: #FE2C55; font-size: 16px; font-weight: 700; }

/* ========== NOTIFICATION BANNER ========== */
.notification-banner {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: #111;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto;
    border-radius: 0 0 20px 20px;
    animation: slideDown 0.3s ease;
}
.header.has-notif {
    border-radius: 0;
}
.notification-banner.show { display: flex; }
@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.notif-icon { font-size: 16px; }
.notif-text { flex: 1; }
.notif-close {
    background: none; border: none; color: #fff;
    font-size: 20px; cursor: pointer; padding: 0 4px;
    opacity: 0.8;
}
.notif-close:hover { opacity: 1; }

/* ========== STATS BAR ========== */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 16px 20px 8px;
    max-width: 600px;
    margin: 0 auto;
}
.stat-box {
    background: #fff;
    border-radius: 12px;
    padding: 10px 6px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}
.stat-icon { font-size: 18px; }
.stat-value { font-size: 16px; font-weight: 700; color: #111; }
.stat-label { font-size: 10px; color: #888; text-transform: uppercase; letter-spacing: 0.5px; }

/* ========== LEVEL PROGRESS ========== */
.level-progress-bar {
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    margin: 4px 20px 0;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden;
}
.level-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #FE2C55, #ff6b81);
    border-radius: 3px;
    transition: width 0.5s ease;
}
.level-progress-text {
    text-align: center;
    font-size: 11px;
    color: #888;
    margin: 4px 0 8px;
}

/* ========== MAIN CONTENT ========== */
.main-content-home {
    max-width: 600px;
    margin: 0 auto;
}

/* ========== EVALUATION CARD ========== */
.evaluation-card {
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    margin: 0 20px 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
}
.card-header { margin-bottom: 8px; }
.card-title { font-size: 18px; font-weight: 700; color: #000; margin-bottom: 4px; }
.card-subtitle { font-size: 13px; color: #666; margin-bottom: 8px; }

.progress-text {
    font-size: 14px; font-weight: 600; color: #FE2C55;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff0f3, #ffe0e6);
    border: 2px solid #FE2C55;
    border-radius: 12px;
    padding: 6px 14px;
    display: inline-block;
}

.task-question {
    font-size: 15px; font-weight: 600; color: #333;
    margin: 12px 0;
}

/* Thumbnail */
.video-thumbnail-container {
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.video-thumbnail {
    width: 100%; height: auto; display: block;
    border-radius: 12px;
    max-height: 300px;
    object-fit: cover;
}

/* Comment Card */
.comment-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 12px;
    text-align: left;
    border: 1px solid #e5e7eb;
}
.comment-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FE2C55, #25F4EE);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 16px;
    flex-shrink: 0;
}
.comment-body { flex: 1; }
.comment-user { font-size: 13px; font-weight: 700; color: #333; }
.comment-text { font-size: 14px; color: #555; margin-top: 4px; line-height: 1.4; }

/* Hashtag Card */
.hashtag-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f4ff, #e8eeff);
    border-radius: 16px;
    margin-bottom: 12px;
    border: 2px solid #25F4EE;
}
.hashtag-icon { font-size: 28px; font-weight: 700; color: #111; }
.hashtag-text { font-size: 22px; font-weight: 700; color: #333; }

.hashtag-video-preview { margin-bottom: 12px; }
.video-thumbnail-small {
    width: 100%; height: 150px;
    object-fit: cover;
    border-radius: 12px;
    opacity: 0.7;
}

/* Star Rating */
.star-rating {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 16px 0;
}
.star-btn {
    font-size: 36px;
    background: none;
    border: none;
    color: #d1d5db;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px;
}
.star-btn:hover, .star-btn.active {
    color: #f59e0b;
    transform: scale(1.2);
}
.star-btn:disabled { cursor: not-allowed; opacity: 0.5; }

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}
.btn-like, .btn-dislike {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.2s ease;
    background: transparent;
}
.btn-like {
    border-color: #25F4EE;
    background: rgba(37,244,238,0.1);
    color: #00b8b0;
}
.btn-like:hover {
    background: rgba(37,244,238,0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37,244,238,0.3);
}
.btn-dislike {
    border-color: #FE2C55;
    background: rgba(254,44,85,0.08);
    color: #FE2C55;
}
.btn-dislike:hover {
    background: rgba(254,44,85,0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254,44,85,0.3);
}
.btn-like svg, .btn-dislike svg { width: 18px; height: 18px; }
.btn-like:disabled, .btn-dislike:disabled {
    opacity: 0.5; cursor: not-allowed;
    transform: none !important; box-shadow: none !important;
}

/* ========== MISSIONS SECTION ========== */
.missions-section {
    margin: 0 20px 20px;
    background: #fff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.section-title {
    font-size: 18px; font-weight: 700; color: #111;
    margin-bottom: 12px;
}
.missions-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.mission-tab {
    flex: 1;
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    font-size: 13px;
    font-weight: 600;
    color: #888;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mission-tab.active {
    border-color: #FE2C55;
    color: #FE2C55;
    background: rgba(254,44,85,0.05);
}

.mission-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
}
.mission-item:last-child { border-bottom: none; }
.mission-item.mission-done { opacity: 0.7; }
.mission-info { flex: 1; margin-right: 12px; }
.mission-label { font-size: 13px; font-weight: 500; color: #333; margin-bottom: 6px; }
.mission-progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 4px;
}
.mission-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 2px;
    transition: width 0.3s ease;
}
.mission-progress-text { font-size: 11px; color: #888; }
.mission-reward-area {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    min-width: 80px;
}
.mission-reward-value { font-size: 14px; font-weight: 700; color: #22c55e; }
.mission-claim-btn {
    padding: 6px 14px;
    background: #FE2C55;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}
.mission-claim-btn:hover { background: #e0264c; transform: translateY(-1px); }
.mission-claimed-badge {
    font-size: 11px;
    color: #22c55e;
    font-weight: 600;
    background: rgba(34,197,94,0.1);
    padding: 4px 10px;
    border-radius: 6px;
}

/* ========== POPUPS ========== */
.quick-popup {
    position: fixed;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%) scale(0.3);
    background: linear-gradient(135deg, #22c55e, #16a34a);
    border-radius: 20px;
    padding: 24px 32px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 999;
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s ease;
}
.quick-popup.show {
    opacity: 1;
    transform: translate(-50%,-50%) scale(1);
}
.quick-popup span { font-size: 18px; font-weight: 700; color: #fff; }

.reward-popup {
    position: fixed; bottom: 90px; left: 0; right: 0;
    display: flex; justify-content: center;
    z-index: 200; pointer-events: none;
    opacity: 0; transition: opacity 0.3s ease;
}
.reward-popup.show { opacity: 1; }
.reward-content {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    padding: 10px 24px; border-radius: 30px;
    box-shadow: 0 4px 16px rgba(34,197,94,0.4);
}
.reward-amount { font-size: 18px; font-weight: 700; color: #fff; }

.popup-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center; justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}
.popup-overlay.show { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.popup {
    background: #fff;
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    max-width: 340px;
    width: 90%;
    animation: slideUp 0.3s ease;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}
@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
.popup-icon { font-size: 48px; margin-bottom: 16px; }
.popup-title { font-size: 20px; font-weight: 700; color: #000; margin-bottom: 12px; }
.popup-message { font-size: 14px; color: #666; margin-bottom: 16px; line-height: 1.5; display: none; }
.popup-message.show { display: block; }
.popup-close {
    width: 100%; padding: 14px;
    background: #FE2C55; color: #fff;
    border: none; border-radius: 12px;
    font-size: 16px; font-weight: 600;
    cursor: pointer; transition: all 0.2s ease;
}
.popup-close:hover { background: #e0264c; transform: translateY(-2px); }

/* Level Up Popup */
.level-up-popup { background: linear-gradient(135deg, #fff 0%, #fff0f3 100%); }
.level-up-icon { animation: iconBounce 0.6s ease; }
@keyframes iconBounce { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.3); } }

.new-level-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    background: #111;
    border-radius: 12px;
    margin-bottom: 20px;
}
.new-level-icon { font-size: 32px; }
.new-level-name { font-size: 20px; font-weight: 700; color: #fff; }
.new-level-mult { font-size: 14px; color: rgba(255,255,255,0.8); }

/* Streak Bonus Popup */
.streak-bonus-popup { background: linear-gradient(135deg, #fff 0%, #fff7ed 100%); }
.streak-bonus-amount {
    font-size: 28px; font-weight: 700; color: #22c55e;
    margin-bottom: 20px;
}

/* Mission Claimed */
.mission-claimed-amount {
    font-size: 28px; font-weight: 700; color: #22c55e;
    margin-bottom: 20px;
}

/* ========== BOTTOM NAV ========== */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff;
    display: flex;
    justify-content: space-around;
    padding: 8px 0 12px;
    border-top: 1px solid #f0f0f0;
    z-index: 100;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}
.nav-item {
    display: flex; flex-direction: column;
    align-items: center; gap: 4px;
    text-decoration: none;
    color: #999; font-size: 11px;
    transition: color 0.2s ease;
    padding: 4px 8px;
}
.nav-item svg { stroke: #999; transition: stroke 0.2s ease; }
.nav-item.active { color: #FE2C55; }
.nav-item.active svg { stroke: #FE2C55; }
.nav-item span { font-weight: 500; }

/* ========== RESPONSIVE ========== */
@media (max-width: 480px) {
    .stats-bar { gap: 6px; padding: 12px 12px 6px; }
    .stat-box { padding: 8px 4px; }
    .stat-value { font-size: 14px; }
    .stat-label { font-size: 9px; }
    .evaluation-card { margin: 0 12px 12px; padding: 16px; }
    .missions-section { margin: 0 12px 16px; padding: 16px; }
    .card-title { font-size: 16px; }
    .level-badge { padding: 4px 8px; }
    .level-name { font-size: 11px; }
}
