/* =============== PLAYER GAMES CSS =============== */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Container styles */
#thrilliant-games-player {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Card styles */
.card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.card-header h2 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
}

.card-body {
    padding: 20px;
}

/* Button styles */
.button {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    margin: 5px;
    min-width: 100px;
}

.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.button.primary {
    background: #007cba;
    color: white;
}

.button.primary:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-1px);
}

.button.secondary {
    background: #f0f0f0;
    color: #333;
    border: 1px solid #ddd;
}

.button.secondary:hover:not(:disabled) {
    background: #e0e0e0;
    transform: translateY(-1px);
}

/* Text control styles */
.text-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    margin: 5px 0;
    transition: border-color 0.2s ease;
}

.text-control:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 123, 186, 0.2);
}

/* Games list styles */
.games-list {
    margin-top: 20px;
}

.games-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.games-header h2 {
    margin: 0;
    color: #333;
}

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

.user-info span {
    color: #666;
    font-weight: 500;
}

/* Games grid */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.game-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.game-card .card-body {
    text-align: center;
    padding: 25px;
}

.game-icon {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.game-card h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.3em;
}

.game-card p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 0.9em;
}

.game-meta {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.game-meta span {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
}

.game-meta .category {
    background: #e3f2fd;
    color: #1976d2;
}

.game-meta .age-rating {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Game play styles */
.game-play {
    max-width: 800px;
    margin: 0 auto;
}

.game-header {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.game-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-title .game-icon {
    font-size: 24px;
}

.game-title h2 {
    margin: 0;
    color: #333;
    font-size: 1.5em;
}

.game-progress {
    color: #666;
    font-weight: 500;
    text-align: center;
}

.game-score {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.score-label {
    color: #666;
    font-weight: 500;
}

.score-value {
    color: #007cba;
    font-weight: bold;
    font-size: 1.2em;
}

.game-controls {
    margin-top: 20px;
    text-align: center;
}

/* Question styles */
.question-card {
    margin-bottom: 20px;
}

.question-content h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 1.4em;
}

.question-description {
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.option-button {
    padding: 15px 20px;
    text-align: left;
    justify-content: flex-start;
    min-height: 60px;
    white-space: normal;
    word-wrap: break-word;
}

/* Word scramble styles */
.scrambled-word {
    font-size: 2em;
    font-weight: bold;
    color: #007cba;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    text-align: center;
    letter-spacing: 2px;
}

.hint {
    color: #666;
    font-style: italic;
    margin: 10px 0;
}

/* Leaderboard styles */
.leaderboard {
    max-width: 800px;
    margin: 0 auto;
}

.leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.leaderboard-header h2 {
    margin: 0;
    color: #333;
}

.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.leaderboard-table th,
.leaderboard-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.leaderboard-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.leaderboard-table tr:hover {
    background: #f8f9fa;
}

/* Login styles */
.game-login {
    max-width: 400px;
    margin: 0 auto;
}

.login-form {
    text-align: center;
}

.login-form h3 {
    margin: 0 0 20px 0;
    color: #333;
}

/* Loading and spinner styles */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    z-index: 9999;
    max-width: 300px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification-success {
    background: #28a745;
}

.notification-error {
    background: #dc3545;
}

.notification-warning {
    background: #ffc107;
    color: #212529;
}

.notification-info {
    background: #17a2b8;
}

/* Responsive design */
@media (max-width: 768px) {
    #thrilliant-games-player {
        padding: 10px;
    }
    
    .games-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .options-grid {
        grid-template-columns: 1fr;
    }
    
    .leaderboard-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .leaderboard-table {
        font-size: 0.9em;
    }
    
    .leaderboard-table th,
    .leaderboard-table td {
        padding: 8px 10px;
    }
}

@media (max-width: 480px) {
    .card-body {
        padding: 15px;
    }
    
    .button {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 80px;
    }
    
    .game-icon {
        font-size: 36px;
    }
    
    .scrambled-word {
        font-size: 1.5em;
        padding: 15px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #fff;
    }
    
    .card {
        background: #2d2d2d;
        color: #fff;
    }
    
    .card-header {
        background: #3d3d3d;
        border-bottom-color: #4d4d4d;
    }
    
    .games-header,
    .game-header,
    .leaderboard-header {
        background: #2d2d2d;
        color: #fff;
    }
    
    .text-control {
        background: #3d3d3d;
        border-color: #4d4d4d;
        color: #fff;
    }
    
    .text-control:focus {
        border-color: #007cba;
    }
    
    .button.secondary {
        background: #3d3d3d;
        color: #fff;
        border-color: #4d4d4d;
    }
    
    .button.secondary:hover:not(:disabled) {
        background: #4d4d4d;
    }
    
    .leaderboard-table {
        background: #2d2d2d;
        color: #fff;
    }
    
    .leaderboard-table th {
        background: #3d3d3d;
        color: #fff;
    }
    
    .leaderboard-table tr:hover {
        background: #3d3d3d;
    }
    
    .scrambled-word {
        background: #3d3d3d;
        color: #007cba;
    }
} 