/* Challenge Sections */
.challenge-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

body.dark-mode .challenge-section {
    background: #2a2a2a;
}

.challenge-header {
    margin-bottom: 25px;
}

.challenge-header h2 {
    font-size: 2em;
    color: #333;
    margin-bottom: 10px;
}

body.dark-mode .challenge-header h2 {
    color: #e0e0e0;
}

.challenge-description {
    color: #666;
    font-size: 1.1em;
}

body.dark-mode .challenge-description {
    color: #b0b0b0;
}

.challenge-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.challenge-stat {
    background: #f8f8f8;
    padding: 20px 30px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 150px;
}

body.dark-mode .challenge-stat {
    background: #1a1a1a;
}

.challenge-stat .stat-number {
    font-size: 2.5em;
    font-weight: bold;
    color: #4CAF50;
    margin-bottom: 5px;
}

.challenge-stat .stat-label {
    color: #666;
    font-size: 0.9em;
    text-align: center;
}

body.dark-mode .challenge-stat .stat-label {
    color: #b0b0b0;
}

/* 10x10 Challenge */
.challenge-games {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
    min-height: 100px;
}

.empty-state {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 40px;
}

.challenge-game-card {
    display: flex;
    gap: 20px;
    background: #f8f8f8;
    padding: 15px;
    border-radius: 12px;
    align-items: center;
    position: relative;
    transition: all 0.3s ease;
}

body.dark-mode .challenge-game-card {
    background: #1a1a1a;
}

.challenge-game-card.completed {
    border: 2px solid #4CAF50;
    background: #e8f5e9;
}

body.dark-mode .challenge-game-card.completed {
    background: #1b3d1f;
    border-color: #4CAF50;
}

.challenge-game-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.challenge-game-info {
    flex: 1;
}

.challenge-game-info h3 {
    font-size: 1.2em;
    color: #333;
    margin-bottom: 10px;
}

body.dark-mode .challenge-game-info h3 {
    color: #e0e0e0;
}

.challenge-progress {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.progress-dots {
    display: flex;
    gap: 5px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e0e0e0;
    transition: all 0.3s ease;
}

body.dark-mode .dot {
    background: #444;
}

.dot.filled {
    background: #4CAF50;
}

.progress-text {
    font-size: 0.9em;
    color: #666;
}

body.dark-mode .progress-text {
    color: #b0b0b0;
}

.btn-remove {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4444;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-remove:hover {
    background: #cc0000;
    transform: scale(1.1);
}

/* Unplayed Games Challenge */
.progress-bar {
    width: 100%;
    height: 30px;
    background: #e0e0e0;
    border-radius: 15px;
    overflow: hidden;
    margin-bottom: 25px;
}

body.dark-mode .progress-bar {
    background: #444;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 15px;
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.challenge-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.unplayed-game-card {
    background: #f8f8f8;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

body.dark-mode .unplayed-game-card {
    background: #1a1a1a;
}

.unplayed-game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.unplayed-game-card.completed-game {
    border: 2px solid #4CAF50;
}

.completed-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #4CAF50;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.unplayed-game-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.unplayed-game-info {
    padding: 12px;
}

.unplayed-game-info h4 {
    font-size: 0.9em;
    color: #333;
    margin-bottom: 5px;
    line-height: 1.3;
}

body.dark-mode .unplayed-game-info h4 {
    color: #e0e0e0;
}

.unplayed-game-info p {
    font-size: 0.8em;
    color: #999;
}

/* Personal Bests */
.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.achievement-card {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    gap: 20px;
    align-items: center;
    transition: all 0.3s ease;
}

body.dark-mode .achievement-card {
    background: #1a1a1a;
}

.achievement-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.achievement-icon {
    font-size: 3em;
}

.achievement-info {
    flex: 1;
}

.achievement-info h3 {
    font-size: 1em;
    color: #999;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.achievement-info p {
    font-size: 1.1em;
    color: #333;
    font-weight: 600;
    margin-bottom: 5px;
    line-height: 1.3;
}

body.dark-mode .achievement-info p {
    color: #e0e0e0;
}

.achievement-value {
    font-size: 0.9em;
    color: #4CAF50;
    font-weight: bold;
}

/* Challenge Actions */
.challenge-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.btn-danger {
    background: #ff4444;
    color: white;
}

.btn-danger:hover {
    background: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 68, 68, 0.3);
}

/* Game Selector Modal */
.modal-large {
    max-width: 700px;
}

.modal-search {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    margin-bottom: 20px;
}

body.dark-mode .modal-search {
    background: #1a1a1a;
    color: #e0e0e0;
    border-color: #444;
}

.modal-search:focus {
    outline: none;
    border-color: #333;
}

body.dark-mode .modal-search:focus {
    border-color: #888;
}

.game-selector-list {
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.game-selector-item {
    display: flex;
    gap: 15px;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    align-items: center;
}

body.dark-mode .game-selector-item {
    background: #1a1a1a;
}

.game-selector-item:hover {
    background: #e8e8e8;
    transform: translateX(5px);
}

body.dark-mode .game-selector-item:hover {
    background: #333;
}

.game-selector-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}

.game-selector-info {
    flex: 1;
}

.game-selector-info h4 {
    font-size: 1em;
    color: #333;
    margin-bottom: 3px;
}

body.dark-mode .game-selector-info h4 {
    color: #e0e0e0;
}

.game-selector-info p {
    font-size: 0.85em;
    color: #999;
}

/* Club Challenges */
.club-challenges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.club-card {
    background: #f8f8f8;
    padding: 25px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: all 0.3s ease;
}

body.dark-mode .club-card {
    background: #1a1a1a;
}

.club-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.club-card h3 {
    font-size: 1.2em;
    color: #333;
    text-align: center;
}

body.dark-mode .club-card h3 {
    color: #e0e0e0;
}

.club-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.club-count {
    font-size: 3em;
    font-weight: 800;
    color: #333;
    line-height: 1;
}

body.dark-mode .club-count {
    color: #e0e0e0;
}

.club-label {
    font-size: 0.9em;
    color: #999;
    font-weight: bold;
    text-transform: uppercase;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .challenge-section {
        padding: 20px;
    }

    .challenge-header h2 {
        font-size: 1.5em;
    }

    .challenge-stats {
        justify-content: center;
    }

    .challenge-game-card {
        flex-direction: column;
        text-align: center;
    }

    .challenge-game-img {
        width: 100%;
        max-width: 200px;
        height: auto;
    }

    .btn-remove {
        top: 5px;
        right: 5px;
    }

    .challenge-games-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .challenge-actions {
        flex-direction: column;
    }

    .challenge-actions .btn {
        width: 100%;
    }
}
