/* public/index.css - Redesign Premium */
:root {
    /* Cores padrão se não vierem do banco */
    --primary: #6366f1;
    --secondary: #a78bfa;
    --primary-glow: rgba(99, 102, 241, 0.2);
    
    --bg-dark: #0f172a;
    --bg-darker: #020617;
    --card-bg: rgba(30, 41, 59, 0.6);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --glass-blur: blur(12px);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    background-image: 
        radial-gradient(at 0% 0%, var(--primary-glow) 0, transparent 50%),
        radial-gradient(at 100% 100%, var(--primary-glow) 0, transparent 50%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden; /* Evita corte lateral */
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2rem 4%; 
}

/* Glassmorphism Card Enhanced */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, border-color 0.3s ease;
    overflow: hidden; /* Garante que conteúdo interno não corte */
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

/* Navbar Premium & Mobile */
nav.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 8%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.logo {
    font-size: 1.6rem;
    font-weight: 900;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 20px rgba(0,0,0,0.1);
    z-index: 1001;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-main);
    border-radius: 3px;
    transition: 0.3s;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    padding: 0.5rem 0.8rem;
    border-radius: 0.5rem;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--text-main);
    background: rgba(255,255,255,0.08);
}

/* Responsive */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        padding: 4rem 2rem;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid var(--border);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
        padding: 1rem;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 1.5rem 1.5rem;
    }
    .glass-card {
        padding: 1.5rem 1rem;
    }
}

/* Dashboard Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-item h3 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.stat-item p {
    font-size: 2rem;
    font-weight: 800;
    color: white;
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .stat-item p {
        font-size: 1.75rem;
    }
}

/* Discover 3-Column Layout */
.discover-grid {
    display: grid;
    grid-template-columns: 20% 55% 25%;
    gap: 1.5rem;
    align-items: start;
}

.ads-sidebar {
    position: sticky;
    top: 4rem;
}

.ads-placeholder {
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.2);
    font-size: 0.8rem;
    font-style: italic;
    text-transform: uppercase;
}

.ads-vertical {
    min-height: 500px;
    width: 100%;
}

.ads-horizontal {
    min-height: 100px;
    width: 100%;
    margin-bottom: 1.3rem;
}

/* Discover Tabs */
.discover-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.4rem;
    border-radius: 0.75rem;
    gap: 0.5rem;
}

.discover-tabs a {
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.3s;
}

.discover-tabs a:hover {
    color: white;
}

.discover-tabs a.active {
    background: var(--primary);
    color: white;
}

/* Stats Sidebar */
.stats-sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.stats-group {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid var(--border);
}

.stats-group h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stats-values {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    text-align: center;
}

.stats-values.clicks-val {
    grid-template-columns: repeat(4, 1fr);
}

.stat-val-item span {
    display: block;
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-bottom: 0.3rem;
}

.stat-val-item strong {
    font-size: 0.9rem;
    color: white;
}

.how-to-earn ol {
    padding-left: 1.2rem;
}

.how-to-earn li {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}

.how-to-earn li strong {
    color: var(--primary);
}

@media (max-width: 1200px) {
    .discover-grid {
        grid-template-columns: 1fr;
    }
    .ads-sidebar {
        display: none;
    }
    .stats-sidebar {
        position: static;
    }
}

/* Terminal Minerador (PTP) */
.terminal-container {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 1.5rem;
    align-items: start;
}

.terminal-main {
    background: rgba(15, 23, 42, 0.4);
    border-radius: 1.5rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

.terminal-header {
    background: rgba(15, 23, 42, 0.8);
    padding: 1rem 1.5rem; /* Reduzido de 1.5rem 2rem */
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.terminal-title-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.status-indicator {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #94a3b8; /* Default inactive */
}

.status-pulse {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.2;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(1.8); opacity: 0; }
}

.terminal-timer {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem; /* Reduzido */
    border-radius: 1rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    min-width: 140px; /* Reduzido de 160px */
}

.timer-label {
    display: block;
    font-size: 0.65rem;
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 0.2rem;
    letter-spacing: 1px;
}

.timer-value {
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 1.4rem; /* Reduzido de 1.8rem */
    font-weight: 700;
    color: white;
}

.terminal-content {
    padding: 1.5rem;
    position: relative;
}

.terminal-overlay {
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    bottom: 1.5rem;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(8px);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
}

.pool-sidebar h3 {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.2rem;
}

.sidebar-stat-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.2rem;
    margin-bottom: 1rem;
}

.sidebar-stat-card label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.stat-pill {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 0.75rem;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-pill strong {
    font-size: 1.1rem;
    color: white;
}

.stat-pill .status-text {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--primary);
}

.ip-quality-row {
     display: flex;
     justify-content: space-between;
     align-items: center;
     margin-bottom: 0.5rem;
}

.ip-quality-val {
    font-size: 1.2rem;
    font-weight: 700;
    color: #10b981;
}

.ip-type {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.progress-premium-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.progress-premium-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #818cf8);
    box-shadow: 0 0 10px var(--primary-glow);
    transition: width 0.5s ease;
}

@media (max-width: 992px) {
    .terminal-container {
        grid-template-columns: 1fr;
    }
}

/* Admin Shortcuts */
.admin-shortcut:hover {
    transform: translateY(-5px);
    border-color: currentColor !important;
    background: rgba(255,255,255,0.05) !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Admin Tables Premium */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
    margin-top: 1rem;
}

.admin-table th {
    padding: 1rem;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    font-weight: 700;
}

.admin-table tr {
    transition: transform 0.2s;
}

.admin-table td {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.admin-table td:first-child {
    border-left: 1px solid var(--border);
    border-top-left-radius: 0.75rem;
    border-bottom-left-radius: 0.75rem;
}

.admin-table td:last-child {
    border-right: 1px solid var(--border);
    border-top-right-radius: 0.75rem;
    border-bottom-right-radius: 0.75rem;
}

.admin-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    border-radius: 0.5rem;
}
