/* ============================================
   COITOS.INFO — minimal.css
   Diseño limpio, tipografía clara, sin ruido
   ============================================ */

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

:root {
    --bg:        #f7f6f3;
    --surface:   #ffffff;
    --border:    #e2e0db;
    --border2:   #d0cdc6;
    --text:      #1a1917;
    --text-mid:  #6b6860;
    --text-dim:  #a09d98;
    --accent:    #1a1917;
    --accent-r:  #c0392b;
    --link:      #1a1917;
    --green:     #2d6a4f;
    --yellow:    #b8860b;
    --font-sans: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'DM Mono', 'Courier New', monospace;
    --radius:    4px;
    --shadow:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
}

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

html { font-size: 15px; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--link); }
a:hover { opacity: 0.65; }

/* ── NAV ─────────────────────────────────── */
.site-nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: var(--text);
}

.nav-logo span { color: var(--text-dim); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-btn {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 400;
    color: var(--text-mid);
    text-decoration: none;
    padding: 5px 10px;
    border-radius: var(--radius);
    transition: background 0.15s, color 0.15s;
    white-space: nowrap;
}

.nav-btn:hover { background: var(--bg); color: var(--text); opacity: 1; }
.nav-btn.active { color: var(--text); font-weight: 500; }
.nav-btn.cta {
    background: var(--text);
    color: #fff;
    font-weight: 500;
}
.nav-btn.cta:hover { background: #333; opacity: 1; }

/* ── LAYOUT ──────────────────────────────── */
.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    display: grid;
    grid-template-columns: 1fr 300px;
    grid-template-rows: auto;
    gap: 24px;
}

.col-main  { min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.col-side  { display: flex; flex-direction: column; gap: 16px; }

@media (max-width: 780px) {
    .page { grid-template-columns: 1fr; }
    .col-side { order: -1; }
}

/* ── CARD ────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.card-head {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-head h2 {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-mid);
    font-family: var(--font-mono);
}

.card-body { padding: 16px; }

/* ── HERO ────────────────────────────────── */
.hero {
    padding: 20px 0 4px;
}

.hero-title {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-bottom: 10px;
}

.hero-title span { color: var(--text-dim); }

.hero-sub {
    font-size: 14px;
    color: var(--text-mid);
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hero-sub a { color: var(--text-mid); }

.dot-sep { color: var(--border2); }

/* ── IMAGE ───────────────────────────────── */
.jordi-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    filter: grayscale(20%);
}

/* ── TWITCH ──────────────────────────────── */
.twitch-wrap {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}
.twitch-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--accent-r);
}

.live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-r);
    animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* ── NEWS ────────────────────────────────── */
.news-list { display: flex; flex-direction: column; }

.news-item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13.5px;
}
.news-item:last-child { border-bottom: none; }

.news-date {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    white-space: nowrap;
}

/* ── SIDEBAR FORMS ───────────────────────── */
.form-input {
    display: block;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg);
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s;
    margin-bottom: 8px;
}
.form-input:focus { border-color: var(--text); background: var(--surface); }
.form-input::placeholder { color: var(--text-dim); }

.btn {
    display: block;
    width: 100%;
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
    margin-bottom: 6px;
}
.btn:hover { background: var(--bg); opacity: 1; }

.btn-primary {
    background: var(--text);
    border-color: var(--text);
    color: #fff;
}
.btn-primary:hover { background: #333; border-color: #333; }

.btn-sso {
    border-color: var(--text);
    font-size: 12px;
    color: var(--text-mid);
}

.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0;
    font-size: 11px;
    color: var(--text-dim);
    font-family: var(--font-mono);
}
.divider::before, .divider::after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--border);
}

.widget-msg {
    font-size: 12px;
    font-family: var(--font-mono);
    margin-top: 6px;
    min-height: 16px;
}
.widget-msg.error   { color: var(--accent-r); }
.widget-msg.success { color: var(--green); }

/* ── STATUS ──────────────────────────────── */
.status-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    font-size: 12.5px;
}
.status-row:last-child { border-bottom: none; }

.status-label { color: var(--text-mid); font-family: var(--font-mono); font-size: 11px; }

.status-val { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.status-val.ok   { color: var(--green); }
.status-val.warn { color: var(--yellow); }

/* ── GUESTBOOK ───────────────────────────── */
.gb-entry {
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-mid);
    line-height: 1.4;
}
.gb-entry:last-of-type { border-bottom: none; margin-bottom: 10px; }
.gb-entry strong { color: var(--text); font-weight: 500; }

/* ── FOOTER ──────────────────────────────── */
.site-footer {
    border-top: 1px solid var(--border);
    padding: 20px 24px;
    text-align: center;
}

.site-footer p {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-dim);
    line-height: 1.8;
}

/* ── AUTH PAGES ──────────────────────────── */
.auth-wrap {
    max-width: 400px;
    margin: 60px auto;
    padding: 0 24px;
}

.auth-wrap .card-body { padding: 24px; }

.auth-title {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 400;
    margin-bottom: 6px;
}

.auth-sub {
    font-size: 13px;
    color: var(--text-mid);
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.form-group { margin-bottom: 12px; }

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-mid);
    margin-bottom: 4px;
    font-family: var(--font-mono);
}

.form-error, .form-success {
    font-family: var(--font-mono);
    font-size: 12px;
    padding: 8px 10px;
    border-radius: var(--radius);
    margin-bottom: 12px;
    display: none;
}
.form-error   { background: #fdf0f0; border: 1px solid #f5c6c6; color: var(--accent-r); }
.form-success { background: #f0fdf4; border: 1px solid #bbf7d0; color: var(--green); }

.auth-links {
    text-align: center;
    margin-top: 14px;
    font-size: 13px;
    color: var(--text-mid);
}

/* password strength */
.pw-strength { height: 3px; background: var(--border); border-radius: 2px; margin-top: 4px; overflow: hidden; }
.pw-strength-bar { height: 100%; width: 0; transition: width 0.3s, background 0.3s; border-radius: 2px; }
.pw-hint { font-size: 11px; font-family: var(--font-mono); color: var(--text-dim); margin-top: 3px; }

/* checkbox */
.check-label {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    font-size: 13px;
    color: var(--text-mid);
    cursor: pointer;
    line-height: 1.4;
}
.check-label input { margin-top: 3px; flex-shrink: 0; accent-color: var(--text); }

/* spinner */
.spinner {
    display: inline-block;
    width: 11px; height: 11px;
    border: 2px solid var(--border);
    border-top-color: var(--text);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 5px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* dashboard */
.dash-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 24px 64px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
@media (max-width: 700px) { .dash-wrap { grid-template-columns: 1fr; } }

/* ── MODO OSCURO ─────────────────────────────────────────── */
[data-theme="dark"] {
    --bg:        #111110;
    --surface:   #1c1c1a;
    --border:    #2e2e2b;
    --border2:   #3a3a36;
    --text:      #e8e6e1;
    --text-mid:  #9a9890;
    --text-dim:  #5a5855;
    --accent:    #e8e6e1;
    --link:      #e8e6e1;
    --shadow:    0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
}

[data-theme="dark"] .nav-btn.cta {
    background: #e8e6e1;
    color: #111110;
}
[data-theme="dark"] .nav-btn.cta:hover { background: #ccc; }
[data-theme="dark"] .form-error   { background: #2a1515; border-color: #5a2020; }
[data-theme="dark"] .form-success { background: #0f2a1a; border-color: #1a5a30; }

/* ── DROPDOWN OPCIONES NAV ───────────────────────────────── */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: var(--radius);
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-mid);
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.15s;
}
.nav-dropdown-btn:hover { background: var(--bg); color: var(--text); }

.nav-dropdown-btn svg {
    width: 14px; height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.2s;
}
.nav-dropdown.open .nav-dropdown-btn svg { transform: rotate(180deg); }

.nav-dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 160px;
    z-index: 200;
    padding: 6px 0;
}
.nav-dropdown.open .nav-dropdown-menu { display: block; }

.nav-dropdown-section {
    padding: 6px 12px 4px;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.theme-options {
    display: flex;
    gap: 6px;
    padding: 4px 12px 8px;
}

.theme-opt {
    flex: 1;
    padding: 5px 0;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--text-mid);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
}
.theme-opt:hover { border-color: var(--border2); color: var(--text); }
.theme-opt.active {
    background: var(--text);
    color: var(--surface);
    border-color: var(--text);
}
