/* KÃ¶r SÄ±ralama Styles */

.topic-selection {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    max-height: 70vh;
    overflow-y: auto;
    padding: 0.5rem;
}

.topic-btn {
    padding: 1rem;
    font-size: 1rem;
    text-align: center;
    transition: all 0.3s;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
}

.topic-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

/* Ranking Topic Modal Specifics */
#ranking-topic-modal .modal-content {
    max-width: 900px;
    width: 95%;
    padding: 2.5rem;
}

/* Ranking Container */
.ranking-container {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* Current Character Display */
.current-character-display {
    flex: 1;
    min-width: 300px;
    max-width: 400px;
    text-align: center;
}

.character-counter {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fcd34d;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.current-character-image {
    width: 100%;
    max-width: 350px;
    height: 350px;
    margin: 0 auto 1.5rem;
    border: 3px solid rgba(99, 102, 241, 0.5);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    background: rgba(0, 0, 0, 0.3);
}

.current-character-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ranking-instruction {
    font-size: 1.1rem;
    color: #cbd5e1;
    font-weight: 500;
}

.current-char-name {
    font-size: 1.3rem;
    color: #fcd34d;
    font-weight: 600;
    margin: 1rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Fate Game Styles */
.fate-actions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    min-width: 300px;
    max-width: 450px;
    /* Ã‡ok geniÅŸlemesini engellemek iÃ§in */
}

.fate-btn {
    width: 100px;
    height: 100px;
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.fate-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.fate-btn .fate-icon {
    font-size: 2.2rem;
    z-index: 2;
    transition: all 0.3s;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.fate-btn .fate-label {
    font-size: 0.75rem;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: -2px;
}

.fate-char-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    /* YÃ¼zlere odaklanmak iÃ§in */
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.fate-btn.used .fate-icon {
    font-size: 1.5rem;
    /* Resim geldiÄŸinde ikon biraz kÃ¼Ã§Ã¼lÃ¼r */
}

/* Background Overlay for text readability when used */
.fate-btn.used .fate-icon,
.fate-btn.used .fate-label {
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 6px;
    margin: 1px 0;
}

.fate-btn.used .fate-char-img {
    opacity: 1;
}

/* Specific Button Colors */
.fate-btn.kill {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.3), rgba(185, 28, 28, 0.3));
}

.fate-btn.kill:hover:not(.used) {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.6), rgba(185, 28, 28, 0.6));
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
}

.fate-btn.kiss {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.3), rgba(219, 39, 119, 0.3));
}

.fate-btn.kiss:hover:not(.used) {
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.6), rgba(219, 39, 119, 0.6));
    box-shadow: 0 0 20px rgba(236, 72, 153, 0.4);
}

.fate-btn.marry {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.3), rgba(202, 138, 4, 0.3));
}

.fate-btn.marry:hover:not(.used) {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.6), rgba(202, 138, 4, 0.6));
    box-shadow: 0 0 20px rgba(234, 179, 8, 0.4);
}

.fate-btn.slap {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.3), rgba(194, 65, 12, 0.3));
}

.fate-btn.slap:hover:not(.used) {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.6), rgba(194, 65, 12, 0.6));
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.4);
}

.fate-btn.slave {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3), rgba(29, 78, 216, 0.3));
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.fate-btn.slave:hover:not(.used) {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.6), rgba(29, 78, 216, 0.6));
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
}

.fate-btn.boss {
    background: linear-gradient(135deg, rgba(107, 33, 168, 0.3), rgba(88, 28, 135, 0.3));
}

.fate-btn.boss:hover:not(.used) {
    background: linear-gradient(135deg, rgba(107, 33, 168, 0.6), rgba(88, 28, 135, 0.6));
    box-shadow: 0 0 20px rgba(107, 33, 168, 0.4);
}



/* Finished State for Fate Game (Larger Result) */
.fate-actions-grid.finished {
    max-width: 600px !important;
    width: 100%;
    gap: 1.5rem;
    margin: 0 auto;
    /* Center the grid */
    justify-content: center;
}

#fate-restart-btn {
    max-width: 200px;
    margin: 2rem auto;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    display: block;
}

.fate-actions-grid.finished .fate-btn {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
}

.fate-actions-grid.finished .fate-btn .fate-icon {
    font-size: 1.9rem;
}

.fate-actions-grid.finished .fate-btn .fate-label {
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

/* Remove background from text/icon in finished state */
.fate-actions-grid.finished .fate-btn.used .fate-icon,
.fate-actions-grid.finished .fate-btn.used .fate-label {
    background: transparent !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    /* Better readability without bg */
}

/* Ranking Number Buttons */
.ranking-numbers {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    min-width: 200px;
}

.rank-btn {
    width: 80px;
    height: 80px;
    font-size: 1.8rem;
    font-weight: 700;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.rank-number-text {
    position: absolute;
    z-index: 2;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.rank-char-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.3s;
}

.rank-btn.used .rank-char-img {
    opacity: 1;
}

.rank-btn.used .rank-number-text {
    background: rgba(0, 0, 0, 0.7);
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
}

.rank-btn:hover:not(.used) {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4), rgba(139, 92, 246, 0.4));
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.3);
}

.rank-btn.used {
    border-color: var(--success-color);
    cursor: default;
}

.ranking-actions {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.ranking-actions button {
    min-width: 200px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .topic-selection {
        grid-template-columns: 1fr;
    }

    .ranking-container {
        flex-direction: column;
    }

    .current-character-image {
        max-width: 280px;
        height: 280px;
    }

    .ranking-numbers {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.5rem;
    }

    .rank-btn {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
}

/* =========================================
   BÃœYÃœK EKRANLAR Ä°Ã‡Ä°N (1600px ve Ã¼zeri)
   ========================================= */
@media (min-width: 1600px) {

    /* Character Display */
    .current-character-display {
        min-width: 450px;
        max-width: 550px;
    }

    .current-character-image {
        max-width: 500px;
        height: 500px;
        margin: 0 auto 2rem;
        border-radius: 28px;
    }

    .character-counter {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }

    .current-char-name {
        font-size: 1.8rem;
        margin: 1.5rem 0;
    }

    .ranking-instruction {
        font-size: 1.4rem;
    }

    /* Fate Game Buttons */
    .fate-actions-grid {
        max-width: 600px;
        gap: 1.2rem;
    }

    .fate-btn {
        width: 140px;
        height: 140px;
        border-radius: 24px;
    }

    .fate-btn .fate-icon {
        font-size: 3rem;
    }

    .fate-btn .fate-label {
        font-size: 1rem;
        margin-top: 4px;
    }

    /* Ranking Buttons */
    .ranking-numbers {
        gap: 1.2rem;
    }

    .rank-btn {
        width: 110px;
        height: 110px;
        font-size: 2.2rem;
        border-radius: 20px;
    }

    .rank-number-text {
        font-size: 2.2rem;
    }

    /* Finished state */
    .fate-actions-grid.finished {
        max-width: 800px !important;
        gap: 2rem;
    }

    .fate-actions-grid.finished .fate-btn .fate-icon {
        font-size: 2.5rem;
    }

    .fate-actions-grid.finished .fate-btn .fate-label {
        font-size: 1.1rem;
    }

    /* Topic Selection Modal */
    #ranking-topic-modal .modal-content {
        max-width: 1100px;
        padding: 3rem;
    }

    .topic-btn {
        padding: 1.5rem;
        font-size: 1.2rem;
        min-height: 100px;
    }
}

/* Ã‡OK BÃœYÃœK EKRANLAR (2K ve Ã¼zeri) */
@media (min-width: 2400px) {
    .current-character-display {
        min-width: 550px;
        max-width: 700px;
    }

    .current-character-image {
        max-width: 650px;
        height: 650px;
    }

    .character-counter {
        font-size: 2.5rem;
    }

    .current-char-name {
        font-size: 2.2rem;
    }

    .fate-actions-grid {
        max-width: 750px;
    }

    .fate-btn {
        width: 180px;
        height: 180px;
    }

    .fate-btn .fate-icon {
        font-size: 4rem;
    }

    .fate-btn .fate-label {
        font-size: 1.2rem;
    }

    .rank-btn {
        width: 140px;
        height: 140px;
        font-size: 2.8rem;
    }
}