* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
    padding: 20px;
    color: #e8e8e8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #2d2d2d;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 40px;
    animation: fadeIn 0.5s ease-in;
    border: 1px solid #3a3a3a;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    text-align: center;
    margin-bottom: 40px;
}

header h1 {
    font-size: 3em;
    color: #f0d9b5;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.1em;
    color: #b0b0b0;
    font-weight: 400;
}

.mode-selector {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 30px auto 40px;
    max-width: 600px;
}

.mode-btn {
    flex: 1;
    padding: 20px 30px;
    font-size: 1.1em;
    font-weight: 600;
    background: #252525;
    border: 2px solid #3a3a3a;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #e8e8e8;
}

.mode-btn:hover {
    border-color: #739552;
    background: #2d2d2d;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(115, 149, 82, 0.2);
}

.mode-btn.active {
    background: #739552;
    color: white;
    border-color: #8fb069;
    box-shadow: 0 5px 20px rgba(115, 149, 82, 0.4);
}

.mode-icon {
    font-size: 1.5em;
}

.mode-btn:active {
    transform: translateY(0);
}

.search-section {
    max-width: 600px;
    margin: 0 auto 40px;
}

.input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

#username {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.1em;
    background: #1f1f1f;
    color: #e8e8e8;
    border: 2px solid #3a3a3a;
    border-radius: 10px;
    transition: all 0.3s ease;
}

#username:focus {
    outline: none;
    border-color: #739552;
    box-shadow: 0 0 0 3px rgba(115, 149, 82, 0.2);
    background: #252525;
}

#username::placeholder {
    color: #888;
}

#searchBtn {
    padding: 15px 30px;
    font-size: 1.1em;
    background: #739552;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    min-width: 160px;
}

#searchBtn:hover {
    background: #8fb069;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(115, 149, 82, 0.4);
}

#searchBtn:active {
    transform: translateY(0);
    background: #6a8a4a;
}

#searchBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.hint {
    text-align: center;
    color: #888;
    font-size: 0.9em;
}

.time-period-section {
    margin-top: 30px;
    padding: 20px;
    background: #252525;
    border-radius: 10px;
    border: 1px solid #3a3a3a;
}

.time-period-label {
    display: block;
    font-size: 1.1em;
    font-weight: 600;
    color: #e8e8e8;
    margin-bottom: 15px;
    text-align: center;
}

.time-period-options {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    background: #1f1f1f;
    border: 2px solid #3a3a3a;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.radio-option:hover {
    border-color: #739552;
    background: #2a2a2a;
}

.radio-option input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
    accent-color: #739552;
}

.radio-option span {
    font-size: 1em;
    color: #e8e8e8;
    font-weight: 500;
}

.radio-option:has(input:checked) {
    background: #739552;
    border-color: #8fb069;
}

.radio-option:has(input:checked) span {
    color: #ffffff;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: #252525;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    animation: slideUp 0.5s ease-out;
    border: 1px solid #3a3a3a;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    border-color: #4a4a4a;
}

.stat-card.total {
    background: #739552;
    color: white;
    grid-column: span 2;
    border-color: #8fb069;
}

.stat-card.total:hover {
    background: #8fb069;
    border-color: #9fc075;
}

.stat-icon {
    font-size: 3em;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 5px;
    color: #f0d9b5;
}

.stat-card.total .stat-value {
    color: white;
}

.stat-label {
    font-size: 1em;
    color: #b0b0b0;
    opacity: 0.9;
}

.stat-card.total .stat-label {
    color: rgba(255, 255, 255, 0.95);
}

.details-section {
    margin-top: 40px;
}

.details-section h2 {
    color: #f0d9b5;
    margin-bottom: 20px;
    font-size: 1.8em;
    font-weight: 600;
}

.players-list {
    display: grid;
    gap: 15px;
}

.player-card {
    background: #252525;
    padding: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    border-left: 4px solid #739552;
    border: 1px solid #3a3a3a;
    border-left-width: 4px;
}

.player-card:hover {
    background: #2d2d2d;
    transform: translateX(5px);
    border-color: #4a4a4a;
    border-left-color: #8fb069;
}

.cheater-card {
    border-left-color: #8b2e2e !important;
}

.cheater-card:hover {
    border-left-color: #a03a3a !important;
    background: #2d1f1f;
}

.player-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.player-title {
    font-weight: bold;
    font-size: 1.2em;
    color: white;
    background: #739552;
    padding: 5px 15px;
    border-radius: 20px;
    min-width: 60px;
    text-align: center;
}

.cheater-badge {
    background: #8b2e2e !important;
}

.player-username {
    font-size: 1.3em;
    font-weight: 600;
    color: #e8e8e8;
}

.player-link {
    color: #739552;
    text-decoration: none;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.player-link:hover {
    color: #8fb069;
}

.error-message {
    background: #3a2525;
    color: #ff6b6b;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
    border: 1px solid #5a3535;
}

.loading-message {
    text-align: center;
    padding: 40px;
    color: #b0b0b0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #3a3a3a;
    border-top: 5px solid #739552;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

footer {
    text-align: center;
    color: #b0b0b0;
    margin-top: 40px;
    font-size: 0.95em;
}

footer p {
    margin: 0;
}

footer .brand-name {
    color: #f0d9b5;
    font-weight: 700;
    font-size: 1.05em;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.clear-cache-btn {
    margin-top: 10px;
    padding: 8px 16px;
    background: rgba(115, 149, 82, 0.2);
    color: #8fb069;
    border: 1px solid rgba(115, 149, 82, 0.4);
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.clear-cache-btn:hover {
    background: rgba(115, 149, 82, 0.3);
    border-color: rgba(115, 149, 82, 0.6);
    color: #9fc075;
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .mode-selector {
        flex-direction: column;
        gap: 10px;
    }
    
    .mode-btn {
        width: 100%;
    }
    
    .stat-card.total {
        grid-column: span 1;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .time-period-options {
        flex-direction: column;
        gap: 8px;
    }
    
    .radio-option {
        width: 100%;
        justify-content: center;
    }
}

