/* ========================================
   COMPLETE WEBSITE THEME - DARK GREEN
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0A0A0A;
    color: #FFFFFF;
    min-height: 100vh;
    padding-bottom: 0;
    cursor: default;
}

/* ========================================
   BACKGROUNDS
   ======================================== */
.bg-primary { background: #0A0A0A; }
.bg-secondary { background: #111111; }
.bg-card { background: #171717; }
.border-dark { border-color: #2A2A2A; }

/* ========================================
   CARDS
   ======================================== */
.card, .glass-card, .tournament-card, .profile-card, 
.deposit-form-section, .deposit-history-section,
.withdraw-form-section, .withdraw-history-section,
.admin-section, .stat-card, .quick-actions {
    background: #171717;
    border: 1px solid #2A2A2A;
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.glass-nav, .glass-card {
    background: #111111 !important;
    backdrop-filter: none !important;
    border: 1px solid #2A2A2A;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ========================================
   NAVBAR - Consistent for all pages
   ======================================== */
.glass-nav {
    background: #111111 !important;
    border-bottom: 1px solid #2A2A2A;
    padding: 0.6rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.nav-left {
    display: flex;
    align-items: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-section {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px 6px 6px;
    background: #171717;
    border-radius: 50px;
    border: 1px solid #2A2A2A;
    cursor: default;
    text-decoration: none !important;
}

.profile-section:hover {
    background: #1A1A1A;
    border-color: #34C759;
}

.profile-avatar-nav {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #34C759;
    object-fit: cover;
    background: #171717;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #FFFFFF;
}

.user-id {
    font-size: 0.65rem;
    color: #7A7A7A;
}

.history-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #171717;
    border: 1px solid #2A2A2A;
    border-radius: 50px;
    color: #B0B0B0;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}

.history-btn:hover {
    border-color: #34C759;
    color: #FFFFFF;
}

.wallet-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px 6px 14px;
    background: #171717;
    border: 1px solid #2A2A2A;
    border-radius: 50px;
}

.wallet-icon {
    font-size: 1rem;
    color: #34C759;
}

.wallet-balance {
    font-size: 0.95rem;
    font-weight: 700;
    color: #FFFFFF;
}

.wallet-actions {
    display: flex;
    gap: 6px;
}

.wallet-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 700;
    border: none;
    cursor: default;
}

.deposit-btn {
    background: #34C759;
    color: white;
}

.deposit-btn:hover {
    background: #2FB84F;
}

.withdraw-btn {
    background: #2A2A2A;
    color: white;
    border: 1px solid #34C759;
}

.withdraw-btn:hover {
    background: #333333;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
    background: #34C759;
    border: none;
    border-radius: 10px;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    cursor: default;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
}

.btn-primary:hover {
    background: #2FB84F;
}

.btn-secondary {
    background: #171717;
    border: 1px solid #2A2A2A;
    border-radius: 10px;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    cursor: default;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
}

.btn-secondary:hover {
    border-color: #34C759;
}

.btn-danger {
    background: #171717;
    border: 1px solid #2A2A2A;
    border-radius: 10px;
    color: #EF4444;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    cursor: default;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
}

.btn-danger:hover {
    border-color: #EF4444;
    background: #1A1A1A;
}

.btn-join {
    background: #34C759;
    border: none;
    border-radius: 10px;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    cursor: default;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 48px;
}

.btn-join:hover {
    background: #2FB84F;
}

.btn-joined, .btn-approved, .btn-pending, .btn-completed {
    background: #171717;
    border: 1px solid #2A2A2A;
    border-radius: 10px;
    color: #B0B0B0;
    padding: 0.75rem 1.5rem;
    cursor: not-allowed;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    width: 100%;
    min-height: 48px;
}

.btn-approved {
    border-color: #34C759;
    color: #34C759;
}

.btn-pending {
    border-color: #F59E0B;
    color: #F59E0B;
}

.btn-completed {
    border-color: #6366F1;
    color: #6366F1;
}

/* ========================================
   FORMS
   ======================================== */
input, select, textarea, .custom-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #111111;
    border: 1px solid #2A2A2A;
    border-radius: 10px;
    color: #FFFFFF;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    min-height: 48px;
}

input:focus, select:focus, textarea:focus, .custom-input:focus {
    outline: none;
    border-color: #34C759;
}

input::placeholder, .custom-input::placeholder {
    color: #7A7A7A;
}

label {
    color: #B0B0B0;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.form-group {
    margin-bottom: 1rem;
}

/* ========================================
   TABLES
   ======================================== */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: #111111;
    color: #B0B0B0;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid #2A2A2A;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #2A2A2A;
    color: #FFFFFF;
}

tr:hover td {
    background: #1A1A1A;
}

/* ========================================
   STATUS BADGES
   ======================================== */
.history-status, .badge-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.status-pending {
    background: #1A1A1A;
    color: #F59E0B;
    border: 1px solid #F59E0B;
}

.status-paid, .status-successful {
    background: #1A1A1A;
    color: #34C759;
    border: 1px solid #34C759;
}

.status-failed {
    background: #1A1A1A;
    color: #EF4444;
    border: 1px solid #EF4444;
}

/* ========================================
   TOURNAMENT CARDS
   ======================================== */
.tournament-card {
    background: #171717;
    border: 1px solid #2A2A2A;
    border-radius: 12px;
    overflow: hidden;
}

.card-banner {
    position: relative;
    width: 100%;
    height: 200px;
    background: #111111;
}

.card-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #34C759;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-badge i {
    color: #FFFFFF;
    font-size: 1rem;
}

.card-content {
    padding: 1.25rem;
}

.tournament-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.5rem;
}

.match-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #7A7A7A;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.match-type {
    color: #34C759;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
}

.match-divider {
    color: #2A2A2A;
}

.match-date {
    margin-left: auto;
    font-size: 0.75rem;
    color: #7A7A7A;
}

.players-section {
    margin: 1rem 0;
}

.players-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.players-title {
    font-size: 0.85rem;
    color: #B0B0B0;
}

.players-count {
    font-size: 0.85rem;
    font-weight: 700;
    color: #34C759;
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: #2A2A2A;
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #34C759;
    border-radius: 100px;
}

.tournament-details-row {
    display: flex;
    gap: 2rem;
    padding: 0.75rem 0;
    border-top: 1px solid #2A2A2A;
    border-bottom: 1px solid #2A2A2A;
    margin: 1rem 0;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #B0B0B0;
}

.detail-item i {
    color: #34C759;
}

.detail-item strong {
    color: #FFFFFF;
}

.room-details-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin: 1rem 0;
    padding: 1rem;
    background: #111111;
    border-radius: 10px;
    border: 1px solid #2A2A2A;
}

.room-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #B0B0B0;
}

.room-detail-item i {
    color: #34C759;
}

.room-detail-item strong {
    color: #FFFFFF;
    font-family: monospace;
}

/* ========================================
   STATS CARDS
   ======================================== */
.stats-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #171717;
    border: 1px solid #2A2A2A;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: #111111;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #2A2A2A;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 1.5rem;
    color: #34C759;
}

.stat-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #7A7A7A;
    font-size: 0.85rem;
}

/* ========================================
   MODALS
   ======================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
}

.modal-content {
    position: relative;
    margin: 5% auto;
    padding: 2rem;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    background: #171717;
    border: 1px solid #2A2A2A;
    border-radius: 12px;
}

.modal-content h2 {
    color: #FFFFFF;
    margin-bottom: 1.5rem;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    cursor: default;
    color: #7A7A7A;
}

.close:hover {
    color: #EF4444;
}

/* ========================================
   AUTH PAGES
   ======================================== */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #0A0A0A;
}

.auth-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
}

.auth-card {
    background: #171717;
    border: 1px solid #2A2A2A;
    border-radius: 12px;
    padding: 2.5rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header .auth-icon {
    font-size: 3rem;
    color: #34C759;
    margin-bottom: 1rem;
}

.auth-header h1 {
    color: #FFFFFF;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #7A7A7A;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #2A2A2A;
    color: #7A7A7A;
}

.auth-footer a {
    color: #34C759;
    text-decoration: none;
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.alert-success {
    background: #111111;
    border: 1px solid #34C759;
    color: #34C759;
}

.alert-danger {
    background: #111111;
    border: 1px solid #EF4444;
    color: #EF4444;
}

/* ========================================
   FLASH MESSAGES
   ======================================== */
.flash-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    width: 100%;
}

.flash-message {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    border: 1px solid #2A2A2A;
    background: #171717;
}

.flash-success {
    color: #34C759;
    border-color: #34C759;
}

.flash-danger {
    color: #EF4444;
    border-color: #EF4444;
}

.flash-close {
    margin-left: auto;
    cursor: default;
    font-size: 1.5rem;
    color: #7A7A7A;
}

.flash-close:hover {
    color: #FFFFFF;
}

/* ========================================
   CONTAINER
   ======================================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 0.25rem;
}

.page-subtitle {
    color: #7A7A7A;
    font-size: 1rem;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .glass-nav {
        padding: 0.5rem 1rem;
    }
    
    .nav-container {
        /*flex-wrap: wrap;*/
        gap: 8px;
    }
    
    .nav-left {
        flex: 1;
        min-width: 0;
    }
    
    .nav-right {
        flex: 1;
        justify-content: flex-end;
        gap: 6px;
        flex-wrap: wrap;
    }
    
    .profile-section {
        padding: 4px 10px 4px 4px;
        gap: 8px;
    }
    
    .profile-avatar-nav {
        width: 32px;
        height: 32px;
    }
    
    .user-name {
        font-size: 0.75rem;
    }
    
    .user-id {
        font-size: 0.55rem;
    }
    
    .history-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .history-btn span {
        display: inline;
    }
    
    .wallet-card {
        padding: 4px 10px 4px 8px;
        gap: 6px;
    }
    
    .wallet-balance {
        font-size: 0.8rem;
    }
    
    .wallet-btn {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }
    
    .wallet-icon {
        font-size: 0.8rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .stats-dashboard {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .tournaments-grid {
        grid-template-columns: 1fr !important;
    }
    
    .deposit-layout, .withdraw-layout {
        grid-template-columns: 1fr !important;
    }
    
    .profile-stats {
        grid-template-columns: 1fr 1fr !important;
    }
    
    .card, .glass-card {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .tournament-details-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .room-details-section {
        grid-template-columns: 1fr;
    }
    
    .match-date {
        margin-left: 0;
        width: 100%;
    }
    
    .auth-card {
        padding: 1.5rem;
    }
    
    .btn-primary, .btn-secondary, .btn-danger, .btn-join {
        padding: 0.6rem 1rem;
        min-height: 44px;
        font-size: 0.9rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
    }
    
    .stat-icon i {
        font-size: 1.2rem;
    }
    
    .stat-info h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .glass-nav {
        padding: 0.4rem 0.6rem;
    }
    
    .nav-container {
        gap: 4px;
    }
    
    .nav-left {
        flex: 1 1 100%;
        justify-content: flex-start;
    }
    
    .nav-right {
        flex: 1 1 100%;
        justify-content: flex-end;
        gap: 4px;
    }
    
    .profile-section {
        padding: 3px 6px 3px 3px;
        gap: 6px;
    }
    
    .profile-avatar-nav {
        width: 28px;
        height: 28px;
        border-width: 1.5px;
    }
    
    .user-name {
        font-size: 0.7rem;
    }
    
    .user-id {
        font-size: 0.5rem;
    }
    
    .history-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
    
    .history-btn span {
        display: none;
    }
    
    .wallet-card {
        padding: 3px 6px 3px 4px;
        gap: 4px;
    }
    
    .wallet-balance {
        font-size: 0.7rem;
    }
    
    .wallet-btn {
        width: 20px;
        height: 20px;
        font-size: 0.5rem;
    }
    
    .wallet-icon {
        font-size: 0.7rem;
    }
    
    .container {
        padding: 0.6rem;
    }
    
    .stats-dashboard {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .card, .glass-card {
        padding: 0.75rem;
        border-radius: 10px;
    }
    
    .page-title {
        font-size: 1.2rem;
    }
    
    .tournament-card .card-banner {
        height: 150px;
    }
    
    .card-content {
        padding: 0.75rem;
    }
    
    .tournament-title {
        font-size: 1rem;
    }
    
    .match-info {
        font-size: 0.7rem;
        gap: 4px;
    }
    
    .btn-primary, .btn-secondary, .btn-danger, .btn-join {
        padding: 0.5rem 0.75rem;
        min-height: 40px;
        font-size: 0.8rem;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 1rem;
        width: 95%;
    }
    
    .auth-card {
        padding: 1rem;
    }
    
    .auth-header h1 {
        font-size: 1.3rem;
    }
    
    .flash-container {
        top: 60px;
        right: 10px;
        max-width: 90%;
    }
}
