:root {
    --bg: #0b1120;
    --panel: #111827;
    --panel-2: #1f2937;
    --line: #374151;
    --text: #f9fafb;
    --muted: #9ca3af;
    --blue: #60a5fa;
    --green: #22c55e;
    --red: #ef4444;
    --yellow: #f59e0b;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(34,197,94,.14), transparent 32rem),
        radial-gradient(circle at bottom right, rgba(96,165,250,.10), transparent 28rem),
        var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.topbar {
    background: rgba(17, 24, 39, .88);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav {
    min-height: 72px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.brand:hover {
    text-decoration: none;
}

.brand small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--green), #16a34a);
    color: #07111f;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 22px;
}

nav {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

nav a {
    color: #dbeafe;
}

.nav-user {
    color: var(--muted);
    font-size: 14px;
}

.page {
    padding: 34px 0 64px;
}

.footer {
    border-top: 1px solid var(--line);
    color: var(--muted);
    padding: 24px 0;
    background: rgba(17, 24, 39, .7);
}

.hero {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    align-items: stretch;
    margin-bottom: 28px;
}

.hero h1 {
    font-size: clamp(34px, 5vw, 58px);
    margin: 6px 0 10px;
    line-height: 1.05;
}

.hero p {
    max-width: 760px;
    color: #d1d5db;
}

.hero-card,
.card,
.auth-card,
.post-card {
    background: rgba(31, 41, 55, .86);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 18px 48px rgba(0,0,0,.24);
}

.hero-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.hero-card strong {
    color: var(--green);
    font-size: 22px;
}

.hero-card span,
.muted {
    color: var(--muted);
}

.eyebrow {
    color: var(--green) !important;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-weight: 800;
    font-size: 12px;
    margin: 0;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.post-card h2 {
    margin: 10px 0;
}

.post-card h2 a {
    color: var(--text);
}

.post-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 12px;
}

.post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 20px;
}

.comment-count {
    color: var(--muted);
    font-size: 14px;
}

.post-full h1 {
    font-size: clamp(30px, 4vw, 48px);
    margin: 0 0 22px;
}

.post-body {
    white-space: normal;
    font-size: 17px;
    color: #e5e7eb;
}

.comments {
    display: grid;
    gap: 14px;
    margin: 18px 0 24px;
}

.comment {
    background: rgba(17, 24, 39, .78);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
}

.comment-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    color: var(--muted);
    font-size: 13px;
}

.comment-head strong {
    color: var(--text);
    font-size: 15px;
}

.form {
    display: grid;
    gap: 12px;
}

.form label {
    font-weight: 700;
    color: #dbeafe;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #0f172a;
    color: var(--text);
    padding: 12px 14px;
    font: inherit;
}

textarea {
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--green);
    color: #07111f;
    border: 0;
    border-radius: 10px;
    padding: 11px 16px;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    text-decoration: none;
    filter: brightness(1.05);
}

.btn-secondary {
    background: #334155;
    color: var(--text);
}

.btn-sm {
    padding: 8px 12px;
}

.auth-card {
    max-width: 520px;
    margin: 0 auto;
}

.alert {
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 18px;
    border: 1px solid var(--line);
}

.alert-success {
    background: rgba(34,197,94,.12);
    border-color: rgba(34,197,94,.35);
}

.alert-danger {
    background: rgba(239,68,68,.12);
    border-color: rgba(239,68,68,.35);
}

.alert-warning {
    background: rgba(245,158,11,.12);
    border-color: rgba(245,158,11,.35);
}

.admin-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-end;
    margin-bottom: 22px;
}

.admin-head h1 {
    margin: 6px 0;
}

.admin-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    border-bottom: 1px solid var(--line);
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
}

.badge {
    display: inline-flex;
    background: #0f172a;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
    color: #dbeafe;
    font-size: 12px;
}

.table-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.table-actions form {
    display: inline;
}

.link-danger {
    background: transparent;
    border: 0;
    color: #fca5a5;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.link-danger:hover {
    text-decoration: underline;
}

.email-log {
    background: #f9fafb;
    color: #111827;
    border-radius: 12px;
    padding: 16px;
    overflow-x: auto;
}

pre {
    white-space: pre-wrap;
    background: #0f172a;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 14px;
    color: #d1d5db;
}

@media (max-width: 760px) {
    .nav,
    .admin-head,
    .post-actions,
    .post-meta,
    .comment-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .hero,
    .post-grid {
        grid-template-columns: 1fr;
    }

    nav {
        gap: 10px;
    }
}

.discord-frame {
    width: 100%;
    height: 420px;
    border-radius: 12px;
    margin-top: 16px;
    background: #0f172a;
    border: 1px solid var(--line);
}

.discord-btn {
    margin-top: 12px;
    width: 100%;
}

.post-thumb {
    display: block;
    margin: 14px 0 12px;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--line);
    background: #0f172a;
}

.post-thumb img {
    width: 100%;
    height: 230px;
    object-fit: cover;
    display: block;
    transition: transform .2s ease;
}

.post-thumb:hover img {
    transform: scale(1.03);
}

.post-main-image {
    width: 100%;
    max-height: 620px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--line);
    margin: 0 0 24px;
    display: block;
}

.admin-current-image {
    max-width: 380px;
    width: 100%;
    border-radius: 12px;
    border: 1px solid var(--line);
    display: block;
}

.checkbox-line {
    display: flex !important;
    align-items: center;
    gap: 10px;
    color: #dbeafe;
}

.checkbox-line input {
    width: auto;
}


.badge-green {
    border-color: rgba(34,197,94,.45);
    color: #86efac;
    background: rgba(34,197,94,.12);
}

.badge-yellow {
    border-color: rgba(245,158,11,.45);
    color: #fcd34d;
    background: rgba(245,158,11,.12);
}

.table-actions button:not(.link-danger) {
    background: transparent;
    border: 0;
    color: var(--blue);
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.table-actions button:not(.link-danger):hover {
    text-decoration: underline;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 22px;
}

.stat-card {
    background: rgba(31, 41, 55, .86);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 18px 48px rgba(0,0,0,.20);
}

.stat-card span {
    color: var(--muted);
    display: block;
    font-size: 13px;
    margin-bottom: 6px;
}

.stat-card strong {
    color: var(--text);
    display: block;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1;
}

.stat-card small {
    color: var(--muted);
    display: block;
    margin-top: 8px;
}

.online-dot {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: var(--green);
    display: inline-block;
    margin-right: 8px;
    box-shadow: 0 0 0 4px rgba(34,197,94,.12);
}

@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   Tradutor automático PT/EN/ES
   ================================ */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(15, 23, 42, .72);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 8px;
    white-space: nowrap;
}

.language-switcher span {
    color: var(--muted);
    font-size: 12px;
    padding: 0 4px 0 6px;
}

.language-switcher button {
    border: 1px solid rgba(148, 163, 184, .24);
    background: rgba(31, 41, 55, .70);
    color: var(--text);
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    font-size: 12px;
    line-height: 1;
    padding: 8px 10px;
    transition: border-color .18s ease, background .18s ease, color .18s ease, transform .18s ease;
}

.language-switcher button:hover,
.language-switcher button.is-active {
    background: rgba(245, 158, 11, .18);
    border-color: rgba(245, 158, 11, .72);
    color: #fbbf24;
    transform: translateY(-1px);
}

#google_translate_element {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

body > .skiptranslate,
.goog-te-banner-frame,
.goog-te-balloon-frame,
.goog-te-menu-frame {
    display: none !important;
}

html.translated-ltr body,
html.translated-rtl body,
body {
    top: 0 !important;
}

@media (max-width: 900px) {
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        padding: 12px 0;
    }

    .language-switcher {
        order: 3;
    }
}


.hp-field {
    position: absolute !important;
    left: -99999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.small-text {
    font-size: 12px;
    max-width: 420px;
    word-break: break-word;
}

.badge.danger {
    background: rgba(255, 70, 70, .12);
    color: #ff8a8a;
    border: 1px solid rgba(255, 70, 70, .35);
}
