/* ============================================
   GAMELIB — MINIMAL TERMINAL THEME
   Remplace le bloc <style> dans index.php
   et game.php
   ============================================ */

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

:root {
    --bg:      #f8f8f8;
    --bg2:     #ffffff;
    --bg3:     #f0f0f0;
    --accent:  #00aa55;
    --text:    #1a1a1a;
    --dim:     #888;
    --border:  #e0e0e0;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

/* ── HEADER ── */
#header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-name {
    font-weight: 700;
    font-size: 15px;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.site-name span { color: var(--text); }

.header-nav { display: flex; gap: 2px; flex-wrap: wrap; flex: 1; }

.nav-link {
    color: var(--dim);
    text-decoration: none;
    font-size: 13px;
    padding: 3px 8px;
    border-bottom: 1px solid transparent;
    transition: all 0.1s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.header-user { color: var(--dim); font-size: 12px; }

.header-btn {
    color: var(--dim);
    font-size: 12px;
    background: none;
    border: 1px solid var(--border);
    padding: 3px 10px;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.1s;
}

.header-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── FILTERS ── */
.filters {
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-link {
    font-size: 12px;
    padding: 2px 10px;
    text-decoration: none;
    color: var(--dim);
    border: 1px solid transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    transition: all 0.1s;
}

.filter-link:hover { color: var(--text); }

.filter-link.active {
    color: var(--accent);
    border-color: var(--accent);
}

/* ── SUBMIT CTA ── */
.submit-cta {
    padding: 7px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    color: var(--dim);
}

.submit-cta a {
    color: var(--accent);
    text-decoration: none;
}

.submit-cta a:hover { text-decoration: underline; }

/* ── GAME ROW ── */
#gamelist {}

.game-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.1s;
}

.game-row:hover { background: rgba(0,255,136,0.03); }

.rank {
    min-width: 22px;
    text-align: right;
    color: var(--dim);
    font-size: 11px;
    padding-top: 3px;
    flex-shrink: 0;
}

/* ── VOTE ── */
.vote-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    background: none;
    border: 1px solid var(--border);
    padding: 3px 7px;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
    transition: all 0.15s;
    color: var(--dim);
    min-width: 34px;
}

.vote-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.vote-btn.voted {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0,255,136,0.05);
}

.vote-arrow { font-size: 13px; line-height: 1; }
.vote-count { font-size: 11px; font-weight: 700; line-height: 1; }

/* ── GAME INFO ── */
.game-info { flex: 1; min-width: 0; }

.game-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    display: block;
    margin-bottom: 2px;
    transition: color 0.1s;
}

.game-title:hover { color: var(--accent); }
.game-title:visited { color: #999; }

.game-meta {
    font-size: 12px;
    color: var(--dim);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.cat-badge {
    font-size: 11px;
    padding: 1px 6px;
    border: 1px solid var(--border);
    color: var(--dim);
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    transition: all 0.1s;
}

.cat-badge:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.game-desc {
    font-size: 12px;
    color: var(--dim);
    margin-top: 3px;
    line-height: 1.5;
}

/* ── PAGINATION ── */
.pagination {
    padding: 14px 16px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}

.page-link {
    font-size: 12px;
    padding: 3px 10px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--dim);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    transition: all 0.1s;
}

.page-link:hover,
.page-link.active {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── EMPTY ── */
.empty {
    padding: 60px 20px;
    text-align: center;
    color: var(--dim);
}

.empty a { color: var(--accent); text-decoration: none; }

/* ── FOOTER ── */
footer {
    padding: 16px;
    font-size: 12px;
    color: var(--dim);
    border-top: 1px solid var(--border);
    text-align: center;
}

footer a { color: var(--dim); text-decoration: none; }
footer a:hover { color: var(--accent); }

/* ── GAME.PHP — fiche individuelle ── */
.container { max-width: 740px; margin: 0 auto; padding: 20px 16px; }

.game-header { margin-bottom: 20px; }

h1.game-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    line-height: 1.3;
}

.game-desc-full {
    font-size: 13px;
    color: var(--dim);
    line-height: 1.7;
    margin-bottom: 16px;
}

.actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.play-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--accent);
    color: #0d0d0d;
    border: none;
    padding: 9px 22px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    transition: opacity 0.15s;
}

.play-btn:hover { opacity: 0.85; }

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 18px 0;
}

/* ── COMMENTS ── */
.comments-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dim);
}

.comment-box {
    border-left: 2px solid var(--border);
    padding: 8px 12px;
    margin-bottom: 10px;
    transition: border-color 0.1s;
}

.comment-box:hover { border-left-color: var(--accent); }

.comment-meta {
    font-size: 11px;
    color: var(--dim);
    margin-bottom: 4px;
}

.comment-meta strong { color: var(--text); }

.comment-body {
    font-size: 13px;
    color: var(--text);
    line-height: 1.6;
}

.comment-form { margin-top: 16px; }

textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    background: var(--bg2);
    color: var(--text);
     font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 12px;
    resize: vertical;
    min-height: 70px;
    outline: none;
    transition: border-color 0.15s;
}

textarea:focus { border-color: var(--accent); }

.comment-submit {
    margin-top: 8px;
    background: none;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 7px 18px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
     font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    transition: all 0.1s;
}

.comment-submit:hover {
    background: var(--accent);
    color: #0d0d0d;
}

.comment-msg { font-size: 11px; color: var(--dim); margin-top: 6px; }

/* ── SIDEBAR ── */
.layout {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 24px;
}

.similar-title {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 10px;
}

.similar-list { display: flex; flex-direction: column; }

.similar-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: var(--text);
    font-size: 12px;
    transition: color 0.1s;
}

.similar-item:hover { color: var(--accent); }
.similar-votes { color: var(--dim); font-size: 11px; }

/* ── SUBMIT.PHP ── */
.submit-container { max-width: 520px; margin: 0 auto; padding: 32px 16px; }

.submit-container h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--accent);
}

.submit-subtitle {
    font-size: 12px;
    color: var(--dim);
    margin-bottom: 24px;
    line-height: 1.6;
}

.rules {
    border-left: 2px solid var(--border);
    padding: 10px 14px;
    margin-bottom: 22px;
    font-size: 11px;
    color: var(--dim);
    line-height: 1.8;
}

.rules strong { color: var(--text); }

.field { margin-bottom: 18px; }

label {
    display: block;
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 6px;
}

.hint { font-size: 11px; color: var(--dim); margin-bottom: 5px; }

input[type=text],
input[type=url],
input[type=email],
input[type=password],
select {
    width: 100%;
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    outline: none;
    transition: border-color 0.15s;
}

input:focus, select:focus { border-color: var(--accent); }
select option { background: var(--bg2); }

.char-count { font-size: 10px; color: var(--dim); text-align: right; margin-top: 3px; }
.char-count.warn { color: #ff4444; }

.submit-btn {
    width: 100%;
    background: var(--accent);
    color: #0d0d0d;
    border: none;
    padding: 13px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
     font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    margin-top: 6px;
    transition: opacity 0.15s;
}

.submit-btn:hover { opacity: 0.85; }
.submit-btn:disabled { opacity: 0.3; cursor: not-allowed; }

.msg {
    margin-top: 14px;
    padding: 10px 14px;
    font-size: 12px;
    text-align: center;
    display: none;
    border-left: 2px solid;
}

.msg.ok  { border-color: var(--accent); color: var(--accent); background: rgba(0,255,136,0.05); }
.msg.err { border-color: #ff4444;       color: #ff4444;       background: rgba(255,68,68,0.05); }

/* ── AUTH WALL ── */
.auth-wall {
    border: 1px solid var(--border);
    padding: 28px 20px;
    margin-top: 40px;
    text-align: center;
}

.auth-wall h3 { font-size: 16px; margin-bottom: 6px; color: var(--accent); }
.auth-wall p  { color: var(--dim); font-size: 12px; margin-bottom: 20px; }

.auth-tabs { display: flex; gap: 8px; margin-bottom: 16px; }

.auth-tab {
    flex: 1; padding: 8px; font-size: 12px;
    font-weight: 700; cursor: pointer;
    border: 1px solid var(--border);
    background: transparent; color: var(--dim);
   font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    transition: all 0.1s;
}

.auth-tab.active {
    border-color: var(--accent);
    color: var(--accent);
}

.auth-input {
    width: 100%;
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    font-size: 13px;
     font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    outline: none;
    margin-bottom: 8px;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.auth-input:focus { border-color: var(--accent); }

.auth-btn {
    width: 100%; padding: 11px;
    background: var(--accent); color: #0d0d0d;
    border: none; font-size: 13px; font-weight: 700;
    cursor: pointer; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    margin-top: 4px; transition: opacity 0.15s;
}

.auth-btn:hover { opacity: 0.85; }

.auth-msg { font-size: 12px; color: #ff4444; text-align: center; min-height: 16px; margin: 6px 0; }
.auth-msg.ok { color: var(--accent); }

/* ── RESPONSIVE ── */
@media (max-width: 600px) {
    .layout { grid-template-columns: 1fr; }
  /*  .game-desc { display: none; }*/
    .header-nav { display: none; }
}
