/* Black Bullets Poker Stats - Stylesheet */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-dark: #0a0a0a;
    --bg-card: #1a1a1a;
    --bg-hover: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #8a8a8a;
    --accent: #d4af37;
    --accent-light: #f4d03f;
    --positive: #d4af37;
    --negative: #8a0000;
    --border: #3a3a3a;
    --anthracite: #2d2d2d;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    color: var(--text-primary);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    text-align: center;
    padding: 40px 0;
    border-bottom: 3px solid var(--accent);
    margin-bottom: 40px;
    position: relative;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

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

.section {
    margin-bottom: 40px;
}

.section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--accent);
}

.section h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card, .stat-box {
    background: var(--bg-card);
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover, .stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    border-color: var(--accent);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--text-primary);
}

.stat-sub {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 5px;
}

.stat-card.positive .stat-value,
.positive {
    color: var(--positive) !important;
}

.stat-card.negative .stat-value,
.negative {
    color: var(--negative) !important;
}

/* Charts */
.chart-container {
    background: var(--bg-card);
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid var(--border);
}

canvas {
    max-height: 400px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
}

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

thead {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(244, 208, 63, 0.1) 100%);
    border-bottom: 2px solid var(--accent);
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: var(--accent);
    border-bottom: 2px solid var(--border);
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: var(--bg-hover);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Medal styling */
.medal {
    font-size: 1.5rem;
}

/* Gold styling for top positions */
tbody tr:nth-child(1) td:first-child {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
    font-size: 1.2rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    margin-top: 60px;
}

footer a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--text-primary);
}

/* Admin Panel Specific */
.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.qr-card {
    background: var(--bg-card);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border);
    text-align: center;
}

.qr-card img {
    max-width: 100%;
    height: auto;
    margin: 15px 0;
    border: 2px solid var(--border);
    border-radius: 8px;
}

.qr-card h3 {
    color: var(--text-primary);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.qr-card .token {
    font-family: monospace;
    font-size: 0.75rem;
    color: var(--text-secondary);
    word-break: break-all;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    color: #0a0a0a;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn:hover {
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
}

.btn-secondary {
    background: var(--anthracite);
    color: var(--accent);
    border: 2px solid var(--accent);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent-light);
    color: var(--accent-light);
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }

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

    .stat-value {
        font-size: 1.5rem;
    }

    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 10px;
    }
}

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

/* Loading spinner */
.spinner {
    border: 3px solid var(--border);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--accent);
    color: var(--accent-light);
}

.alert-error {
    background: rgba(138, 0, 0, 0.15);
    border: 1px solid var(--negative);
    color: #ff4444;
}

.alert-info {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--accent);
    color: var(--text-secondary);
}
