/* ============================================================
   SHAADI SORTED - Complete Stylesheet
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --pink: #E85D75;
    --pink-dark: #d63e58;
    --orange: #F4A261;
    --gold: #D4A574;
    --gold-dark: #B8860B;
    --teal: #2A9D8F;
    --dark: #264653;
    --light: #f9fafb;
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gradient: linear-gradient(135deg, #E85D75 0%, #F4A261 100%);
    --gradient-dark: linear-gradient(135deg, #d63e58 0%, #e8904d 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body: 'DM Sans', -apple-system, sans-serif;
    --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body { font-family: var(--font-body); font-size: 15px; line-height: 1.6; color: var(--gray-700); background: var(--light); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--pink); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--pink-dark); }

/* Typography */
h1, h2, h3, h4, h5 { font-family: var(--font-display); font-weight: 700; color: var(--dark); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: 1.5rem; }

/* Brand */
.brand-link { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-logo { height: 42px; width: auto; }
.brand-text {
    font-family: var(--font-display);
    font-weight: 700; font-size: 1.6rem; font-style: italic; letter-spacing: 0.5px;
    background: linear-gradient(135deg, #C2185B 0%, #E91E63 35%, #D4A574 75%, #B8860B 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; color: transparent;
}

/* ============================================================
   NAVIGATION (shared across all pages)
   ============================================================ */
.top-nav {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 10px 0;
    position: sticky; top: 0; z-index: 1000;
    border-bottom: 1px solid var(--gray-100);
}
.top-nav .container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; width: 100%; min-height: 50px; }
.nav-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.nav-links a, .nav-links button {
    font-family: var(--font-body); font-weight: 500; font-size: 14px; padding: 8px 16px;
    border-radius: 8px; color: var(--gray-600); background: none; border: none; cursor: pointer;
    transition: var(--transition); text-decoration: none;
}
.nav-links a:hover, .nav-links button:hover { color: var(--pink); background: rgba(232,93,117,0.06); }
.nav-links a.active { color: var(--pink); background: rgba(232,93,117,0.08); }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 8px; font-family: var(--font-body); font-weight: 600; font-size: 14px; border: none; cursor: pointer; transition: var(--transition); text-decoration: none; line-height: 1.4; }
.btn-primary { background: var(--gradient); color: var(--white); }
.btn-primary:hover { box-shadow: 0 6px 16px rgba(232,93,117,0.35); transform: translateY(-1px); color: var(--white); }
.btn-outline { background: transparent; border: 2px solid var(--pink); color: var(--pink); }
.btn-outline:hover { background: var(--pink); color: var(--white); }
.btn-secondary { background: var(--gray-100); color: var(--gray-700); }
.btn-secondary:hover { background: var(--gray-200); }
.btn-danger { background: #fee2e2; color: #dc2626; }
.btn-danger:hover { background: #dc2626; color: white; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon { width: 36px; height: 36px; padding: 0; justify-content: center; border-radius: 8px; }

/* ============================================================
   CARDS & CONTAINERS
   ============================================================ */
.card {
    background: var(--white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow); border: 1px solid var(--gray-100);
    overflow: hidden; transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-header {
    padding: 20px 24px; border-bottom: 1px solid var(--gray-100);
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.card-header h3, .card-header h4, .card-header h5 { margin: 0; font-size: 1.15rem; }
.card-body { padding: 24px; }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--gray-100); background: var(--gray-50); }
.card-gradient { background: var(--gradient); color: var(--white); border: none; }
.card-gradient h3, .card-gradient h4, .card-gradient h5, .card-gradient p { color: var(--white); }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 20px; }
.form-label { display: block; font-weight: 600; color: var(--dark); margin-bottom: 8px; font-size: 14px; }
.form-control {
    width: 100%; padding: 10px 14px; border: 1.5px solid var(--gray-200); border-radius: 8px;
    font-family: var(--font-body); font-size: 15px; color: var(--gray-700);
    background: var(--white); transition: var(--transition);
}
.form-control:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px rgba(232,93,117,0.1); }
.form-control::placeholder { color: var(--gray-400); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint { font-size: 13px; color: var(--gray-500); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ============================================================
   ALERTS
   ============================================================ */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: 14px; display: flex; align-items: center; gap: 10px; }
.alert-success { background: #ecfdf5; color: #065f46; border-left: 4px solid var(--teal); }
.alert-error { background: #fef2f2; color: #991b1b; border-left: 4px solid #dc2626; }
.alert-info { background: #eff6ff; color: #1e40af; border-left: 4px solid #3b82f6; }

/* ============================================================
   BADGES
   ============================================================ */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 50px; font-size: 12px; font-weight: 600; }
.badge-pink { background: rgba(232,93,117,0.12); color: var(--pink); }
.badge-teal { background: rgba(42,157,143,0.12); color: var(--teal); }
.badge-orange { background: rgba(244,162,97,0.12); color: #c77a2a; }
.badge-gray { background: var(--gray-100); color: var(--gray-500); }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 28px; }
.stat-card { padding: 20px; border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow-sm); border-top: 4px solid var(--pink); transition: var(--transition); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-card.teal { border-top-color: var(--teal); }
.stat-card.orange { border-top-color: var(--orange); }
.stat-card.blue { border-top-color: #4A90E2; }
.stat-card .stat-value { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--dark); }
.stat-card .stat-label { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
/* Clickable stat cards: strip default link styling, keep card look, add affordance */
a.stat-card-link { display: block; text-decoration: none; color: inherit; cursor: pointer; }
a.stat-card-link:hover { text-decoration: none; }
a.stat-card-link:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th { font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--gray-500); padding: 12px 16px; text-align: left; border-bottom: 2px solid var(--gray-100); }
td { padding: 14px 16px; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
tr:hover td { background: var(--gray-50); }

/* ============================================================
   FUNCTION CARDS
   ============================================================ */
.func-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-100); transition: var(--transition); margin-bottom: 12px; }
.func-card:hover { border-color: var(--pink); box-shadow: var(--shadow); transform: translateX(4px); }
.func-card .emoji { font-size: 2rem; flex-shrink: 0; }
.func-card .func-info { flex: 1; min-width: 0; }
.func-card .func-info h5 { margin: 0 0 4px; font-size: 1.1rem; }
.func-card .func-info p { margin: 0; font-size: 13px; color: var(--gray-500); }
.func-card .func-actions { flex-shrink: 0; display: flex; gap: 8px; }

/* ============================================================
   OUTFIT GRID
   ============================================================ */
.outfit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.outfit-card { background: var(--white); border-radius: var(--radius); border: 1px solid var(--gray-100); overflow: hidden; transition: var(--transition); }
.outfit-card:hover { box-shadow: var(--shadow); }
.outfit-card img { width: 100%; height: 200px; object-fit: cover; background: var(--gray-100); }
.outfit-card .outfit-info { padding: 16px; }
.outfit-card .outfit-info h5 { margin: 0 0 4px; font-size: 1rem; }
.outfit-card .outfit-info p { margin: 0; font-size: 13px; color: var(--gray-500); }
.outfit-card .color-swatch { display: inline-block; width: 16px; height: 16px; border-radius: 4px; border: 1px solid var(--gray-200); vertical-align: middle; margin-right: 6px; }

/* ============================================================
   DISCUSSION / COMMENTS
   ============================================================ */
.comment-list { display: flex; flex-direction: column; gap: 12px; }
.comment { display: flex; gap: 12px; padding: 14px; border-radius: var(--radius); background: var(--gray-50); }
.comment .avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--gradient); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex-shrink: 0; }
.comment .comment-body { flex: 1; }
.comment .comment-body .name { font-weight: 600; font-size: 14px; color: var(--dark); }
.comment .comment-body .time { font-size: 12px; color: var(--gray-400); margin-left: 8px; }
.comment .comment-body .text { margin-top: 4px; font-size: 14px; line-height: 1.5; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state .icon { font-size: 3rem; margin-bottom: 16px; }
.empty-state h3 { font-size: 1.3rem; margin-bottom: 8px; }
.empty-state p { color: var(--gray-500); margin-bottom: 20px; }

/* ============================================================
   PAGE LAYOUTS
   ============================================================ */
.page-container { max-width: 1200px; margin: 0 auto; padding: 24px 20px; }
.page-header { margin-bottom: 28px; }
.page-header h1, .page-header h2 { margin-bottom: 4px; }
.page-header p { color: var(--gray-500); font-size: 15px; }
.page-split { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   HERO (Homepage)
   ============================================================ */
.hero {
    background: var(--gradient); color: var(--white); padding: 80px 0 60px;
    position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; top: -50%; right: -30%; width: 80%; height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 60%);
    pointer-events: none;
}
.hero h1 { color: var(--white); max-width: 600px; margin-bottom: 20px; }
.hero h1 span { color: var(--orange); }
.hero p { color: rgba(255,255,255,0.9); max-width: 520px; font-size: 17px; line-height: 1.7; margin-bottom: 32px; }
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-buttons .btn-white { background: var(--white); color: var(--dark); font-weight: 700; }
.hero-buttons .btn-white:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.hero-buttons .btn-ghost { background: transparent; border: 2px solid rgba(255,255,255,0.5); color: var(--white); }
.hero-buttons .btn-ghost:hover { background: rgba(255,255,255,0.15); border-color: var(--white); }

/* Sections */
.section { padding: 64px 0; }
.section-gray { background: var(--gray-50); }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title h2 { margin-bottom: 12px; }
.section-title p { color: var(--gray-500); font-size: 16px; }

/* Feature Cards */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.feature-card { padding: 28px; border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--gray-100); text-align: center; transition: var(--transition); }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--pink); }
.feature-card .icon { font-size: 2.5rem; margin-bottom: 16px; }
.feature-card h4 { font-size: 1.15rem; margin-bottom: 8px; }
.feature-card p { color: var(--gray-500); font-size: 14px; }

/* Functions Mini */
.functions-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.function-mini { text-align: center; padding: 20px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--gray-100); min-width: 130px; transition: var(--transition); }
.function-mini:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--pink); }
.function-mini .emoji { font-size: 2rem; display: block; margin-bottom: 8px; }
.function-mini h5 { font-size: 1rem; margin: 0 0 4px; }
.function-mini p { font-size: 12px; color: var(--gray-500); margin: 0; }

/* CTA */
.cta { background: var(--gradient); color: var(--white); padding: 64px 0; text-align: center; }
.cta h2, .cta p { color: var(--white); }
.cta p { opacity: 0.9; margin-bottom: 28px; }

/* Footer */
.site-footer { background: var(--dark); color: rgba(255,255,255,0.6); padding: 48px 0 32px; text-align: center; }
.footer-brand {
    font-family: var(--font-display); font-weight: 700; font-size: 1.8rem; font-style: italic;
    background: linear-gradient(135deg, #E91E63, #F4A261, #D4A574);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; margin-bottom: 4px;
}
.footer-tagline { font-family: var(--font-display); font-style: italic; font-size: 12px; color: rgba(255,255,255,0.4); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 16px; }
.site-footer p { margin-bottom: 8px; font-size: 14px; }
.site-footer a { color: var(--pink); }
.site-footer a:hover { color: var(--orange); }

/* ============================================================
   AUTH PAGES (Login, Register, Join)
   ============================================================ */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--gradient); padding: 20px; position: relative; overflow: hidden; }
.auth-page::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.1), transparent 60%); pointer-events: none; }
.auth-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 48px 40px; width: 100%; max-width: 440px; position: relative; z-index: 1; }
.auth-card .logo { text-align: center; margin-bottom: 28px; }
.auth-card .logo img { height: 80px; margin-bottom: 12px; }
.auth-card .logo h2 { font-size: 1.5rem; margin-bottom: 4px; }
.auth-card .logo p { color: var(--gray-500); font-size: 14px; }
.auth-footer { text-align: center; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--gray-100); font-size: 14px; color: var(--gray-500); }
.auth-footer a { font-weight: 600; }

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.legal-content { max-width: 800px; margin: 40px auto; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 48px; }
.legal-content h1 { font-size: 2rem; margin-bottom: 8px; }
.legal-content .updated { color: var(--gray-400); font-size: 14px; margin-bottom: 32px; padding-bottom: 20px; border-bottom: 2px solid var(--gray-100); }
.legal-content h2 { color: var(--pink); font-size: 1.3rem; margin: 32px 0 12px; }
.legal-content p, .legal-content li { color: var(--gray-600); line-height: 1.8; margin-bottom: 10px; }
.legal-content ul { padding-left: 24px; margin-bottom: 16px; }

/* ============================================================
   MODAL / OVERLAY
   ============================================================ */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.active { display: flex; }
.modal-box { background: var(--white); border-radius: var(--radius-lg); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-box .modal-header { padding: 20px 24px; background: var(--gradient); color: white; display: flex; align-items: center; justify-content: space-between; }
.modal-box .modal-header h3 { color: white; margin: 0; font-size: 1.2rem; }
.modal-box .modal-body { padding: 24px; }
.modal-box .modal-footer { padding: 16px 24px; border-top: 1px solid var(--gray-100); display: flex; justify-content: flex-end; gap: 12px; }
.modal-close { background: none; border: none; color: white; font-size: 24px; cursor: pointer; padding: 0; line-height: 1; }

/* ============================================================
   TABS
   ============================================================ */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--gray-100); margin-bottom: 24px; overflow-x: auto; }
.tab { padding: 10px 18px; font-weight: 600; font-size: 14px; color: var(--gray-500); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: var(--transition); background: none; border-top: none; border-left: none; border-right: none; }
.tab:hover { color: var(--pink); }
.tab.active { color: var(--pink); border-bottom-color: var(--pink); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .brand-text { font-size: 1.25rem; }
    .brand-logo { height: 34px; }
    .page-split { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .hero { padding: 50px 0 40px; text-align: center; }
    .hero p, .hero h1 { max-width: 100%; }
    .hero-buttons { justify-content: center; }
    .auth-card { padding: 32px 24px; }
    .legal-content { padding: 28px 20px; margin: 20px auto; }
    .nav-links { display: none; }
    .nav-toggle { display: block !important; }
    .nav-links.open { display: flex; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: white; box-shadow: var(--shadow); padding: 12px; z-index: 999; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .brand-text { font-size: 1.1rem; }
    .brand-logo { height: 30px; }
}

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; font-size: 24px; color: var(--gray-600); cursor: pointer; padding: 4px; }

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--gray-500); }
.text-pink { color: var(--pink); }
.text-teal { color: var(--teal); }
.text-sm { font-size: 13px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
