/* ========== DÜELLO - ÖZEL STİLLER ========== */

.game-wrapper {
    max-width: 900px;
    margin: 120px auto 0;
    padding: 20px;
}

/* Ekranlar */
.screen { display: none; }
.screen.active { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Giriş Ekranı */
.start-container { max-width: 500px; margin: 0 auto; }

.game-title {
    text-align: center;
    margin-bottom: 30px;
}

.game-title h1 {
    font-size: 32px;
    background: linear-gradient(135deg, #facc15, #f59e0b);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.game-title p {
    color: #a0b0c8;
    font-size: 14px;
    margin-top: 8px;
}

.stats-card {
    background: rgba(30, 35, 60, 0.8);
    border-radius: 28px;
    padding: 20px;
    margin-bottom: 30px;
}

.period-buttons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.period-btn {
    background: rgba(10, 14, 39, 0.8);
    border: 1px solid #2d3a5e;
    padding: 8px 16px;
    border-radius: 30px;
    color: #a0b0c8;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.period-btn.active {
    background: linear-gradient(135deg, #3b82f6, #a855f7);
    color: white;
    border-color: transparent;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.stat-item {
    text-align: center;
    background: rgba(10, 14, 39, 0.6);
    padding: 12px 6px;
    border-radius: 16px;
}

.stat-value {
    font-size: 22px;
    font-weight: 800;
    color: #facc15;
}

.stat-label {
    font-size: 9px;
    color: #6b7280;
    margin-top: 4px;
}

.opponent-selection {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.btn-random {
    flex: 1;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 60px;
    padding: 16px;
    font-size: 15px;
    font-weight: bold;
    color: white;
    cursor: pointer;
}

.btn-invite {
    flex: 1;
    background: transparent;
    border: 2px solid #facc15;
    border-radius: 60px;
    padding: 16px;
    font-size: 15px;
    font-weight: bold;
    color: #facc15;
    cursor: pointer;
}

.btn-rules {
    width: 100%;
    background: transparent;
    border: 2px solid #facc15;
    border-radius: 60px;
    padding: 16px;
    font-size: 16px;
    font-weight: bold;
    color: #facc15;
    cursor: pointer;
}

/* Eşleşme Bekleme Ekranı */
.matching-container {
    text-align: center;
    padding: 50px 20px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #2d3a5e;
    border-top-color: #facc15;
    border-radius: 50%;
    margin: 0 auto 30px;
    animation: spin 1s infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.matching-container h2 {
    color: #facc15;
    margin-bottom: 20px;
}

.matching-timer {
    font-size: 24px;
    color: white;
    margin: 20px 0;
}

.matching-timer span {
    font-size: 48px;
    font-weight: 800;
    color: #facc15;
}

.matching-status {
    color: #a0b0c8;
    margin: 15px 0;
}

.btn-cancel {
    background: #ef4444;
    border: none;
    border-radius: 60px;
    padding: 14px 40px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
}

/* Oyun Ekranı */
.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(26, 31, 62, 0.9);
    padding: 12px 20px;
    border-radius: 60px;
    margin-bottom: 25px;
}

.stat-badge {
    text-align: center;
}

.stat-badge-label {
    font-size: 10px;
    color: #6b7280;
}

.stat-badge-value {
    font-size: 24px;
    font-weight: 800;
    color: #facc15;
}

.exit-btn {
    width: 40px;
    height: 40px;
    background: #ef4444;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

/* Düello Arena */
.duel-arena {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.player-card {
    text-align: center;
    flex: 1;
    background: rgba(26, 31, 62, 0.8);
    border-radius: 28px;
    padding: 20px;
    border: 2px solid #2d3a5e;
    cursor: pointer;
    transition: all 0.2s;
}

.player-card:hover {
    transform: scale(1.02);
    border-color: #facc15;
}

.player-card.opponent {
    border-color: #ef4444;
}

.player-avatar {
    font-size: 48px;
    margin-bottom: 10px;
}

.player-name {
    font-size: 18px;
    font-weight: 700;
    color: white;
    margin-bottom: 8px;
}

.player-points {
    font-size: 32px;
    font-weight: 800;
    color: #facc15;
}

.vs-divider {
    padding: 0 20px;
}

.vs-text {
    font-size: 24px;
    font-weight: 900;
    color: #facc15;
    text-shadow: 0 0 20px rgba(250, 204, 21, 0.3);
}

/* Timer */
.timer-section {
    text-align: center;
    margin-bottom: 20px;
}

.timer-number {
    font-size: 48px;
    font-weight: 800;
}

.timer-number.normal { color: #22c55e; }
.timer-number.warning { color: #facc15; }
.timer-number.danger { color: #ef4444; animation: pulse 0.5s infinite; }

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.timer-bar-container {
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.timer-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #facc15, #ef4444);
    width: 100%;
    transition: width 0.1s linear;
}

/* Geri Bildirim Paneli */
.feedback-panel {
    background: linear-gradient(135deg, #1e2a4a, #16203a);
    border-radius: 20px;
    padding: 15px 20px;
    margin: 20px 0;
    text-align: center;
    border: 1px solid #2d3a5e;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

#feedbackMessage {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
}

.correct-answer-text {
    color: #22c55e;
    font-size: 14px;
}

/* Soru Kartı */
.question-card {
    background: linear-gradient(135deg, #1e2a4a, #16203a);
    border-radius: 28px;
    padding: 25px;
    text-align: center;
    margin-bottom: 25px;
    border: 1px solid #2d3a5e;
}

.category-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.2);
    padding: 5px 15px;
    border-radius: 40px;
    font-size: 13px;
    color: #3b82f6;
    margin-bottom: 15px;
}

.question-text {
    font-size: 22px;
    font-weight: 700;
    color: #eef2ff;
    line-height: 1.4;
}

/* Cevap Alanı */
.answer-section {
    margin-bottom: 20px;
}

.voice-input-area {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.answer-input {
    flex: 1;
    background: #0f1430;
    border: 2px solid #2d3a5e;
    border-radius: 60px;
    padding: 16px 20px;
    font-size: 16px;
    color: white;
    outline: none;
}

.answer-input:focus {
    border-color: #3b82f6;
}

.voice-btn {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #8b5cf6, #a855f7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 22px;
    cursor: pointer;
}

.voice-btn.listening {
    background: linear-gradient(135deg, #ef4444, #f97316);
    animation: voicePulse 1s infinite;
}

@keyframes voicePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    border: none;
    border-radius: 60px;
    padding: 16px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    cursor: pointer;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: #1e293b;
    border-radius: 32px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 2px solid #facc15;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #2d3a5e;
}

.modal-header h2 {
    color: #facc15;
    font-size: 20px;
}

.modal-close {
    background: none;
    border: none;
    color: #a0b0c8;
    font-size: 20px;
    cursor: pointer;
}

.modal-body {
    padding: 25px;
}

.modal-body ul {
    list-style: none;
    padding: 0;
}

.modal-body li {
    padding: 10px 0;
    color: #eef2ff;
    border-bottom: 1px solid #2d3a5e;
    font-size: 14px;
}

.modal-body li:last-child {
    border-bottom: none;
}

.modal-body strong {
    color: #facc15;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #2d3a5e;
    text-align: center;
}

.btn-modal {
    background: linear-gradient(135deg, #facc15, #f59e0b);
    border: none;
    border-radius: 40px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: bold;
    color: #0f142e;
    cursor: pointer;
}

/* Maç Sonu Ekranı */
.result-container {
    max-width: 500px;
    margin: 0 auto;
}

.result-banner {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #1e2a4a, #16203a);
    border-radius: 28px;
    margin-bottom: 25px;
    border: 1px solid #facc15;
}

.result-banner span {
    font-size: 64px;
}

.result-banner h2 {
    font-size: 28px;
    color: #facc15;
    margin-top: 10px;
}

.duel-compare {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 25px;
}

.compare-card {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 15px;
}

.compare-card.player {
    border: 2px solid #3b82f6;
}

.compare-card.opponent {
    border: 2px solid #ef4444;
}

.compare-header {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #facc15;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #2d3a5e;
}

.compare-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 5px;
    color: #a0b0c8;
    font-size: 14px;
}

.compare-row span:last-child {
    color: white;
    font-weight: 600;
}

.compare-vs {
    display: flex;
    align-items: center;
    font-size: 20px;
    font-weight: 900;
    color: #facc15;
    padding: 0 5px;
}

.result-points-box {
    background: linear-gradient(135deg, #1e2a4a, #16203a);
    border-radius: 20px;
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid #facc15;
}

.result-points-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: white;
    font-size: 16px;
}

.result-points-value {
    color: #22c55e;
    font-weight: 700;
}

.new-total {
    color: #facc15;
    font-size: 22px;
}

.result-buttons {
    display: flex;
    gap: 15px;
}

.btn-primary {
    flex: 1;
    background: linear-gradient(135deg, #facc15, #f59e0b);
    border: none;
    border-radius: 60px;
    padding: 16px;
    font-size: 16px;
    font-weight: bold;
    color: #0f142e;
    cursor: pointer;
}

.btn-secondary {
    flex: 1;
    background: #334155;
    border: none;
    border-radius: 60px;
    padding: 16px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    cursor: pointer;
}

/* Mobil Uyumluluk */
@media (max-width: 768px) {
    .game-wrapper {
        padding: 15px;
        margin-top: 92px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .duel-arena {
        flex-direction: column;
        gap: 20px;
    }
    
    .player-card {
        width: 100%;
    }
    
    .vs-divider {
        padding: 10px 0;
    }
    
    .question-text {
        font-size: 18px;
    }
    
    .timer-number {
        font-size: 40px;
    }
    
    .opponent-selection {
        flex-direction: column;
    }
    
    .duel-compare {
        flex-direction: column;
    }
    
    .compare-vs {
        justify-content: center;
        padding: 10px 0;
    }
    
    .result-buttons {
        flex-direction: column;
    }
}
.exit-stats-modal { max-width: 500px; }
.exit-total-box {
    background: linear-gradient(135deg, #1e2a4a, #16203a);
    border-radius: 20px;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #facc15;
}
.exit-total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    color: white;
    font-size: 16px;
}
.exit-total-value { color: #22c55e; font-weight: 700; }
.exit-modal-footer { display: flex; gap: 10px; }
.btn-home { background: #334155; color: white; flex: 1; }
.btn-surrender { background: #ef4444; color: white; flex: 1; }
.btn-continue { background: linear-gradient(135deg, #22c55e, #16a34a); color: white; flex: 1; }