
:root {
    --primary-color: #1a1a1a;
    --secondary-color: #2a2a2a;
    --accent-color-1: #0ec5c56b;  
    --accent-color-2: #ffdab9;  
    --accent-color-3: #d0f0c0; 
    --text-color: #ffffff;
}

body {
    font-family: Arial, sans-serif;
    background: linear-gradient(to bottom, var(--primary-color), #2c2c2c);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    min-height: 100vh;
}

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

.title-container {
    margin-bottom: 30px;
    padding: 10px 0;
    border-bottom: 2px solid var(--secondary-color);
}

.main-title {
    font-size: 1.6rem;
    color: var(--text-color);
    text-align: center;
    margin: 15px 0;
    padding: 30px 0;
    width: 90%;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    transition: all 0.4s ease;
    letter-spacing: 20px;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
    transform-origin: center;
}

.main-title::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.8s ease;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.4rem;
        width: 95%;
        padding: 20px 0;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
        padding: 15px 0;
        letter-spacing: 0.5px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .main-title {
        font-size: 2.4rem;
        width: 95%;
        padding: 20px 0;
        letter-spacing: 1px;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.8rem;
        padding: 15px 0;
        letter-spacing: 0.5px;
    }
}

.search-subheading {
    text-align: center;
    margin-bottom: 15px;
    font-size: 1.2em;
    color: rgb(138, 138, 138);
}

.search-section {
    margin-bottom: 40px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    position: relative;
}

@keyframes unfold {
    from {
        max-height: 0;
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        max-height: 200px;
        opacity: 1;
        transform: translateY(0);
    }
}

#global-search-results {
    position: absolute;
    top: 100%;
    left: 20px;
    right: 20px;
    background-color: var(--secondary-color);
    border-top: none;
    border-radius: 5px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    animation: unfold 0.3s ease-out;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-result-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.search-result-item img {
    width: 32px;
    height: 32px;
    margin-right: 10px;
}

.arrow {
    display: inline-block;
    animation: bounce 2s infinite alternate;
}

@keyframes bounce {
    from { transform: translateY(-1px); }
    to { transform: translateY(4px); }
}

#global-player-search {
    width: calc(100% - 40px);
    padding: 10px 20px;
    border: 1px solid var(--accent-color-1);
    border-radius: 5px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-size: 16px;
    margin: 0 auto;
    display: block;
}

#global-player-search:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(168, 216, 234, 0.5);
}

.controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.dropdown, .search-container {
    flex: 1;
    max-width: calc(50% - 10px);
}

#minigame-select, #player-search {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--accent-color-1);
    border-radius: 5px;
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-size: 16px;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/><path d="M0 0h24v24H0z" fill="none"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

#minigame-select:focus, #player-search:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(168, 216, 234, 0.5);
}

#player-search::placeholder {
    color: #aaa;
}

/* AG-Grid Custom Styling */
.ag-theme-alpine-dark {
    --ag-background-color: var(--secondary-color);
    --ag-header-background-color: #000000;
    --ag-odd-row-background-color: #333333;
    --ag-row-hover-color: rgba(255, 255, 255, 0.05);
    --ag-selected-row-background-color: rgba(14, 197, 197, 0.2);
    --ag-border-color: var(--secondary-color);
    --ag-header-column-separator-color: var(--secondary-color);
    --ag-cell-horizontal-border: solid var(--secondary-color);
    --ag-font-family: Arial, sans-serif;
    --ag-font-size: 14px;
    --ag-foreground-color: var(--text-color);
    --ag-header-foreground-color: var(--text-color);
    border: none;
}

.ag-header-cell-sortable:hover {
    background-color: #1a1a1a !important;
}

.ag-header-cell.ag-header-cell-sorted-asc,
.ag-header-cell.ag-header-cell-sorted-desc {
    background-color: var(--accent-color-1) !important;
    color: var(--primary-color) !important;
}

.ag-row:hover .ag-cell {
    color: var(--accent-color-2) !important;
}

.player-avatar {
    width: 32px;
    height: 32px;
    vertical-align: middle;
    margin-right: 10px;
}

.player-name {
    cursor: pointer;
    transition: color 0.3s ease;
}

.player-name:hover {
    color: var(--accent-color-1);
}

.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 200px;
}

.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid var(--accent-color-3);
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

#records-grid {
    height: 500px;
    width: 100%;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

#records-grid.loaded {
    opacity: 1;
}

.rank-1 {
    color: rgb(226, 173, 0) !important;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(226, 155, 0, 0.5);
}
.rank-2 {
    color: rgb(214, 237, 243) !important;
    font-weight: bold;
    text-shadow: 0 0 4px rgba(212, 246, 255, 0.5);
}
.rank-3 {
    color: rgb(175, 106, 2) !important;
    font-weight: bold;
    text-shadow: 0 0 3px rgba(182, 111, 4, 0.5);
}
.rank-other {
    color: #A0A0A0 !important;
}

.video-link {
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.video-link:hover {
    opacity: 0.7;
}

.video-links-container {
    margin-top: 20px;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.video-links-container h3 {
    color: var(--accent-color-1);
    margin-bottom: 15px;
}

.video-links-container h4 {
    color: var(--accent-color-2);
    margin-top: 15px;
    margin-bottom: 10px;
}

.video-link-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    transition: background-color 0.3s ease;
    margin-bottom: 10px;
}

.video-link-item:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.video-link-player {
    flex-grow: 1;
    color: var(--text-color);
}

.video-link-time {
    margin-right: 15px;
    color: var(--accent-color-3);
}

.video-link-button {
    padding: 5px 10px;
    background-color: var(--accent-color-1);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.video-link-button:hover {
    background-color: var(--accent-color-2);
}

.legend {
    margin-top: 10px;
    color: rgb(168, 168, 168);
    font-size: 0.9em;
    text-align: center;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: var(--secondary-color);
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #444;
    width: 90%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.close {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: var(--accent-color-2);
}

.player-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    padding-right: 40px;
}

.player-avatar-name {
    display: flex;
    align-items: center;
}

.player-avatar-name img {
    width: 100px;
    height: 100px;
    margin-right: 20px;
    border-radius: 8px;
}

.player-avatar-name h2 {
    margin: 0;
    font-size: 24px;
}

.player-prefix {
    font-weight: bold;
    margin-right: 5px;
    padding: 2px 5px;
    border-radius: 3px;
    color: white;
}

.player-stats {
    text-align: right;
}

.player-stats p {
    margin: 5px 0;
    font-size: 14px;
}

.player-stats p strong {
    color: var(--accent-color-1);
}

.profile-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 20px;
}

.profile-table th,
.profile-table td {
    border: 1px solid #444;
    padding: 10px;
    text-align: left;
}

.profile-table th {
    background-color: var(--primary-color);
    font-weight: bold;
}

.profile-table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

.minigame-section {
    margin-top: 30px;
}

.minigame-section h3 {
    color: var(--accent-color-2);
    margin-bottom: 10px;
}

.expand-button {
    background: none;
    border: none;
    color: var(--accent-color-1);
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 0.9em;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.expand-button:hover {
    color: var(--accent-color-2);
}

.expand-icon {
    margin-right: 5px;
}

.site-footer {
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background-color: rgba(0, 0, 0, 0.2);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-separator {
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.3);
}

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

.site-footer a:hover {
    color: var(--accent-color-2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .controls-container {
        flex-direction: column;
        align-items: stretch;
    }

    .dropdown,
    .search-container {
        max-width: none;
        margin-bottom: 10px;
    }

    .player-profile-header {
        flex-direction: column;
    }

    .player-stats {
        text-align: left;
        margin-top: 15px;
    }

    .main-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }

    .player-avatar-name img {
        width: 80px;
        height: 80px;
    }
}

.search-result-item.highlighted {
    background-color: rgba(14, 197, 197, 0.3) !important;
    border-left: 3px solid var(--accent-color-1);
}

.search-result-item {
    transition: background-color 0.2s ease;
}


/* Hotkey Indicators */
.hotkey-hints {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 100;
    pointer-events: none;
}

.hotkey-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(42, 42, 42, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 8px 12px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    opacity: 0;
    transform: translateX(20px);
    animation: slideInHint 0.5s ease-out forwards;
    transition: all 0.3s ease;
}

.hotkey-hint:nth-child(1) { animation-delay: 0.1s; }
.hotkey-hint:nth-child(2) { animation-delay: 0.2s; }
.hotkey-hint:nth-child(3) { animation-delay: 0.3s; }

@keyframes slideInHint {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hotkey-hint:hover {
    background: rgba(42, 42, 42, 0.95);
    border-color: var(--accent-color-1);
    transform: scale(1.02);
    pointer-events: auto;
    cursor: help;
}

.hotkey-key {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--accent-color-1);
    text-shadow: 0 0 2px rgba(14, 197, 197, 0.3);
    min-width: 20px;
    text-align: center;
}

.hotkey-hint.modal-open {
    opacity: 0.3;
}

.hotkey-hint.modal-hint {
    opacity: 1 !important;
    background: rgba(14, 197, 197, 0.1);
    border-color: var(--accent-color-1);
}

/* Search bar enhancement */
.search-enhancement {
    position: relative;
}

.search-hotkey-indicator {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    gap: 4px;
    pointer-events: none;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.search-hotkey-indicator .hotkey-key {
    font-size: 0.7rem;
    padding: 1px 4px;
    background: rgba(255, 255, 255, 0.05);
}

#global-player-search:focus + .search-hotkey-indicator {
    opacity: 0.8;
}

.nav-avatar {
    width: 16px !important;
    height: 16px !important;
    border-radius: 2px;
    margin-right: 8px;
    vertical-align: middle;
    display: inline-block;
    flex-shrink: 0;
    background-color: rgba(255, 255, 255, 0.1); /* Fallback background */
}

.nav-link {
    display: flex !important;
    align-items: center;
    gap: 8px;
}

/* Debug styling - remove after confirming it works */
.nav-avatar {
    border: 1px solid rgba(14, 197, 197, 0.5); /* Temporary border to see if avatar loads */
}

@media (max-width: 768px) {
    .nav-avatar {
        display: none;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hotkey-hints {
        bottom: 10px;
        right: 10px;
        font-size: 0.8rem;
    }

    .hotkey-hint {
        padding: 6px 8px;
    }

    .hotkey-key {
        padding: 1px 4px;
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .hotkey-hints {
        display: none; /* Hide on very small screens */
    }
}

/* Registration Page Styles */

/* Avatar sizes */
.verification-avatar.large {
    width: 128px;
    height: 128px;
}

.verification-avatar {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    border: 2px solid var(--accent-color-1);
    box-shadow: 0 4px 12px rgba(14, 197, 197, 0.3);
    flex-shrink: 0;
}

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

/* Fixed user info layout */
.minecraft-user-info-fixed {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(14, 197, 197, 0.3);
}

.user-details-fixed {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.user-name-row {
    display: flex;
    align-items: center;
    min-height: 24px;
}

.user-label {
    width: 80px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    flex-shrink: 0;
}

.user-value {
    color: var(--accent-color-1);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Welcome message */
.welcome-message {
    margin: 30px 0;
    padding: 25px;
    background: rgba(208, 240, 192, 0.1);
    border: 1px solid rgba(208, 240, 192, 0.3);
    border-radius: 15px;
}

.welcome-message h4 {
    color: var(--accent-color-3);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.feature-list li {
    padding: 8px 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.feature-list li:before {
    content: "→ ";
    color: var(--accent-color-1);
    font-weight: bold;
    margin-right: 8px;
}

/* Action buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-button.primary {
    background: linear-gradient(135deg, var(--accent-color-1), rgba(14, 197, 197, 0.8));
    color: var(--primary-color);
}

.auth-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-button.primary:hover,
.auth-button.secondary:hover {
    transform: translateY(-2px);
}

/* Registration explanation */
.registration-explanation {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.registration-explanation p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    text-align: center;
}

/* Verification info box */
.verification-info-box {
    background: rgba(14, 197, 197, 0.1);
    border: 1px solid rgba(14, 197, 197, 0.3);
    border-radius: 10px;
    padding: 20px;
    margin-top: 10px;
}

.verification-info-box h4 {
    color: var(--accent-color-1);
    margin: 0 0 10px 0;
    font-size: 1.1rem;
}

.verification-info-box p,
.verification-info-box ol {
    margin: 10px 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

.verification-info-box ol {
    padding-left: 20px;
}

.verification-info-box .note {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

/* Verified badge */
.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(208, 240, 192, 0.2);
    color: var(--accent-color-3);
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid rgba(208, 240, 192, 0.3);
    font-weight: bold;
    font-size: 0.9rem;
    margin-top: 10px;
}

.success-message {
    color: var(--accent-color-3);
    font-weight: bold;
    margin: 5px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .auth-button {
        width: 200px;
    }
    
    .verification-steps ol {
        padding-left: 15px;
    }
    
    .minecraft-user-info-fixed {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    
    .user-name-row {
        justify-content: center;
        gap: 10px;
    }
}

/* Authentication Styles - Add this to your main.css */

/* Navigation Auth Section */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-username {
    color: var(--accent-color-1);
    font-weight: bold;
    padding: 8px 12px;
    background: rgba(14, 197, 197, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(14, 197, 197, 0.3);
}

.nav-link.logout {
    color: var(--accent-color-2);
}

.nav-link.logout:hover {
    background: rgba(255, 218, 185, 0.1);
}

.nav-link.register {
    background: linear-gradient(135deg, var(--accent-color-1), rgba(14, 197, 197, 0.8));
    color: var(--primary-color);
    font-weight: bold;
    border-radius: 6px;
    padding: 8px 16px;
}

.nav-link.register:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 197, 197, 0.3);
}

/* Authentication Forms */
.auth-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: linear-gradient(135deg, var(--secondary-color), rgba(42, 42, 42, 0.8));
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.auth-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-color);
    font-size: 2rem;
    font-weight: bold;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

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

.form-label {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input {
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color-1);
    box-shadow: 0 0 0 2px rgba(14, 197, 197, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.auth-button {
    padding: 14px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-color-1), rgba(14, 197, 197, 0.8));
    color: var(--primary-color);
    font-weight: bold;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 197, 197, 0.4);
}

.auth-link {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.7);
}

.auth-link a {
    color: var(--accent-color-1);
    text-decoration: none;
    font-weight: bold;
}

.auth-link a:hover {
    color: var(--accent-color-2);
}

/* Flash Messages */
.flash-messages {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.flash-message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-weight: 500;
    animation: slideIn 0.3s ease-out;
}

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

.flash-success {
    background: rgba(208, 240, 192, 0.2);
    color: var(--accent-color-3);
    border: 1px solid rgba(208, 240, 192, 0.3);
}

.flash-error {
    background: rgba(255, 99, 99, 0.2);
    color: #ff9999;
    border: 1px solid rgba(255, 99, 99, 0.3);
}

.flash-info {
    background: rgba(14, 197, 197, 0.2);
    color: var(--accent-color-1);
    border: 1px solid rgba(14, 197, 197, 0.3);
}

/* Admin Panel */
.admin-container {
    margin-top: 30px;
}

.admin-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

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

.users-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.users-table th,
.users-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.users-table th {
    background: var(--primary-color);
    color: var(--accent-color-1);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.users-table td {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-color);
}

.users-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.admin-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.delete-button {
    background: #ff4757;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.3s ease;
}

.delete-button:hover {
    background: #ff3838;
    transform: scale(1.05);
}

/* Responsive Design for Auth */
@media (max-width: 768px) {
    .auth-container {
        margin: 50px 20px;
        padding: 30px 20px;
    }
    
    .nav-auth {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    
    .nav-username {
        text-align: center;
    }
    
    .nav-links.mobile-active .nav-auth {
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Updated Navigation Styles - Replace existing navigation CSS */

/* Navigation */
.main-nav {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    height: 50px; /* Reduced height for minimalist look */
}

/* Remove nav-brand styles completely */

.nav-links {
    display: flex;
    gap: 40px; /* Increased gap for minimalist spacing */
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 8px 0; /* Minimal padding */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    position: relative;
    font-weight: 400; /* Lighter weight */
    font-size: 0.9rem; /* Smaller text */
    border-bottom: 2px solid transparent;
}

.nav-link:hover {
    color: var(--text-color);
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.nav-link.active {
    color: var(--text-color);
    border-bottom-color: var(--accent-color-1);
    font-weight: 500;
}

/* Remove nav-icon styles completely */

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
    gap: 3px;
}

.nav-mobile-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-color);
    border-radius: 1px;
    transition: all 0.3s ease;
}

.nav-mobile-toggle:hover span {
    background: var(--accent-color-1);
}

/* Main content adjustment for navigation */
.main-content {
    min-height: calc(100vh - 50px); /* Adjusted for new nav height */
}

/* Navigation Auth Section - Updated */
.nav-auth {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-username {
    color: var(--accent-color-1);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 4px 8px;
    background: rgba(14, 197, 197, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(14, 197, 197, 0.2);
}

.nav-link.logout {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.nav-link.logout:hover {
    color: var(--accent-color-2);
}

.nav-link.register {
    background: var(--accent-color-1);
    color: var(--primary-color);
    font-weight: 500;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.85rem;
}

.nav-link.register:hover {
    background: rgba(14, 197, 197, 0.8);
    transform: none; /* Remove transform for minimalist feel */
    box-shadow: none;
}

/* Mobile Navigation - Updated */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 50px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 50px);
        background: rgba(26, 26, 26, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 40px;
        transition: left 0.3s ease;
        gap: 30px;
    }

    .nav-links.mobile-active {
        left: 0;
    }

    .nav-mobile-toggle {
        display: flex;
    }

    .nav-mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .nav-link {
        font-size: 1rem;
        padding: 10px 0;
    }

    .nav-auth {
        flex-direction: column;
        gap: 15px;
        align-items: center;
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Updated Admin Panel Styles */
.host-badge {
    background: linear-gradient(135deg, var(--accent-color-2), rgba(255, 218, 185, 0.8));
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.user-badge {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
}

.role-select {
    background: var(--secondary-color);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8rem;
    cursor: pointer;
}

.role-select:focus {
    outline: none;
    border-color: var(--accent-color-1);
}

/* Adjust existing container for minimalist nav */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 30px; /* Reduced from 20px */
}

/* Tournament Edit Styles - Add to main.css */

/* Tournament Actions */
.tournament-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.action-button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
}

.action-button.primary {
    background: linear-gradient(135deg, var(--accent-color-1), rgba(14, 197, 197, 0.8));
    color: var(--primary-color);
}

.action-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 197, 197, 0.3);
}

.action-button.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-button.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Tournament Card Edit Actions */
.tournament-edit-actions {
    position: absolute;
    top: 50px;
    right: 15px;
    display: flex;
    gap: 8px;
}

.edit-button {
    background: var(--accent-color-2);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.edit-button:hover {
    background: rgba(255, 218, 185, 0.8);
    transform: scale(1.05);
}

.delete-button-small {
    background: #ff4757;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.delete-button-small:hover {
    background: #ff3838;
    transform: scale(1.05);
}

/* Tournament Edit Form */
.tournament-edit-container {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--secondary-color), rgba(42, 42, 42, 0.8));
    border-radius: 15px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tournament-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.form-input,
.form-textarea {
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-color-1);
    box-shadow: 0 0 0 2px rgba(14, 197, 197, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
}

.empty-state h3 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.empty-state p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .tournament-edit-container {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .tournament-actions {
        justify-content: center;
        margin-top: 15px;
    }
    
    .tournament-edit-actions {
        position: static;
        justify-content: center;
        margin-top: 15px;
        margin-bottom: 10px;
    }
    
    .tournament-card {
        padding-top: 60px; /* Make room for edit buttons */
    }
}

/* Tournament Management Styles */
.tournament-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 20px;
}

.tournament-title-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.tournament-status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.tournament-status-badge.active {
    background: var(--accent-color-3);
    color: var(--primary-color);
}

.tournament-status-badge.upcoming {
    background: var(--accent-color-1);
    color: var(--primary-color);
}

.tournament-status-badge.completed {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-color);
}

.tournament-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.tournament-management-grid {
    display: grid;
    gap: 25px;
}

.management-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.section-header h3 {
    color: var(--text-color);
    margin: 0;
}

.toggle-section {
    background: none;
    border: none;
    color: var(--accent-color-1);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 5px;
}

.view-full-link {
    color: var(--accent-color-1);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.view-full-link:hover {
    color: var(--accent-color-2);
}

/* Add Participant Form */
.add-participant-form {
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    gap: 10px;
}

.form-input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color-1);
}

.form-input.valid {
    border-color: var(--accent-color-3);
}

.form-input.invalid {
    border-color: #ff4757;
}

.form-button {
    background: var(--accent-color-1);
    color: var(--primary-color);
    border: none;
    padding: 12px 20px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-button:hover {
    background: var(--accent-color-2);
    transform: translateY(-2px);
}

/* Participants Grid */
.participants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.participant-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.participant-card:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-2px);
}

.participant-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 4px;
}

.participant-info {
    flex: 1;
}

.participant-name {
    display: block;
    color: var(--text-color);
    font-weight: bold;
}

.participant-added {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.8rem;
}

.remove-button {
    background: #ff4757;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-button:hover {
    background: #ff3838;
    transform: scale(1.1);
}

/* Match Cards */
.matches-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.match-card {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid var(--accent-color-1);
}

.match-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.match-header h4 {
    color: var(--text-color);
    margin: 0;
}

.match-order {
    background: var(--accent-color-2);
    color: var(--primary-color);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
}

.match-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.result-count {
    color: var(--accent-color-3);
    font-weight: bold;
}

.match-preview details {
    margin-top: 10px;
}

.match-preview summary {
    cursor: pointer;
    color: var(--accent-color-1);
    font-size: 0.9rem;
}

.log-preview {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 5px;
    overflow-x: auto;
    white-space: pre-wrap;
}

.match-results ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.match-results li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    margin-bottom: 5px;
}

.match-results .player {
    color: var(--text-color);
    font-weight: bold;
}

.match-results .placement {
    color: var(--accent-color-2);
    font-weight: bold;
}

.match-results .points {
    color: var(--accent-color-3);
    font-size: 0.9rem;
}

/* Standings Preview */
.standings-preview {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.standing-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    transition: background 0.3s ease;
}

.standing-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.standing-rank {
    font-weight: bold;
    color: var(--accent-color-1);
    min-width: 20px;
}

.standing-avatar img {
    width: 24px;
    height: 24px;
    border-radius: 3px;
}

.standing-name {
    flex: 1;
    color: var(--text-color);
    font-weight: bold;
}

.standing-points {
    color: var(--accent-color-2);
    font-weight: bold;
    min-width: 50px;
}

.standing-matches {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    min-width: 60px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: rgba(255, 255, 255, 0.6);
}

.empty-state a {
    color: var(--accent-color-1);
    text-decoration: none;
}

.empty-state a:hover {
    color: var(--accent-color-2);
}

/* Tournament Actions */
.tournament-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.action-button.tertiary {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.action-button.tertiary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .tournament-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .tournament-title-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .participants-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .match-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .match-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .tournament-actions {
        flex-direction: column;
        align-items: center;
    }
}