/* =============================================
   SelectMatch — Global Stylesheet
   Dark luxury editorial theme
   Cormorant Garamond + Raleway
   Matches home.css design system
============================================= */

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

:root {
    /* Core palette */
    --gold:          #c9a96e;
    --gold-light:    #e8d5a3;
    --gold-dark:     #a07840;
    --dark:          #0e0b08;
    --dark2:         #1a1410;
    --dark3:         #241e17;
    --dark4:         #2e2620;
    --cream:         #f8f3ec;
    --cream2:        #ede4d8;
    --border:        rgba(201,169,110,0.18);
    --border-light:  rgba(201,169,110,0.08);

    /* Semantic */
    --bg:            #141009;
    --surface:       #1e1810;
    --surface2:      #261f16;
    --text:          #e8ddd0;
    --text-muted:    #a89078;
    --text-light:    #6a5a48;
    --primary:       #c9a96e;
    --primary-dark:  #a07840;
    --success:       #4a9e6e;
    --warning:       #c9962e;
    --info:          #4a82a8;
    --danger:        #b04040;

    /* Type */
    --font-display: 'Cormorant Garamond', Georgia, serif;
    --font-body:    'Raleway', 'Trebuchet MS', sans-serif;

    /* Shape */
    --radius:    4px;
    --radius-sm: 2px;
    --shadow:    0 2px 16px rgba(0,0,0,0.35);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.5);
    --transition: 0.22s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-light); text-decoration: none; }

/* =============================================
   LAYOUT
============================================= */
.container    { width: 100%; max-width: 900px;  margin: 0 auto; padding: 0 20px; }
.container-sm { max-width: 560px; }
.container-lg { max-width: 1100px; }

/* =============================================
   SITE HEADER (inner pages)
============================================= */
.site-header {
    background: rgba(14,11,8,0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}
.site-header .inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 900px;
    margin: 0 auto;
    height: 58px;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 0;
}
.site-logo {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 2px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-logo .mark { color: var(--gold); }
.header-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: center; }
.header-nav a {
    color: rgba(255,255,255,0.55);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: color var(--transition);
    white-space: nowrap;
}
.header-nav a:hover { color: var(--gold); }

/* =============================================
   TABS
============================================= */
.tabs { margin: 0; }
.tab-list {
    display: flex;
    list-style: none;
    background: var(--dark2);
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tab-list li {
    padding: 14px 24px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    user-select: none;
    transition: all var(--transition);
    flex-shrink: 0;
}
.tab-list li.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
    background: var(--surface);
}
.tab-list li:hover:not(.active) {
    color: var(--gold-light);
    background: rgba(201,169,110,0.06);
}
.tab-content { display: none; padding: 20px 0; }
.tab-content.active { display: block; }

/* =============================================
   CARDS
============================================= */
.card {
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}
.card-header {
    background: linear-gradient(135deg, var(--dark3) 0%, var(--dark4) 100%);
    border-bottom: 1px solid var(--border);
    color: var(--gold);
    padding: 13px 18px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 1px;
}
.card-body { padding: 18px; }

/* =============================================
   PROFILE PHOTOS
============================================= */
.profile-photos { display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.photo-box {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--dark3);
    cursor: pointer;
    transition: box-shadow var(--transition), border-color var(--transition);
    flex-shrink: 0;
}
.photo-box:hover { box-shadow: var(--shadow-lg); border-color: var(--gold); }
.photo-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 0.75rem;
    text-align: center;
    padding: 10px;
    gap: 6px;
}
.photo-faceshot     { width: 140px; height: 160px; }
.photo-fullshot     { width: 100px; height: 290px; }
.photo-faceshot img { width: 140px; height: 160px; object-fit: cover; }
.photo-fullshot img { width: 100px; height: 290px; object-fit: cover; }

/* =============================================
   INFO TABLE
============================================= */
.info-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.info-table tr { border-bottom: 1px solid var(--border-light); }
.info-table tr:last-child { border-bottom: none; }
.info-table td { padding: 9px 10px; vertical-align: middle; }
.info-table .label {
    color: var(--text-light);
    width: 36%;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.info-table .value { color: var(--text); }
.info-table .action { text-align: right; width: 72px; }
.section-title {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    padding: 8px 10px 6px;
    background: var(--dark3);
    border-bottom: 1px solid var(--border);
}

/* =============================================
   BUTTONS
============================================= */
.btn {
    display: inline-block;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
    white-space: nowrap;
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}
.btn-primary   { background: var(--gold);    color: var(--dark); }
.btn-primary:hover { background: var(--gold-light); color: var(--dark); text-decoration: none; }
.btn-secondary { background: var(--gold-dark); color: #fff; }
.btn-secondary:hover { background: var(--gold); color: var(--dark); text-decoration: none; }
.btn-outline   { background: transparent; color: var(--gold); border: 1px solid var(--gold); }
.btn-outline:hover { background: var(--gold); color: var(--dark); text-decoration: none; }
.btn-success   { background: var(--success); color: #fff; }
.btn-success:hover { background: #3a8e5e; text-decoration: none; }
.btn-danger    { background: var(--danger);  color: #fff; }
.btn-danger:hover { background: #903030; text-decoration: none; }
.btn-ghost     { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.btn-wa        { background: #25D366; color: #fff; }
.btn-wa:hover  { background: #1da851; text-decoration: none; }
.btn-sm        { padding: 5px 12px; font-size: 0.68rem; }

/* =============================================
   FORMS
============================================= */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}
.form-control {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--dark3);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    -webkit-appearance: none;
    appearance: none;
}
.form-control::placeholder { color: var(--text-light); }
.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,169,110,0.12);
}
textarea.form-control { resize: vertical; min-height: 80px; }
select.form-control {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23a07840' d='M5 6L0 0h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.form-hint { font-size: 0.72rem; color: var(--text-light); margin-top: 5px; line-height: 1.5; }
.form-row  { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; min-width: 0; }
@media (max-width: 480px) { .form-row { flex-direction: column; gap: 0; } }

/* =============================================
   STATS GRID
============================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.stat-box {
    background: var(--dark3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px 12px;
    text-align: center;
}
.stat-num   { font-size: 1.7rem; font-weight: 300; color: var(--gold); font-family: var(--font-display); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 0.65rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; }

/* =============================================
   INBOX / MESSAGES
============================================= */
.inbox-toolbar { display: flex; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--border); margin-bottom: 14px; flex-wrap: wrap; }
.inbox-toggle.active { background: var(--gold); color: var(--dark); border-color: var(--gold); }
.msg-item {
    background: var(--surface);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color var(--transition);
}
.msg-item:hover { border-color: rgba(201,169,110,0.35); }
.msg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 13px 16px;
    cursor: pointer;
    gap: 8px;
}
.msg-header:hover { background: var(--dark3); }
.msg-from { font-weight: 500; font-size: 0.9rem; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-width: 0; color: var(--text); }
.msg-badge { font-size: 0.65rem; padding: 2px 8px; border-radius: 20px; background: var(--gold); color: var(--dark); font-weight: 700; letter-spacing: 0.5px; flex-shrink: 0; }
.msg-badge.read { background: var(--dark4); color: var(--text-light); }
.msg-body { padding: 16px; border-top: 1px solid var(--border-light); display: none; }
.msg-body.open { display: block; }
.msg-body p { margin-bottom: 10px; color: var(--text); font-size: 0.9rem; }
.match-bar { background: var(--dark3); border-radius: 2px; height: 4px; margin: 5px 0 10px; overflow: hidden; }
.match-bar-fill { background: linear-gradient(90deg, var(--gold-dark), var(--gold)); height: 100%; border-radius: 2px; transition: width 0.6s ease; width: 0%; }
.match-pct { font-size: 0.8rem; color: var(--text-muted); }
.msg-actions { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--border-light); background: var(--dark3); }
.reply-box { padding: 14px 16px; border-top: 1px solid var(--border-light); background: var(--dark2); }

/* =============================================
   MODAL
============================================= */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s;
    padding: 16px;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-content { position: relative; max-width: 95vw; max-height: 95vh; }
.modal-content img { max-width: 90vw; max-height: 88vh; object-fit: contain; border-radius: var(--radius); }
.modal-close {
    position: absolute; top: -14px; right: -14px;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--gold); color: var(--dark);
    border: none; font-size: 1rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
}

/* =============================================
   INVITE BOX
============================================= */
.invite-box {
    background: var(--dark3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin: 14px 0;
}
.invite-link-row { display: flex; gap: 8px; margin-top: 10px; }
.invite-link-row input { flex: 1; font-size: 0.78rem; min-width: 0; }

/* =============================================
   ALERTS
============================================= */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 14px;
    font-size: 0.85rem;
    border-left: 3px solid;
    line-height: 1.55;
}
.alert-success { background: rgba(74,158,110,0.12); color: #6dcf9a; border-color: var(--success); }
.alert-danger  { background: rgba(176,64,64,0.12);  color: #d98080; border-color: var(--danger); }
.alert-info    { background: rgba(74,130,168,0.12); color: #80b8d9; border-color: var(--info); }
.alert-warning { background: rgba(201,150,46,0.12); color: #d4a84b; border-color: var(--warning); }

/* =============================================
   NICKNAME BADGE
============================================= */
.nickname-badge {
    text-align: center;
    padding: 16px 8px 8px;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--gold);
    letter-spacing: 2px;
}

/* =============================================
   PUBLIC PROFILE / MATCH VIEW
============================================= */
.public-profile-card { max-width: 600px; margin: 16px auto; }
.send-msg-box {
    background: var(--dark3);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-top: 16px;
}

/* =============================================
   FOOTER
============================================= */
.site-footer {
    background: var(--dark);
    border-top: 1px solid var(--border-light);
    padding: 24px 20px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-light);
    letter-spacing: 0.5px;
    margin-top: 40px;
}
.site-footer a { color: var(--gold); }
.site-footer a:hover { color: var(--gold-light); }
.site-footer .footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    justify-content: center;
    margin-bottom: 10px;
}

/* =============================================
   AD SLOT
============================================= */
.ad-slot {
    background: var(--dark3);
    border: 1px dashed var(--border);
    min-height: 90px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-light);
    font-size: 0.75rem;
    border-radius: var(--radius-sm);
    margin: 16px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* =============================================
   CROP TOOL
============================================= */
.crop-wrap { position: relative; display: inline-block; cursor: crosshair; user-select: none; max-width: 100%; }
.crop-wrap img { display: block; max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.crop-overlay { position: absolute; border: 1px dashed var(--gold); background: rgba(201,169,110,0.08); pointer-events: none; }
.preview-row { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-top: 12px; }
.preview-box { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; background: var(--dark3); flex-shrink: 0; }

/* =============================================
   HOMEPAGE CARDS (used by home.css too)
============================================= */
.home-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 700px;
    margin: 0 auto 24px;
}
@media (min-width: 560px) { .home-cards { grid-template-columns: 1fr 1fr; } }
.home-hero { text-align: center; margin-bottom: 28px; padding: 0 8px; }
.home-hero h1 { font-family: var(--font-display); font-size: clamp(1.8rem, 6vw, 2.8rem); color: var(--gold); margin-bottom: 8px; font-weight: 300; letter-spacing: 2px; }
.home-tagline { font-size: clamp(0.9rem, 3vw, 1.1rem); color: var(--text-muted); font-weight: 300; }
.how-steps { display: grid; grid-template-columns: 1fr; gap: 16px; text-align: center; }
@media (min-width: 480px) { .how-steps { grid-template-columns: repeat(3, 1fr); } }
.how-icon  { font-size: 1.8rem; margin-bottom: 8px; }
.how-title { font-family: var(--font-display); font-size: 1.1rem; color: var(--gold); margin-bottom: 4px; }
.how-desc  { font-size: 0.82rem; color: var(--text-muted); font-weight: 300; }

/* =============================================
   SPINNER
============================================= */
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid rgba(201,169,110,0.2); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* =============================================
   SCROLLBAR
============================================= */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--dark2); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 2px; }

/* =============================================
   UTILITIES
============================================= */
.text-center  { text-align: center; }
.text-muted   { color: var(--text-muted); }
.text-sm      { font-size: 0.82rem; }
.text-danger  { color: #d98080; }
.text-success { color: #6dcf9a; }
.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; }
.w-100 { width: 100%; }
.d-block { display: block; }
.hidden { display: none !important; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.gap-1 { gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
