/* Reusable Components */

/* Leaderboard */
.leaderboard {
    margin-top: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border: 2px solid #0ff;
    max-height: 300px;
    overflow-y: auto;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    margin: 5px 0;
    background: rgba(0, 255, 255, 0.1);
    border: 1px solid #0ff;
    font-size: 9px;
    color: #0ff;
}

.leaderboard-entry.top1 {
    border-color: #ff0;
    color: #ff0;
    background: rgba(255, 255, 0, 0.1);
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.3);
}

/* Player Input Section */
.player-input-section {
    margin-top: 15px;
    padding: 15px;
    background: rgba(0, 255, 0, 0.1);
    border: 2px solid #0f0;
}

.player-input-section input {
    padding: 10px;
    font-size: 10px;
    font-family: 'Press Start 2P', cursive;
    border: 2px solid #0f0;
    background: #000;
    color: #0f0;
    margin-right: 10px;
    width: 200px;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

.player-input-section label {
    color: #0f0;
    margin-right: 10px;
    font-size: 10px;
    text-shadow: 0 0 5px #0f0;
}

/* Navigation */
.nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nav a {
    color: #0ff;
    text-decoration: none;
    padding: 10px 20px;
    border: 2px solid #0ff;
    background: rgba(0, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-size: 10px;
    text-shadow: 0 0 5px #0ff;
}

.nav a:hover {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
    transform: scale(1.05);
}

.nav a.active {
    background: rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.5);
}

/* Cards */
.card {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid #0ff;
    padding: 20px;
    margin: 10px 0;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.card h3 {
    color: #ff00ff;
    margin-bottom: 15px;
    font-size: 14px;
    text-shadow: 0 0 10px #ff00ff;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #0ff;
    font-size: 10px;
    text-shadow: 0 0 5px #0ff;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    font-size: 10px;
    font-family: 'Press Start 2P', cursive;
    border: 2px solid #0ff;
    background: #000;
    color: #0ff;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.3);
}

/* Messages */
.message {
    padding: 10px;
    margin: 10px 0;
    border: 2px solid;
    font-size: 9px;
    text-align: center;
}

.message.success {
    color: #0f0;
    border-color: #0f0;
    background: rgba(0, 255, 0, 0.1);
    text-shadow: 0 0 5px #0f0;
}

.message.error {
    color: #f00;
    border-color: #f00;
    background: rgba(255, 0, 0, 0.1);
    text-shadow: 0 0 5px #f00;
}

.message.info {
    color: #0ff;
    border-color: #0ff;
    background: rgba(0, 255, 255, 0.1);
    text-shadow: 0 0 5px #0ff;
}

/* Loading */
.loading {
    text-align: center;
    color: #0ff;
    font-size: 9px;
    padding: 20px;
}

/* Grid Layout */
.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Buttons */
button {
    padding: 12px 24px;
    font-size: 12px;
    font-family: 'Press Start 2P', cursive;
    border: 3px solid;
    cursor: pointer;
    transition: all 0.1s ease;
    color: #000;
    text-transform: uppercase;
}

.btn-primary {
    background: #0f0;
    border-color: #0f0;
    color: #000;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.5);
}

.btn-primary:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.8);
}

.btn-primary:disabled {
    background: #555;
    border-color: #555;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-danger {
    background: #f00;
    border-color: #f00;
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.btn-danger:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.8);
}

.btn-warning {
    background: #ff0;
    border-color: #ff0;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 255, 0, 0.5);
}

.btn-warning:hover:not(:disabled) {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 255, 0, 0.8);
}

button:active:not(:disabled) {
    transform: scale(0.95);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }

.hidden { display: none; }
.visible { display: block; }

/* Mobile-First Component Styles */

/* Small mobile devices (320px and up) */
@media (max-width: 480px) {
    .nav {
        flex-direction: column;
        gap: 8px;
    }
    
    .nav a {
        font-size: 8px;
        padding: 8px 12px;
        margin: 2px;
    }
    
    .card {
        padding: 12px;
        margin: 8px 0;
    }
    
    .card h3 {
        font-size: 10px;
        margin-bottom: 10px;
    }
    
    .leaderboard {
        max-height: 200px;
        padding: 10px;
    }
    
    .leaderboard-entry {
        font-size: 8px;
        padding: 6px;
    }
    
    .form-group input,
    .form-group select {
        font-size: 8px;
        padding: 8px;
    }
    
    .form-group label {
        font-size: 8px;
    }
    
    .message {
        font-size: 8px;
        padding: 8px;
    }
}

/* Medium mobile devices (481px and up) */
@media (min-width: 481px) and (max-width: 768px) {
    .nav {
        gap: 12px;
    }
    
    .nav a {
        font-size: 9px;
        padding: 10px 15px;
    }
    
    .card {
        padding: 15px;
    }
    
    .leaderboard {
        max-height: 250px;
    }
}

/* Tablet and up (769px and up) */
@media (min-width: 769px) {
    .nav {
        gap: 20px;
    }
    
    .nav a {
        font-size: 10px;
        padding: 10px 20px;
    }
    
    .card {
        padding: 20px;
    }
    
    .leaderboard {
        max-height: 300px;
    }
}
