/**
 * WP Highscore Frontend Styles
 */

/* ==========================================================================
   Leaderboard Container
   ========================================================================== */

.wp-highscore-leaderboard {
    margin: 40px 0;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.wp-highscore-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 25px 0;
    text-align: center;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.wp-highscore-empty {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

/* ==========================================================================
   Leaderboard Table
   ========================================================================== */

.wp-highscore-table-wrapper {
    overflow-x: auto;
    margin-bottom: 30px;
}

.wp-highscore-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    overflow: hidden;
}

.wp-highscore-table thead {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

.wp-highscore-table th {
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.8px;
    color: #ecf0f1;
}

.wp-highscore-table td {
    padding: 15px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.wp-highscore-table tbody tr {
    transition: background-color 0.2s ease;
}

.wp-highscore-table tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.1);
}

.wp-highscore-table tbody tr:last-child td {
    border-bottom: none;
}

/* Rank Column */
.rank-col {
    width: 60px;
    text-align: center;
}

.rank-badge {
    display: inline-block;
    width: 36px;
    height: 36px;
    line-height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
}

/* Top 3 Special Styling */
.rank-1 .rank-badge {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.4);
    font-size: 16px;
}

.rank-2 .rank-badge {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    box-shadow: 0 0 10px rgba(149, 165, 166, 0.3);
}

.rank-3 .rank-badge {
    background: linear-gradient(135deg, #cd7f32 0%, #b8732c 100%);
    box-shadow: 0 0 10px rgba(205, 127, 50, 0.3);
}

/* Nick Column */
.nick-col {
    width: 120px;
    font-size: 18px;
}

/* Score Column */
.score-col {
    font-size: 20px;
    font-weight: 700;
    color: #3498db;
}

/* Date Column */
.date-col {
    width: 150px;
    color: #95a5a6;
    font-size: 13px;
}

/* Current User Highlight */
.is-current-user {
    background-color: rgba(46, 204, 113, 0.1) !important;
}

.is-current-user .nick-col {
    color: #2ecc71;
}

/* ==========================================================================
   Submit Form
   ========================================================================== */

.wp-highscore-submit-form {
    background: rgba(0, 0, 0, 0.2);
    padding: 25px;
    border-radius: 6px;
    margin-top: 30px;
}

.wp-highscore-submit-form h4 {
    margin: 0 0 15px 0;
    font-size: 20px;
    font-weight: 600;
    color: #ffffff;
}

.submit-form-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 !important;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.submit-form-toggle:hover {
    color: #3498db;
}

.toggle-arrow {
    font-size: 16px;
    transition: transform 0.3s ease;
    display: inline-block;
}

.submit-form-toggle.expanded .toggle-arrow {
    transform: rotate(90deg);
}

.submit-form-content {
    margin-top: 15px;
}

.wp-highscore-current-score {
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(52, 152, 219, 0.1);
    border-left: 3px solid #3498db;
    border-radius: 3px;
    color: #3498db;
}

.wp-highscore-form .form-row {
    margin-bottom: 20px;
}

.wp-highscore-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
}

.wp-highscore-form label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.wp-highscore-form input[type="text"],
.wp-highscore-form input[type="number"] {
    width: 100%;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
}

.wp-highscore-form input[type="text"]:focus,
.wp-highscore-form input[type="number"]:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.wp-highscore-form input[type="text"]::placeholder,
.wp-highscore-form input[type="number"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.wp-highscore-submit-btn {
    display: inline-block;
    padding: 14px 32px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff !important;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(52, 152, 219, 0.3);
}

.wp-highscore-submit-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.wp-highscore-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.wp-highscore-message {
    display: none;
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.wp-highscore-message.success {
    background: rgba(46, 204, 113, 0.1);
    border-left: 3px solid #2ecc71;
    color: #2ecc71;
}

.wp-highscore-message.error {
    background: rgba(231, 76, 60, 0.1);
    border-left: 3px solid #e74c3c;
    color: #e74c3c;
}

/* ==========================================================================
   Login Required
   ========================================================================== */

.wp-highscore-login-required {
    text-align: center;
    padding: 30px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    margin-top: 30px;
}

.wp-highscore-login-required p {
    margin-bottom: 20px;
    color: #95a5a6;
}

.wp-highscore-login-btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.wp-highscore-login-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #21618c 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .wp-highscore-leaderboard {
        padding: 20px 15px;
    }
    
    .wp-highscore-title {
        font-size: 22px;
    }
    
    .wp-highscore-table {
        font-size: 14px;
    }
    
    .wp-highscore-table th,
    .wp-highscore-table td {
        padding: 10px 8px;
    }
    
    .date-col {
        display: none;
    }
    
    .nick-col {
        font-size: 16px;
    }
    
    .score-col {
        font-size: 16px;
    }
    
    .rank-badge {
        width: 32px;
        height: 32px;
        line-height: 32px;
        font-size: 12px;
    }
}
