/* =============================================
   Ceejay's Fan Corner — Design System
   Cute, warm, celebratory: pastels, soft gradients, gold accents
   Mobile-first responsive
   ============================================= */

/* --- CSS Custom Properties --- */
:root {
    --pink-50: #fef1f7;
    --pink-100: #fde2ef;
    --pink-200: #fbc7df;
    --pink-300: #f89cc5;
    --pink-400: #f262a1;
    --pink-500: #e83e8c;
    --pink-600: #d41e6f;
    --rose-400: #fb7185;
    --rose-500: #f43f5e;
    --gold: #f59e0b;
    --gold-light: #fde68a;
    --gold-dark: #b45309;
    --bg: #fef6fb;
    --bg-alt: #fff0f7;
    --card-bg: #ffffff;
    --text: #374151;
    --text-muted: #9ca3af;
    --text-light: #6b7280;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-xs: 6px;
    --shadow-sm: 0 1px 3px rgba(233, 62, 140, 0.08);
    --shadow: 0 4px 16px rgba(233, 62, 140, 0.10);
    --shadow-lg: 0 8px 32px rgba(233, 62, 140, 0.12);
    --nav-height: 64px;
    --max-width: 1200px;
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a { color: var(--pink-500); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--pink-600); }

img { max-width: 100%; height: auto; }

h1, h2, h3 { line-height: 1.3; }
h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

.display-font { font-family: 'Dancing Script', cursive; }

/* --- Navbar --- */
.navbar {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--pink-100);
    height: var(--nav-height);
}

.nav-container {
    max-width: var(--max-width); margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    height: 100%; padding: 0 1rem;
}

.nav-brand {
    font-family: 'Dancing Script', cursive;
    font-size: 1.5rem; font-weight: 700;
    color: var(--pink-500) !important;
    white-space: nowrap;
}

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--pink-400); margin: 5px 0; border-radius: 2px; transition: 0.2s; }

.nav-links { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.nav-link { padding: 0.4rem 0.75rem; border-radius: var(--radius-xs); font-size: 0.875rem; font-weight: 500; color: var(--text-light); transition: all 0.2s; }
.nav-link:hover { background: var(--pink-50); color: var(--pink-500); }
.btn-nav-signup { background: var(--pink-500); color: #fff !important; }
.btn-nav-signup:hover { background: var(--pink-600); }

.nav-user { font-size: 0.85rem; color: var(--text); display: flex; align-items: center; gap: 0.35rem; }
.nav-logout { color: var(--text-muted) !important; }
.nav-logout:hover { color: var(--rose-500) !important; }

/* --- Flash Messages --- */
.flash-container { max-width: var(--max-width); margin: 0 auto; padding: 0.75rem 1rem 0; }
.flash { padding: 0.75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 0.5rem; font-size: 0.9rem; animation: slideDown 0.3s ease; }
.flash-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.flash-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.flash-info { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* --- Main Content --- */
.main-content { flex: 1; max-width: var(--max-width); width: 100%; margin: 0 auto; padding: 2rem 1rem; }

/* --- Hero Section --- */
.hero {
    text-align: center; padding: 3rem 1rem; margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--pink-100), var(--pink-50), #fef9c3);
    border-radius: var(--radius);
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 50%);
    pointer-events: none;
}
.hero h1 { font-family: 'Dancing Script', cursive; font-size: 2.8rem; color: var(--pink-600); margin-bottom: 0.5rem; position: relative; }
.hero .hero-subtitle { font-size: 1.15rem; color: var(--text-light); margin-bottom: 1.5rem; position: relative; }

.hero-video {
    max-width: 640px; margin: 1.5rem auto 0; position: relative;
    border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow);
}
.hero-video iframe { width: 100%; aspect-ratio: 16/9; border: none; }

/* --- About Section --- */
.about-section { background: var(--card-bg); border-radius: var(--radius); padding: 2rem; margin-bottom: 2rem; box-shadow: var(--shadow-sm); }
.about-section h2 { color: var(--pink-500); margin-bottom: 0.75rem; }
.about-section p { color: var(--text-light); line-height: 1.7; }

/* --- Post Grid --- */
.post-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .post-grid { grid-template-columns: repeat(3, 1fr); } }

.section-title { font-family: 'Dancing Script', cursive; font-size: 2rem; color: var(--pink-600); margin-bottom: 1.25rem; text-align: center; }

/* --- Post Card --- */
.post-card {
    background: var(--card-bg); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex; flex-direction: column;
}
.post-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.post-card-photo { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--pink-50); }
.post-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.post-card-message { font-size: 0.95rem; color: var(--text); margin-bottom: 0.75rem; line-height: 1.6; flex: 1; }
.post-card-meta { font-size: 0.8rem; color: var(--text-muted); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }
.post-card-author { font-weight: 600; color: var(--pink-500); }
.post-card-video { margin-top: 0.75rem; }
.post-card-video iframe { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-xs); border: none; }

/* --- Status Badges --- */
.status-badge { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 20px; font-size: 0.75rem; font-weight: 600; }
.status-pending { background: #fef9c3; color: #a16207; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-rejected { background: #fee2e2; color: #991b1b; }

/* --- Role Badges --- */
.badge { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 20px; font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.badge-superadmin { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: #fff; }
.badge-admin { background: var(--pink-400); color: #fff; }
.badge-moderator { background: #a78bfa; color: #fff; }
.badge-user { background: #e5e7eb; color: #6b7280; }
.badge-pending { background: var(--rose-500); color: #fff; padding: 0.15rem 0.5rem; border-radius: 20px; font-size: 0.7rem; margin-left: 0.25rem; }

/* --- Buttons --- */
.btn { display: inline-block; padding: 0.6rem 1.4rem; border-radius: var(--radius-sm); font-size: 0.9rem; font-weight: 600; border: none; cursor: pointer; transition: all 0.2s; text-align: center; }
.btn-primary { background: linear-gradient(135deg, var(--pink-400), var(--pink-500)); color: #fff; box-shadow: 0 2px 8px rgba(233, 62, 140, 0.25); }
.btn-primary:hover { background: linear-gradient(135deg, var(--pink-500), var(--pink-600)); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(233, 62, 140, 0.35); }
.btn-success { background: #10b981; color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-outline { background: #fff; color: var(--pink-500); border: 2px solid var(--pink-200); }
.btn-outline:hover { border-color: var(--pink-400); background: var(--pink-50); }
.btn-block { width: 100%; }
.btn-sm { padding: 0.35rem 0.9rem; font-size: 0.8rem; }

/* --- Auth Pages --- */
.auth-container { display: flex; justify-content: center; align-items: center; min-height: 60vh; padding: 2rem 0; }
.auth-card { background: var(--card-bg); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 2.5rem 2rem; width: 100%; max-width: 420px; text-align: center; }
.auth-card h1 { font-family: 'Dancing Script', cursive; font-size: 2.2rem; color: var(--pink-600); margin-bottom: 0.25rem; }
.auth-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

.auth-form .form-group { margin-bottom: 1rem; text-align: left; }
.auth-form label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; color: var(--text-light); }
.auth-form input { width: 100%; padding: 0.7rem 0.9rem; border: 2px solid var(--pink-100); border-radius: var(--radius-xs); font-size: 0.95rem; transition: border-color 0.2s; font-family: inherit; }
.auth-form input:focus { outline: none; border-color: var(--pink-400); box-shadow: 0 0 0 3px rgba(233, 62, 140, 0.1); }
.auth-form button { margin-top: 0.75rem; }
.auth-switch { margin-top: 1.25rem; font-size: 0.85rem; color: var(--text-muted); }

/* --- Forms --- */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--text-light); }
.form-group textarea, .form-group input[type="text"], .form-group input[type="url"], .form-group input[type="email"] {
    width: 100%; padding: 0.7rem 0.9rem; border: 2px solid var(--pink-100); border-radius: var(--radius-xs);
    font-size: 0.95rem; font-family: inherit; transition: border-color 0.2s; background: #fff;
}
.form-group textarea:focus, .form-group input:focus { outline: none; border-color: var(--pink-400); box-shadow: 0 0 0 3px rgba(233, 62, 140, 0.1); }

/* Photo upload */
.photo-upload-zone {
    border: 2px dashed var(--pink-200); border-radius: var(--radius-sm);
    padding: 2rem; text-align: center; cursor: pointer; transition: all 0.2s;
    background: var(--pink-50);
}
.photo-upload-zone:hover { border-color: var(--pink-400); background: var(--pink-100); }
.photo-upload-zone p { color: var(--text-muted); font-size: 0.9rem; }
.photo-preview-img { max-width: 200px; border-radius: var(--radius-sm); margin-top: 0.75rem; box-shadow: var(--shadow-sm); }

/* --- Comments --- */
.comments-section { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--pink-100); }
.comments-section h3 { font-size: 1.1rem; color: var(--pink-500); margin-bottom: 1rem; }

.comment { padding: 1rem 0; border-bottom: 1px solid var(--pink-50); }
.comment:last-child { border-bottom: none; }
.comment-header { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.comment-author { font-weight: 600; font-size: 0.9rem; color: var(--pink-500); }
.comment-time { font-size: 0.75rem; color: var(--text-muted); }
.comment-body { font-size: 0.9rem; color: var(--text); line-height: 1.5; }

.comment-form { margin-top: 1.25rem; display: flex; gap: 0.5rem; }
.comment-form input { flex: 1; padding: 0.6rem 0.9rem; border: 2px solid var(--pink-100); border-radius: var(--radius-xs); font-size: 0.9rem; font-family: inherit; }
.comment-form input:focus { outline: none; border-color: var(--pink-400); }
.comment-form button { flex-shrink: 0; }

/* --- Post Detail --- */
.post-detail { max-width: 720px; margin: 0 auto; }
.post-detail .post-card { box-shadow: var(--shadow); }
.post-detail-photo { width: 100%; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.post-detail-message { font-size: 1.05rem; line-height: 1.8; margin-bottom: 1.5rem; }
.post-detail-video { margin-bottom: 1.5rem; }
.post-detail-video iframe { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius-sm); border: none; }
.post-detail-meta { font-size: 0.85rem; color: var(--text-muted); display: flex; gap: 1.5rem; flex-wrap: wrap; }
.back-link { display: inline-block; margin-bottom: 1.5rem; font-size: 0.9rem; }

/* --- Card (generic) --- */
.card { background: var(--card-bg); border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow-sm); margin-bottom: 1rem; }

/* --- Tables (admin) --- */
.admin-table { width: 100%; border-collapse: collapse; background: var(--card-bg); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.admin-table th, .admin-table td { padding: 0.85rem 1rem; text-align: left; font-size: 0.9rem; }
.admin-table th { background: var(--pink-50); color: var(--pink-600); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-table tr { border-bottom: 1px solid var(--pink-50); }
.admin-table tr:last-child { border-bottom: none; }
.admin-table tr:hover { background: var(--pink-50); }

/* --- Moderate Queue --- */
.moderate-card { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; }
.moderate-actions { display: flex; gap: 0.75rem; }
.moderate-actions form { display: inline; }

/* --- Empty State --- */
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state .empty-emoji { font-size: 3rem; margin-bottom: 0.75rem; }
.empty-state p { font-size: 1.05rem; }

/* --- Admin Content Form --- */
.content-form { max-width: 640px; }
.content-form textarea { min-height: 120px; }

/* --- Footer --- */
.footer { text-align: center; padding: 1.5rem; color: var(--text-muted); font-size: 0.85rem; border-top: 1px solid var(--pink-100); background: var(--card-bg); margin-top: auto; }

/* --- Page heading --- */
.page-heading { font-family: 'Dancing Script', cursive; font-size: 2rem; color: var(--pink-600); margin-bottom: 1.5rem; }

/* --- Responsive nav --- */
@media (max-width: 768px) {
    .nav-toggle { display: block; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: var(--nav-height); left: 0; right: 0; background: #fff; border-bottom: 2px solid var(--pink-100); padding: 1rem; gap: 0.25rem; box-shadow: var(--shadow-lg); }
    .nav-links.open { display: flex; }
    .nav-link { padding: 0.6rem 1rem; width: 100%; }
    .hero h1 { font-size: 2rem; }
    .hero { padding: 2rem 1rem; }
}
