/**
 * Maçı Hatırlıyor Musun? - Frontend CSS
 */

/* Ana Container */
.maci-hatirla-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #1a1a1a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Oyun Ekranları */
.game-screen {
    display: none;
    padding: 30px;
    min-height: 500px;
}

.game-screen.active {
    display: block;
}

/* Oyun Başlığı */
.game-header {
    text-align: center;
    margin-bottom: 30px;
}

.game-header h2 {
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.game-header p {
    color: #cccccc;
    font-size: 1.1rem;
    margin: 0;
}

/* Oyun Bilgileri */
.game-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2a2a2a;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.score-display, .progress-display {
    display: flex;
    align-items: center;
    gap: 8px;
}

.score-label, .progress-label {
    color: #cccccc;
    font-size: 0.9rem;
}

#current-score, #current-question, #total-questions {
    color: #4CAF50;
    font-weight: 700;
    font-size: 1.2rem;
}

/* Talimat Kartı */
.game-instructions {
    margin: 30px 0;
}

.instruction-card {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.instruction-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.instruction-card h3 {
    color: #ffffff;
    font-size: 1.5rem;
    margin: 0 0 20px 0;
}

.instruction-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.instruction-card li {
    color: #cccccc;
    font-size: 1rem;
    margin: 10px 0;
    padding: 8px 0;
    border-bottom: 1px solid #3a3a3a;
}

.instruction-card li:last-child {
    border-bottom: none;
}

/* Soru Kartı */
.question-container {
    margin: 20px 0;
}

.question-card {
    background: #2a2a2a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.question-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    position: relative;
}

.match-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.question-content {
    padding: 25px;
}

.match-title {
    color: #ffffff;
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0 0 15px 0;
}

.match-anecdote {
    color: #cccccc;
    font-size: 1rem;
    line-height: 1.6;
    margin: 0 0 20px 0;
    font-style: italic;
}

.question-text {
    margin: 20px 0;
}

.question-label {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Cevap Seçenekleri */
.answer-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.option-btn {
    background: #3a3a3a;
    border: 2px solid #4a4a4a;
    color: #ffffff;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.option-btn:hover {
    background: #4a4a4a;
    border-color: #5a5a5a;
    transform: translateY(-2px);
}

.option-btn.correct {
    background: #4CAF50;
    border-color: #45a049;
    color: white;
    animation: correctPulse 0.6s ease-in-out;
}

.option-btn.incorrect {
    background: #f44336;
    border-color: #d32f2f;
    color: white;
    animation: incorrectPulse 0.6s ease-in-out;
}

.option-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Animasyonlar */
@keyframes correctPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes incorrectPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Butonlar */
.game-actions {
    text-align: center;
    margin-top: 30px;
}

.game-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin: 0 10px;
}

.game-btn.primary {
    background: #2196F3;
    color: white;
}

.game-btn.primary:hover {
    background: #1976D2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.game-btn.secondary {
    background: #666666;
    color: white;
}

.game-btn.secondary:hover {
    background: #555555;
    transform: translateY(-2px);
}

.btn-icon {
    font-size: 1.2rem;
}

/* Sonuç Ekranı */
.results-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.result-card {
    background: #2a2a2a;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
}

.result-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.result-card h3 {
    color: #cccccc;
    font-size: 1.1rem;
    margin: 0 0 10px 0;
}

.final-score {
    color: #4CAF50;
    font-size: 2.5rem;
    font-weight: 700;
}

.correct-count {
    color: #4CAF50;
    font-size: 2rem;
    font-weight: 700;
}

.wrong-count {
    color: #f44336;
    font-size: 2rem;
    font-weight: 700;
}

/* Yükleme Ekranı */
.loading-spinner {
    text-align: center;
    padding: 50px 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #3a3a3a;
    border-top: 4px solid #2196F3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-spinner p {
    color: #cccccc;
    font-size: 1.1rem;
    margin: 0;
}

/* Başarı/Hata Mesajları */
.game-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    animation: slideIn 0.3s ease-out;
}

.game-message.success {
    background: #4CAF50;
}

.game-message.error {
    background: #f44336;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* İlerleme Çubuğu */
.progress-bar {
    width: 100%;
    height: 6px;
    background: #3a3a3a;
    border-radius: 3px;
    overflow: hidden;
    margin: 20px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #45a049);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Skor Animasyonu */
.score-animation {
    animation: scoreBounce 0.5s ease-in-out;
}

@keyframes scoreBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

/* Mobil Uyumluluk */
@media (max-width: 768px) {
    .maci-hatirla-container {
        margin: 10px;
        border-radius: 12px;
    }
    
    .game-screen {
        padding: 20px;
    }
    
    .game-header h2 {
        font-size: 2rem;
    }
    
    .game-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .answer-options {
        grid-template-columns: 1fr;
    }
    
    .results-summary {
        grid-template-columns: 1fr;
    }
    
    .game-btn {
        display: block;
        margin: 10px auto;
        width: 100%;
        max-width: 300px;
    }
    
    .question-image {
        height: 200px;
    }
    
    .instruction-card {
        padding: 20px;
    }
    
    .instruction-card h3 {
        font-size: 1.3rem;
    }
    
    .instruction-card li {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .game-screen {
        padding: 15px;
    }
    
    .game-header h2 {
        font-size: 1.8rem;
    }
    
    .question-content {
        padding: 20px;
    }
    
    .option-btn {
        padding: 12px 15px;
        font-size: 0.9rem;
    }
    
    .result-card {
        padding: 20px;
    }
    
    .result-icon {
        font-size: 2rem;
    }
    
    .final-score,
    .correct-count,
    .wrong-count {
        font-size: 1.8rem;
    }
    
    .game-btn {
        padding: 12px 20px;
        font-size: 1rem;
    }
    
    .instruction-card {
        padding: 15px;
    }
    
    .instruction-card ul {
        text-align: center;
    }
}

/* Tam Ekran Modu */
@media (max-width: 768px) and (orientation: landscape) {
    .maci-hatirla-container {
        margin: 5px;
        border-radius: 8px;
    }
    
    .game-screen {
        padding: 15px;
        min-height: 400px;
    }
    
    .question-image {
        height: 150px;
    }
    
    .instruction-card {
        padding: 15px;
    }
    
    .instruction-card ul {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .instruction-card li {
        border-bottom: none;
        text-align: center;
    }
}

/* Yüksek DPI Ekranlar */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .match-image {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Karanlık Mod Desteği */
@media (prefers-color-scheme: dark) {
    .maci-hatirla-container {
        background: #0a0a0a;
    }
    
    .question-card {
        background: #1a1a1a;
    }
    
    .instruction-card {
        background: #1a1a1a;
    }
    
    .result-card {
        background: #1a1a1a;
    }
}

/* Erişilebilirlik */
.option-btn:focus {
    outline: 2px solid #2196F3;
    outline-offset: 2px;
}

.game-btn:focus {
    outline: 2px solid #2196F3;
    outline-offset: 2px;
}

/* Yazdırma Stilleri */
@media print {
    .maci-hatirla-container {
        background: white;
        color: black;
        box-shadow: none;
    }
    
    .game-screen:not(.active) {
        display: none;
    }
    
    .game-btn {
        display: none;
    }
}
