/* =========================================
   CAVEIRA THEME — TATTOO / GOTHIC
   Marca d'água + grain textura
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700;900&family=Pirata+One&display=swap');

:root {
    --bg-dark: #050505;
    --bg-card: #0a0a0a;
    --bg-elevated: #111111;
    --border: #2a2a2a;
    --text-primary: #e0e0e0;
    --text-secondary: #888888;
    --skull-opacity: 0.12;
    --grain-opacity: 0.04;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cinzel', 'Times New Roman', serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Marca d'água caveira — posicionada mais baixa para não competir com cabeçalho */
body::before {
    content: '';
    position: fixed;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vmin;
    height: 90vmin;
    background-image: url('../images/themes/skull-overlay.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: var(--skull-opacity);
    pointer-events: none;
    z-index: 0;
}

/* Grain textura sobre toda a página */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url('../images/themes/grain.png');
    background-size: 180px;
    background-repeat: repeat;
    opacity: var(--grain-opacity);
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: overlay;
}

/* Links */
a {
    color: #aaa;
    text-decoration: none;
    transition: all 0.3s;
}

a:hover {
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.35);
}

/* Inputs e textareas */
input, textarea, select {
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    border-radius: 6px !important;
    padding: 12px !important;
    font-family: 'Cinzel', serif;
    font-size: 14px;
    transition: all 0.3s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #444 !important;
    box-shadow: 0 0 14px rgba(255, 255, 255, 0.04);
}

input::placeholder, textarea::placeholder {
    color: #3a3a3a;
    font-style: italic;
}

/* Botões */
button, .btn, input[type="submit"] {
    background: #111111;
    border: 1px solid #333;
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 6px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 12px;
}

button:hover, .btn:hover, input[type="submit"]:hover {
    background: #1f1f1f;
    border-color: #555;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.04);
    transform: translateY(-1px);
}

button:active, .btn:active {
    transform: translateY(0);
}

/* Cards — mais sombreados, menos "hospitais" */
.container, .card, .login-container, .card-usuario {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.03);
    position: relative;
    z-index: 1;
}

.header, .card-usuario, .login-container {
    border-top: 1px solid #333;
}

/* Tipografia: Pirata One nos títulos, Cinzel no corpo */
h1, h2, h3, h4 {
    font-family: 'Pirata One', 'Cinzel', 'Times New Roman', serif;
    color: var(--text-primary);
    text-shadow: 0 2px 10px rgba(0, 0, 0, 1);
    letter-spacing: 2px;
    font-weight: 400;
}

h1 {
    font-size: 28px;
    font-family: 'Pirata One', cursive;
}

h3 {
    font-family: 'Pirata One', cursive;
    font-size: 20px;
    letter-spacing: 1px;
}

p, span, div, label {
    color: var(--text-primary);
}

/* Status — mais sutis */
.status-ativo, .stat-aprovada .num, .status-ok {
    color: #999 !important;
}

.status-inativo, .stat-reprovada .num, .status-stopped {
    color: #444 !important;
}

.stat-erro .num, .erro {
    color: #777 !important;
}

.erro {
    background: #0f0f0f !important;
    color: #aaa !important;
    border: 1px solid #222;
}

.stat-total .num, .header .saldo {
    color: #bbb !important;
}

/* Badges */
.badge-new {
    background: #111;
    color: #888;
    border: 1px solid #333;
}

.badge-count {
    background: #111;
    color: #888;
    border: 1px solid #2a2a2a;
}

.badge-count.danger {
    background: #111;
    color: #555;
    border: 1px solid #2a2a2a;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #080808;
}

::-webkit-scrollbar-thumb {
    background: #2a2a2a;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3d3d3d;
}

/* Divisor */
.divider::before, .divider::after {
    border-bottom-color: #1f1f1f;
}

.divider span {
    color: #555;
    font-size: 11px;
}

/* Spinner */
.spinner {
    border-top-color: #2a2a2a;
    border-color: #1a1a1a;
}

/* Animações — mais lentas, menos "IA" */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.btn-criar-key {
    background: #111111;
    border: 1px solid #333;
}

.btn-criar-key:hover {
    background: #1f1f1f;
    box-shadow: 0 0 28px rgba(255, 255, 255, 0.03);
}

/* Result items */
.result-item {
    background: #0b0b0b;
    border-left-color: #2a2a2a;
}

.result-item:hover {
    border-left-color: #444;
}

/* Toggle buttons */
.toggle-btn {
    background: #111;
    border: 1px solid #2a2a2a;
    color: #777;
}

.toggle-btn:hover {
    background: #1f1f1f;
    color: #aaa;
}

/* Ajustes específicos checker */
.header h1 {
    font-family: 'Pirata One', cursive;
    letter-spacing: 3px;
}

.header .saldo {
    font-family: 'Cinzel', serif;
    letter-spacing: 1px;
}

/* Borda decorativa nos cards */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
    pointer-events: none;
}

/* Responsivo */
@media (max-width: 768px) {
    .row { grid-template-columns: 1fr; }
    header, .header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .acoes { grid-template-columns: 1fr; }
    h1 { font-size: 22px; }
    h3 { font-size: 17px; }
}
