/* ============================================
   KING CHECKERS - TEMA AZUL/PRETO
   ============================================ */

:root {
    --primary-blue: #0066ff;
    --primary-blue-dark: #0052cc;
    --primary-blue-light: #3385ff;
    --secondary-blue: #00a8ff;
    --dark-bg: #0a0a0f;
    --darker-bg: #050508;
    --card-bg: #0d0d15;
    --card-border: #1a1a2e;
    --text-primary: #ffffff;
    --text-secondary: #8892b0;
    --success: #00ff88;
    --warning: #ffaa00;
    --danger: #ff4444;
    --glow-blue: 0 0 20px rgba(0, 102, 255, 0.5);
    --glow-blue-strong: 0 0 40px rgba(0, 102, 255, 0.8);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--dark-bg);
    color: var(--text-primary);
    min-height: 100vh;
    background-image: 
        radial-gradient(ellipse at top, rgba(0, 102, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at bottom, rgba(0, 168, 255, 0.05) 0%, transparent 50%);
}

/* Container Principal */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    padding: 30px 0;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 30px;
}

.logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid var(--primary-blue);
    box-shadow: var(--glow-blue);
    margin-bottom: 15px;
    object-fit: cover;
}

.site-title {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: var(--glow-blue);
    margin-bottom: 5px;
}

.site-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
}

.card-title {
    font-size: 1.3rem;
    color: var(--primary-blue-light);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--secondary-blue);
}

/* Formulários */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 15px;
    background: var(--darker-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: var(--glow-blue);
}

.form-input::placeholder {
    color: var(--text-secondary);
}

/* Botões */
.btn {
    display: inline-block;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-blue-dark));
    color: var(--text-primary);
    box-shadow: var(--glow-blue);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-blue-light), var(--primary-blue));
    box-shadow: var(--glow-blue-strong);
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #00cc6a, #00994d);
    color: var(--text-primary);
}

.btn-success:hover {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, #cc3333, #992626);
    color: var(--text-primary);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff4444, #cc3333);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* Status Badge */
.badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.badge-success {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge-warning {
    background: rgba(255, 170, 0, 0.2);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.badge-danger {
    background: rgba(255, 68, 68, 0.2);
    color: var(--danger);
    border: 1px solid var(--danger);
}

.badge-info {
    background: rgba(0, 102, 255, 0.2);
    color: var(--primary-blue-light);
    border: 1px solid var(--primary-blue);
}

/* Timer Display */
.timer-display {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.1), rgba(0, 168, 255, 0.05));
    border-radius: 15px;
    border: 1px solid var(--primary-blue);
    margin-bottom: 20px;
}

.timer-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.timer-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--secondary-blue);
    text-shadow: 0 0 20px rgba(0, 168, 255, 0.5);
}

.timer-expiry {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 10px;
}

/* Grid Layout */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Planos de Compra */
.plan-card {
    background: var(--card-bg);
    border: 2px solid var(--card-border);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.plan-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-5px);
    box-shadow: var(--glow-blue);
}

.plan-card.popular {
    border-color: var(--secondary-blue);
    position: relative;
}

.plan-card.popular::before {
    content: 'POPULAR';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary-blue);
    color: var(--dark-bg);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
}

.plan-name {
    font-size: 1.5rem;
    color: var(--primary-blue-light);
    margin-bottom: 10px;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.plan-price span {
    font-size: 1rem;
    color: var(--text-secondary);
}

.plan-duration {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* Tabelas */
.table-container {
    overflow-x: auto;
}

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

.table th,
.table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
}

.table th {
    background: var(--darker-bg);
    color: var(--primary-blue-light);
    font-weight: bold;
}

.table tr:hover {
    background: rgba(0, 102, 255, 0.05);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.alert-danger {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

.alert-warning {
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-info {
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue-light);
}

/* Login Box */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 450px;
}

/* Dashboard Stats */
.stat-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-blue-light);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Sidebar Admin */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--darker-bg);
    border-right: 1px solid var(--card-border);
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-logo {
    text-align: center;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 20px;
}

.sidebar-logo img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid var(--primary-blue);
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(0, 102, 255, 0.1);
    color: var(--primary-blue-light);
}

.sidebar-menu a.active {
    border-left: 3px solid var(--primary-blue);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
}

/* Responsivo */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 1000;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* Animações */
@keyframes pulse {
    0%, 100% {
        box-shadow: var(--glow-blue);
    }
    50% {
        box-shadow: var(--glow-blue-strong);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

/* Checker Result */
.checker-result {
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
    font-family: monospace;
}

.checker-result.live {
    background: rgba(0, 255, 136, 0.1);
    border: 1px solid var(--success);
    color: var(--success);
}

.checker-result.die {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--card-border);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--card-border);
}

.modal-title {
    font-size: 1.3rem;
    color: var(--primary-blue-light);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
}

.modal-close:hover {
    color: var(--danger);
}

/* Copiar código PIX */
.pix-code {
    background: var(--darker-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 15px;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.85rem;
    margin-bottom: 15px;
}

/* Toggle Switch */
.toggle {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--card-border);
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--text-primary);
    border-radius: 50%;
    transition: 0.3s;
}

.toggle input:checked + .toggle-slider {
    background: var(--primary-blue);
}

.toggle input:checked + .toggle-slider::before {
    transform: translateX(24px);
}

/* Footer */
.footer {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--card-border);
    margin-top: 40px;
}

.footer a {
    color: var(--primary-blue-light);
    text-decoration: none;
}
