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

body {
    background: linear-gradient(45deg, #8B4513 25%, #DEB887 25%, #DEB887 50%, #8B4513 50%, #8B4513 75%, #DEB887 75%);
    background-size: 40px 40px;
    font-family: 'Courier New', monospace;
    color: #FFD700;
    min-height: 100vh;
    padding: 10px;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    background: #2F1810;
    border: 5px ridge #D4AF37;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.6);
    padding: 30px;
}

.neon-title {
    text-align: center;
    font-size: 2.5em;
    color: #FFD700;
    text-shadow: 
        0 0 10px #FFD700,
        0 0 20px #FFD700,
        0 0 30px #FF6347,
        0 0 40px #FF6347;
    animation: pulse 2s infinite;
    margin-bottom: 20px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Navigation */
.nav {
    background: #1a0f0a;
    padding: 12px;
    border: 3px solid #D4AF37;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.nav a {
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 12px;
    border: 2px solid #D4AF37;
    background: #8B4513;
    transition: all 0.3s;
    font-size: 13px;
}

.nav a:hover, .nav a.active {
    background: #FFD700;
    color: #2F1810;
    box-shadow: 0 0 15px #FFD700;
}

.nav-right {
    margin-left: auto;
}

/* Language Switch */
.lang-switch {
    position: absolute;
    top: 10px;
    right: 20px;
    z-index: 1000;
}

.lang-switch a {
    color: #FFD700;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    background: #2F1810;
    border: 2px solid #D4AF37;
    margin: 0 2px;
}

.lang-switch a.active,
.lang-switch a:hover {
    background: #FFD700;
    color: #2F1810;
}

/* Forms */
.auth-forms {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.form-box {
    background: #1a0f0a;
    padding: 25px;
    border: 3px groove #D4AF37;
}

.form-box h2 {
    color: #FF6347;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 0 0 10px #FF6347;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    background: #DEB887;
    border: 2px solid #8B4513;
    color: #2F1810;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 10px #FFD700;
}

button, .submit-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(180deg, #FFD700, #D4AF37);
    border: 3px outset #FFD700;
    color: #2F1810;
    font-weight: bold;
    font-size: 16px;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    transition: all 0.3s;
}

button:hover, .submit-btn:hover {
    background: linear-gradient(180deg, #FFA500, #FFD700);
    box-shadow: 0 0 20px #FFD700;
    transform: translateY(-2px);
}

/* Tables */
.retro-table {
    width: 100%;
    border-collapse: collapse;
    background: #1a0f0a;
    margin: 10px 0;
}

.retro-table th {
    background: #8B4513;
    color: #FFD700;
    padding: 12px 8px;
    border: 2px solid #D4AF37;
    text-align: left;
    font-size: 13px;
}

.retro-table td {
    padding: 10px 8px;
    border: 1px solid #8B4513;
    color: #DEB887;
    font-size: 13px;
}

.retro-table tr:nth-child(even) {
    background: #2F1810;
}

.retro-table tr:nth-child(odd) {
    background: #1a0f0a;
}

.retro-table tr.highlight-row {
    background: #3a2010 !important;
    border-left: 4px solid #FFD700;
}

/* Grid Layouts */
.content-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.standings-box, .recent-box {
    background: #1a0f0a;
    padding: 20px;
    border: 3px ridge #D4AF37;
}

.standings-box h2, .recent-box h2 {
    color: #FF6347;
    margin-bottom: 15px;
    text-shadow: 0 0 10px #FF6347;
    font-size: 1.5em;
}

/* Match Items */
.match-item {
    background: #2F1810;
    padding: 12px;
    margin: 10px 0;
    border-left: 4px solid #FFD700;
    color: #DEB887;
}

.match-header {
    font-size: 14px;
    margin-bottom: 5px;
}

.match-header .winner {
    color: #90EE90;
}

.match-header .loser {
    color: #FF6B6B;
}

.match-details {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 8px 0;
    font-size: 12px;
}

.match-type, .match-points, .cube-badge, .rating-delta {
    background: #1a0f0a;
    padding: 3px 8px;
    border: 1px solid #8B4513;
    border-radius: 3px;
}

.cube-badge {
    background: #8B4513;
    color: #FFD700;
}

.rating-delta {
    color: #90EE90;
    font-weight: bold;
}

.match-footer {
    margin-top: 5px;
    font-size: 11px;
    color: #B8956A;
}

/* Welcome Box */
.welcome-box {
    background: #8B4513;
    padding: 15px;
    text-align: center;
    color: #FFD700;
    font-size: 1.2em;
    border: 2px solid #D4AF37;
    margin-bottom: 20px;
}

.user-quick-stats {
    margin-top: 8px;
    font-size: 0.9em;
}

.highlight {
    color: #90EE90;
    font-weight: bold;
}

/* Streaks */
.streak-positive {
    color: #90EE90;
    font-weight: bold;
}

.streak-negative {
    color: #FF6B6B;
    font-weight: bold;
}

.streak-cell small {
    display: block;
    color: #B8956A;
    font-size: 10px;
}

/* Badges */
.you-badge {
    background: #FF6347;
    color: white;
    padding: 2px 6px;
    font-size: 10px;
    border-radius: 3px;
    margin-left: 5px;
}

/* Wins/Losses Cells */
.wins-cell {
    color: #90EE90;
    font-weight: bold;
}

.losses-cell {
    color: #FF6B6B;
    font-weight: bold;
}

.winner-cell {
    color: #90EE90;
}

.rating-positive {
    color: #90EE90;
}

.rating-negative {
    color: #FF6B6B;
}

.rating-cell small {
    display: block;
    color: #B8956A;
    font-size: 10px;
}

/* Messages */
.error-box {
    background: #8B0000;
    color: #FFD700;
    padding: 15px;
    border: 3px solid #FF6347;
    text-align: center;
    margin-bottom: 20px;
    animation: blink 1.5s infinite;
}

.success-box {
    background: #006400;
    color: #90EE90;
    padding: 15px;
    border: 3px solid #90EE90;
    text-align: center;
    margin-bottom: 20px;
}

.info-box {
    background: #8B4513;
    color: #FFD700;
    padding: 15px;
    border: 2px solid #D4AF37;
    text-align: center;
    margin: 20px 0;
}

@keyframes blink {
    0%, 50%, 100% { opacity: 1; }
    25%, 75% { opacity: 0.6; }
}

/* Match Form */
.match-form {
    background: #1a0f0a;
    padding: 25px;
    border: 3px groove #D4AF37;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    color: #FFD700;
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.probability-box {
    background: #8B4513;
    padding: 12px;
    margin: 15px 0;
    border: 2px solid #D4AF37;
    text-align: center;
    color: #FFD700;
}

/* Head-to-Head */
.h2h-form {
    background: #1a0f0a;
    padding: 20px;
    border: 3px groove #D4AF37;
    margin-bottom: 20px;
}

.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    color: #FF6347;
    font-weight: bold;
}

.h2h-results {
    background: #1a0f0a;
    padding: 25px;
    border: 3px ridge #D4AF37;
}

.h2h-header h2 {
    color: #FFD700;
    text-align: center;
    margin-bottom: 20px;
}

.h2h-summary {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    margin: 20px 0;
}

.h2h-player {
    background: #2F1810;
    padding: 20px;
    text-align: center;
    border: 2px solid #8B4513;
}

.h2h-player h3 {
    color: #FFD700;
    margin-bottom: 15px;
}

.h2h-stat {
    margin: 10px 0;
    color: #DEB887;
}

.h2h-vs {
    background: #8B4513;
    padding: 20px;
    text-align: center;
    border: 3px solid #D4AF37;
    min-width: 200px;
}

.h2h-vs .record {
    font-size: 3em;
    color: #FFD700;
    font-weight: bold;
    text-shadow: 0 0 10px #FFD700;
}

.h2h-vs .total {
    color: #DEB887;
    margin: 10px 0;
}

.h2h-vs .probability {
    margin-top: 15px;
    color: #FFD700;
    font-size: 12px;
}

.h2h-matches {
    margin-top: 30px;
}

.h2h-matches h3 {
    color: #FF6347;
    margin-bottom: 15px;
}

/* Monthly Leaderboard */
.month-selector {
    background: #1a0f0a;
    padding: 15px;
    border: 2px solid #D4AF37;
    margin-bottom: 20px;
}

.month-selector form {
    display: flex;
    align-items: center;
    gap: 10px;
}

.month-selector label {
    color: #FFD700;
    font-weight: bold;
}

.month-selector select {
    flex: 1;
    max-width: 250px;
}

.monthly-stats-header h2 {
    color: #FFD700;
    text-align: center;
    margin: 20px 0;
}

/* Profile */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stats-card {
    background: #1a0f0a;
    padding: 20px;
    border: 3px ridge #D4AF37;
    text-align: center;
}

.stats-card h3 {
    color: #FF6347;
    margin-bottom: 10px;
    font-size: 14px;
}

.big-stat {
    font-size: 3em;
    color: #FFD700;
    font-weight: bold;
    text-shadow: 0 0 10px #FFD700;
    margin: 10px 0;
}

.sub-stat {
    color: #DEB887;
    font-size: 12px;
    margin-top: 10px;
}

.profile-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.section {
    background: #1a0f0a;
    padding: 20px;
    border: 3px ridge #D4AF37;
}

.section h3 {
    color: #FF6347;
    margin-bottom: 15px;
}

.form-display {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.form-badge {
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid;
    font-size: 16px;
}

.win-badge {
    background: #006400;
    color: #90EE90;
    border-color: #90EE90;
}

.loss-badge {
    background: #8B0000;
    color: #FF6B6B;
    border-color: #FF6B6B;
}

.small-table {
    font-size: 13px;
}

.monthly-performance {
    margin-top: 30px;
}

.monthly-performance h3 {
    color: #FF6347;
    margin-bottom: 15px;
}

/* History */
.history-stats {
    background: #8B4513;
    padding: 15px;
    margin-bottom: 20px;
    border: 2px solid #D4AF37;
    color: #FFD700;
}

.history-table {
    font-size: 12px;
}

.delete-btn {
    color: #FF6347;
    text-decoration: none;
    font-size: 18px;
    padding: 5px;
    display: inline-block;
    transition: transform 0.2s;
}

.delete-btn:hover {
    transform: scale(1.3);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding: 15px;
    background: #1a0f0a;
    border: 2px solid #D4AF37;
}

.pagination a {
    color: #FFD700;
    text-decoration: none;
    padding: 8px 15px;
    border: 2px solid #D4AF37;
    background: #8B4513;
}

.pagination a:hover {
    background: #FFD700;
    color: #2F1810;
}

.pagination span {
    color: #DEB887;
}

/* Scrollable areas */
.table-scroll {
    overflow-x: auto;
    max-height: 600px;
    overflow-y: auto;
}

.matches-scroll {
    max-height: 500px;
    overflow-y: auto;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #1a0f0a;
}

::-webkit-scrollbar-thumb {
    background: #8B4513;
    border: 2px solid #D4AF37;
}

::-webkit-scrollbar-thumb:hover {
    background: #D4AF37;
}

/* Responsive */
@media (max-width: 968px) {
    .auth-forms, .content-grid, .form-row, .h2h-summary {
        grid-template-columns: 1fr;
    }
    
    .nav {
        font-size: 11px;
    }
    
    .nav a {
        padding: 6px 8px;
        font-size: 11px;
    }
    
    .neon-title {
        font-size: 2em;
    }
    
    .vs-divider {
        margin: 15px 0;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 15px;
    }
    
    .retro-table {
        font-size: 11px;
    }
    
    .retro-table th,
    .retro-table td {
        padding: 6px 4px;
    }
}

/* Admin Panel Styles */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-box {
    background: #1a0f0a;
    padding: 20px;
    border: 3px ridge #D4AF37;
    text-align: center;
}

.stat-box h3 {
    color: #FF6347;
    margin-bottom: 10px;
    font-size: 14px;
}

.big-number {
    font-size: 3em;
    color: #FFD700;
    font-weight: bold;
    text-shadow: 0 0 10px #FFD700;
}

.admin-section {
    background: #1a0f0a;
    padding: 25px;
    border: 3px groove #D4AF37;
    margin: 20px 0;
}

.admin-section h2 {
    color: #FF6347;
    margin-bottom: 15px;
    text-shadow: 0 0 10px #FF6347;
}

.admin-form {
    background: #2F1810;
    padding: 20px;
    border: 2px solid #8B4513;
}

.actions-cell {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.action-btn {
    background: #8B4513;
    border: 2px solid #D4AF37;
    color: #FFD700;
    padding: 5px 10px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s;
}

.action-btn:hover {
    background: #FFD700;
    transform: scale(1.2);
}

.delete-btn:hover {
    background: #8B0000;
    border-color: #FF6347;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.action-button {
    display: block;
    background: linear-gradient(180deg, #FFD700, #D4AF37);
    border: 3px outset #FFD700;
    color: #2F1810;
    font-weight: bold;
    padding: 15px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s;
}

.action-button:hover {
    background: linear-gradient(180deg, #FFA500, #FFD700);
    box-shadow: 0 0 20px #FFD700;
    transform: translateY(-2px);
}

.no-data {
    text-align: center;
    color: #B8956A;
    padding: 20px;
    font-style: italic;
}

/* Auth Page Enhancements */
.tagline {
    text-align: center;
    color: #FF6347;
    font-size: 1.1em;
    margin: 10px 0 20px 0;
    font-style: italic;
    text-shadow: 0 0 5px #FF6347;
}

.form-description {
    text-align: center;
    color: #DEB887;
    font-size: 0.9em;
    margin-bottom: 15px;
    font-style: italic;
}

.login-box {
    border: 3px groove #90EE90 !important;
}

.login-box h2 {
    color: #90EE90 !important;
    text-shadow: 0 0 10px #90EE90 !important;
}

.register-box {
    border: 3px groove #FFD700 !important;
}

.register-box h2 {
    color: #FFD700 !important;
    text-shadow: 0 0 10px #FFD700 !important;
}

.footer-note {
    text-align: center;
    color: #B8956A;
    font-size: 0.85em;
    margin-top: 30px;
    padding: 15px;
    background: #1a0f0a;
    border: 2px dashed #8B4513;
    font-style: italic;
}

/* Admin Panel Enhancements */
.admin-title {
    text-align: center;
    font-size: 2.5em;
    color: #FF6347;
    text-shadow: 
        0 0 10px #FF6347,
        0 0 20px #FF6347,
        0 0 30px #FFD700;
    animation: pulse 2s infinite;
    margin-bottom: 10px;
    letter-spacing: 3px;
}

.admin-subtitle {
    text-align: center;
    color: #DEB887;
    font-size: 1.1em;
    margin-bottom: 30px;
    font-style: italic;
}
