/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --accent-gold: #FFD700;
    --accent-gold-dark: #DAA520;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --text-muted: #888888;
    --border-color: #333333;
    --success: #00ff00;
    --error: #ff4444;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    min-height: calc(100vh - 60px);
    padding: 20px;
}

/* ===== GLOW TEXT ===== */
.glow-text {
    color: var(--accent-gold);
    text-shadow: 
        0 0 10px rgba(255, 215, 0, 0.5),
        0 0 20px rgba(255, 215, 0, 0.3),
        0 0 30px rgba(255, 215, 0, 0.2);
    animation: glowPulse 2s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    from {
        text-shadow: 
            0 0 5px rgba(255, 215, 0, 0.3),
            0 0 10px rgba(255, 215, 0, 0.2),
            0 0 20px rgba(255, 215, 0, 0.1);
    }
    to {
        text-shadow: 
            0 0 20px rgba(255, 215, 0, 0.6),
            0 0 40px rgba(255, 215, 0, 0.4),
            0 0 60px rgba(255, 215, 0, 0.2);
    }
}

/* ===== BUTTONS ===== */
.btn-primary, .btn-secondary, .btn-small {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    color: var(--bg-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--accent-gold);
    color: var(--accent-gold);
}

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

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

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

.btn-large {
    padding: 16px 32px;
    font-size: 18px;
}

/* ===== DISCORD LOGIN ===== */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.login-box {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.1);
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.login-box h1 {
    font-size: 48px;
    margin-bottom: 10px;
}

.login-box h2 {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-weight: 400;
}

.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.feature {
    text-align: center;
}

.feature .icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

.feature p {
    font-size: 14px;
    color: var(--text-secondary);
}

.discord-login-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #5865F2;
    color: white;
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
}

.discord-login-btn:hover {
    background: #4752C4;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(88, 101, 242, 0.4);
}

.login-note {
    margin-top: 20px;
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== SIDEBAR ===== */
.sidebar {
    width: 250px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    color: var(--accent-gold);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--accent-gold);
}

.user-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-gold);
    color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
}

.user-details h4 {
    margin-bottom: 4px;
}

.user-tag {
    color: var(--text-muted);
    font-size: 14px;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item, .nav-subitem {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-item:hover, .nav-subitem:hover {
    background: var(--bg-tertiary);
    color: var(--accent-gold);
}

.nav-item.active {
    background: var(--bg-tertiary);
    color: var(--accent-gold);
    border-left: 3px solid var(--accent-gold);
}

.nav-submenu {
    padding-left: 20px;
}

.nav-subitem {
    font-size: 14px;
}

.sidebar-filters {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.sidebar-filters h4 {
    margin-bottom: 12px;
    color: var(--accent-gold);
    font-size: 14px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
}

.filter-label input[type="checkbox"] {
    cursor: pointer;
}

/* ===== MAIN CONTENT WITH SIDEBAR ===== */
.welcome-container,
.dashboard-container,
.global-container {
    display: flex;
}

.main-content {
    margin-left: 250px;
    padding: 40px;
    flex: 1;
}

/* ===== WELCOME PAGE ===== */
.welcome-greeting {
    font-size: 48px;
    margin-bottom: 40px;
    text-align: center;
}

.game-selection-box {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 16px;
}

.game-selection-box h2 {
    text-align: center;
    margin-bottom: 10px;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.game-card {
    position: relative;
    background: var(--bg-tertiary);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-card:hover:not(.disabled) {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.2);
}

.game-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-label {
    display: block;
    padding: 30px 20px;
    cursor: pointer;
}

.game-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
}

.game-label input[type="checkbox"]:checked ~ .game-overlay {
    opacity: 0.2;
}

.game-label input[type="checkbox"]:checked ~ .game-content {
    border: 2px solid var(--accent-gold);
}

.game-content {
    position: relative;
    z-index: 1;
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.game-content h3 {
    margin-bottom: 10px;
}

.coming-soon {
    display: inline-block;
    background: var(--bg-tertiary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 0;
}

/* ===== PROGRESS BAR ===== */
.progress-bar {
    display: flex;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto 40px;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.progress-step {
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
    position: relative;
    z-index: 1;
    font-size: 14px;
    color: var(--text-muted);
}

.progress-step.active {
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

/* ===== TIMEZONE PAGE ===== */
.timezone-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.timezone-box {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 16px;
}

.timezone-box h1 {
    text-align: center;
    margin-bottom: 20px;
}

.divider {
    text-align: center;
    margin: 30px 0;
    color: var(--text-muted);
    position: relative;
}

.divider::before,
.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border-color);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.search-box {
    margin: 20px 0;
}

.search-box input {
    width: 100%;
    padding: 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
}

.timezone-list {
    max-height: 400px;
    overflow-y: auto;
    margin: 20px 0;
    background: var(--bg-tertiary);
    border-radius: 8px;
    padding: 10px;
}

.tz-region {
    margin-bottom: 20px;
}

.tz-region h3 {
    color: var(--accent-gold);
    font-size: 16px;
    margin-bottom: 10px;
    padding-left: 10px;
}

.tz-item {
    display: block;
    padding: 10px;
    margin-bottom: 5px;
    background: var(--bg-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tz-item:hover {
    background: var(--bg-primary);
}

.tz-item input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
}

/* ===== AVAILABILITY PAGE ===== */
.availability-container {
    padding: 40px 20px;
}

.availability-box {
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 16px;
}

.week-info {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.availability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.day-column {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 15px;
}

.day-header {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--accent-gold);
}

.day-header h3 {
    font-size: 16px;
    margin-bottom: 5px;
}

.day-date {
    color: var(--text-muted);
    font-size: 14px;
}

.time-slots {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.time-slot {
    padding: 8px;
    margin-bottom: 4px;
    background: var(--bg-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    font-size: 12px;
}

.time-slot:hover {
    background: var(--bg-primary);
}

.time-slot.selected {
    background: var(--accent-gold);
    color: var(--bg-primary);
    font-weight: 600;
}

.day-actions {
    display: flex;
    gap: 5px;
    justify-content: space-between;
}

.multi-session-question {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.availability-actions {
    text-align: center;
    margin-top: 30px;
}

/* ===== PREFERENCES PAGE ===== */
.preferences-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.preferences-box {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 16px;
}

.preference-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.preference-section h3 {
    color: var(--accent-gold);
    margin-bottom: 20px;
}

.preference-item {
    margin-bottom: 20px;
}

.sub-item {
    margin-left: 30px;
    padding-left: 20px;
    border-left: 2px solid var(--border-color);
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: var(--bg-primary);
    border-radius: 13px;
    transition: all 0.3s ease;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--text-muted);
    top: 2px;
    left: 2px;
    transition: all 0.3s ease;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-label input[type="checkbox"]:checked ~ .toggle-slider {
    background: var(--accent-gold);
}

.toggle-label input[type="checkbox"]:checked ~ .toggle-slider::before {
    left: 26px;
    background: var(--bg-primary);
}

.help-text {
    margin-top: 8px;
    margin-left: 62px;
    font-size: 14px;
    color: var(--text-muted);
}

.preference-actions {
    text-align: center;
    margin-top: 30px;
}

/* ===== REVIEW PAGE ===== */
.review-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 40px 20px;
}

.review-box {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 16px;
}

.timezone-info {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.schedule-review {
    margin-bottom: 40px;
}

.game-schedule {
    background: var(--bg-tertiary);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.game-name {
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.schedule-days {
    display: grid;
    gap: 10px;
}

.schedule-day {
    background: var(--bg-secondary);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.day-label {
    font-weight: 600;
    min-width: 100px;
}

.times-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.time-badge {
    background: var(--accent-gold);
    color: var(--bg-primary);
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
}

.no-availability {
    text-align: center;
    color: var(--text-muted);
    padding: 20px;
}

.review-question {
    text-align: center;
    padding: 30px;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.review-question h2 {
    margin-bottom: 30px;
}

.review-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
}

.modal-content h2 {
    margin-bottom: 30px;
    text-align: center;
}

.edit-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ===== SUCCESS ANIMATION ===== */
.success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.success-message {
    text-align: center;
}

.thumbs-up {
    font-size: 120px;
    animation: bounceIn 0.6s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* ===== DASHBOARD ===== */
.dashboard-header {
    margin-bottom: 40px;
}

.dashboard-header h1 {
    margin-bottom: 10px;
}

.week-range {
    color: var(--text-secondary);
    font-size: 18px;
}

.timezone-badge {
    display: inline-block;
    background: var(--bg-tertiary);
    padding: 8px 16px;
    border-radius: 20px;
    margin-top: 10px;
}

.game-card-large {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
}

.game-header {
    padding-left: 20px;
    margin-bottom: 25px;
}

.weekly-calendar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.calendar-day {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
}

.calendar-day.has-availability {
    border: 2px solid var(--accent-gold);
}

.day-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.day-date {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 10px;
}

.time-blocks {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.time-block {
    background: var(--accent-gold);
    color: var(--bg-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.no-times {
    color: var(--text-muted);
    font-size: 14px;
}

.no-schedule {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-secondary);
    border-radius: 16px;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.empty-state h2 {
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* ===== GLOBAL AVAILABILITY ===== */
.global-header {
    margin-bottom: 30px;
}

.availability-legend {
    background: var(--bg-tertiary);
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.availability-legend h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.legend-items {
    display: flex;
    gap: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-item.bf6 .legend-dot {
    background: #00d4ff;
}

.legend-item.arc .legend-dot {
    background: #ff6b00;
}

.global-availability-list {
    display: grid;
    gap: 20px;
}

.player-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    padding: 25px;
}

.player-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.player-name {
    margin-bottom: 8px;
}

.player-games {
    display: flex;
    gap: 8px;
}

.game-badge {
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.game-badge.bf6 {
    background: #00d4ff;
    color: var(--bg-primary);
}

.game-badge.arc {
    background: #ff6b00;
    color: white;
}

.player-schedule {
    display: grid;
    gap: 20px;
}

.game-schedule-compact {
    background: var(--bg-tertiary);
    padding: 15px;
    border-radius: 12px;
}

.game-name-small {
    font-size: 14px;
    color: var(--accent-gold);
    margin-bottom: 12px;
}

.week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day-cell {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 10px 5px;
    text-align: center;
    min-height: 70px;
}

.day-cell.available {
    background: linear-gradient(135deg, var(--bg-secondary), rgba(255, 215, 0, 0.1));
    border: 1px solid var(--accent-gold);
}

.day-label {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 5px;
}

.times-mini {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.time-mini {
    font-size: 10px;
    background: var(--accent-gold);
    color: var(--bg-primary);
    padding: 2px 4px;
    border-radius: 3px;
}

.time-more {
    font-size: 10px;
    color: var(--text-muted);
}

.unavailable-mark {
    color: var(--text-muted);
    font-size: 18px;
}

/* ===== ERROR PAGE ===== */
.error-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.error-box {
    text-align: center;
    max-width: 500px;
    padding: 40px;
    background: var(--bg-secondary);
    border-radius: 16px;
}

.error-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.error-message {
    color: var(--text-secondary);
    margin: 20px 0 30px;
    font-size: 18px;
}

.error-actions {
    margin-top: 30px;
}

/* ===== FOOTER ===== */
footer {
    background: var(--bg-secondary);
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

footer .brand {
    color: var(--accent-gold);
    font-weight: 600;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gold);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-gold-dark);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        width: 100%;
        height: auto;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .welcome-container,
    .dashboard-container,
    .global-container {
        flex-direction: column;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .availability-grid {
        grid-template-columns: 1fr;
    }
    
    .week-grid {
        grid-template-columns: repeat(7, 1fr);
        font-size: 10px;
    }
    
    .review-actions {
        flex-direction: column;
    }
}
