/* Dice Game Styles - Zar At (2 Karakter KapÄ±ÅŸmasÄ±) */

/* Battle Arena Layout */
.dice-battle-arena {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    min-height: 60vh;
    justify-content: center;
    padding: 2rem 0;
}

/* Two Players Container */
.dice-players-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1.5rem;
    align-items: stretch;
}

/* Player Card (Character Profile) */
.dice-player-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.dice-player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.dice-player-card:hover::before {
    opacity: 1;
}

.dice-player-card.empty {
    border-style: dashed;
    opacity: 0.7;
}

.dice-player-card.empty:hover {
    opacity: 1;
    border-color: rgba(99, 102, 241, 0.5);
}

.dice-player-card.winner {
    border-color: #22c55e;
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.4);
    animation: winnerGlow 1s ease-in-out infinite alternate;
}

@keyframes winnerGlow {
    from {
        box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
    }

    to {
        box-shadow: 0 0 40px rgba(34, 197, 94, 0.6);
    }
}

/* Player Label */
.player-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #64748b;
    margin-bottom: 1rem;
}

.player-1 .player-label {
    color: #6366f1;
}

.player-2 .player-label {
    color: #ec4899;
}

/* Character Profile Image */
.char-profile-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.2);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    background: rgba(0, 0, 0, 0.3);
}

.player-1 .char-profile-img {
    border-color: rgba(99, 102, 241, 0.5);
}

.player-2 .char-profile-img {
    border-color: rgba(236, 72, 153, 0.5);
}

.dice-player-card.winner .char-profile-img {
    border-color: #22c55e;
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.5);
}

/* Character Name */
.char-profile-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    text-align: center;
}

.dice-player-card.empty .char-profile-name {
    color: #64748b;
}

/* Select Character Button */
.select-char-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1rem;
}

.select-char-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

.player-2 .select-char-btn {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.player-2 .select-char-btn:hover {
    box-shadow: 0 5px 20px rgba(236, 72, 153, 0.4);
}

/* Player Dice Container */
.player-dice-container {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    min-height: 70px;
    align-items: center;
}

/* VS Divider */
.vs-divider {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
}

.vs-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b, #ef4444);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: 800;
    color: white;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.4);
    animation: vsPulse 2s ease-in-out infinite;
}

@keyframes vsPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* Dice Count Selector */
.dice-count-selector {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.dice-count-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.3);
    color: #cbd5e1;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
}

.dice-count-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
}

.dice-count-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 5px 20px rgba(99, 102, 241, 0.4);
}

/* Individual Dice */
.dice {
    width: 60px;
    height: 60px;
    background: linear-gradient(145deg, #ffffff, #e0e0e0);
    border-radius: 12px;
    position: relative;
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.8);
    transition: transform 0.3s ease;
}

.dice.rolling {
    animation: diceRoll 0.15s infinite linear;
}

@keyframes diceRoll {
    0% {
        transform: rotate(0deg) scale(1);
    }

    25% {
        transform: rotate(90deg) scale(1.1);
    }

    50% {
        transform: rotate(180deg) scale(1);
    }

    75% {
        transform: rotate(270deg) scale(1.1);
    }

    100% {
        transform: rotate(360deg) scale(1);
    }
}

.dice-dot {
    position: absolute;
    width: 12px;
    height: 12px;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Roll Button Area */
.dice-roll-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 1rem;
}

#roll-dice-btn {
    padding: 1rem 3rem;
    font-size: 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none;
    border-radius: 16px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

#roll-dice-btn:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 40px rgba(16, 185, 129, 0.5);
}

#roll-dice-btn:active:not(:disabled) {
    transform: translateY(0);
}

#roll-dice-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Battle Result */
.dice-result {
    width: 100%;
    min-height: 100px;
}

.battle-result {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 16px;
    padding: 1.5rem;
    animation: resultSlideIn 0.5s ease-out;
}

@keyframes resultSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-scores {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.score-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    min-width: 100px;
    transition: all 0.3s ease;
}

.score-item.winning {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.2));
    border: 1px solid rgba(34, 197, 94, 0.5);
}

.score-item.losing {
    opacity: 0.6;
}

.score-name {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.score-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
}

.score-item.winning .score-value {
    color: #22c55e;
}

.vs-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: #64748b;
}

.winner-announcement {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: winnerPop 0.5s ease-out;
}

@keyframes winnerPop {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Character Selection Modal */
.char-selection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.char-modal-content {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.95), rgba(15, 23, 42, 0.95));
    border-radius: 24px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-30px) scale(0.95);
    }

    to {
        transform: translateY(0) scale(1);
    }
}

.char-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.char-modal-header h3 {
    font-size: 1.5rem;
    color: #fff;
    margin: 0;
}

.close-char-modal {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close-char-modal:hover {
    background: rgba(239, 68, 68, 0.5);
    transform: rotate(90deg);
}

/* Modal Search */
.char-modal-search {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.char-modal-search::placeholder {
    color: #64748b;
}

.char-modal-search:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.3);
}

/* Modal Character Grid */
.char-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    overflow-y: auto;
    max-height: 400px;
    padding: 0.5rem;
}

.char-modal-grid::-webkit-scrollbar {
    width: 8px;
}

.char-modal-grid::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.char-modal-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 4px;
}

.char-modal-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.char-modal-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.5);
}

.char-modal-card.already-selected {
    opacity: 0.5;
    border-color: rgba(255, 255, 255, 0.2);
}

.char-modal-card.already-selected:hover {
    transform: none;
    cursor: not-allowed;
}

.char-modal-card img {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.char-modal-card:hover img {
    border-color: #6366f1;
}

.char-modal-card .char-name {
    font-size: 0.75rem;
    color: #cbd5e1;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

.selected-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Notification Animation */
@keyframes slideDown {
    from {
        transform: translateX(-50%) translateY(-100px);
        opacity: 0;
    }

    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .dice-players-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .vs-divider {
        flex-direction: row;
        padding: 1rem 0;
    }

    .vs-circle {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }

    .dice-player-card {
        padding: 1rem;
    }

    .char-profile-img {
        width: 90px;
        height: 90px;
    }

    .char-profile-name {
        font-size: 1rem;
    }

    .dice {
        width: 50px;
        height: 50px;
    }

    .dice-dot {
        width: 10px;
        height: 10px;
    }

    .dice-count-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    #roll-dice-btn {
        padding: 0.8rem 2rem;
        font-size: 1.1rem;
    }

    .score-value {
        font-size: 1.4rem;
    }

    .winner-announcement {
        font-size: 1.2rem;
    }

    .char-modal-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: 0.75rem;
    }

    .char-modal-card img {
        width: 55px;
        height: 55px;
    }

    .char-modal-card .char-name {
        font-size: 0.65rem;
    }
}

@media (max-width: 480px) {
    .char-profile-img {
        width: 70px;
        height: 70px;
    }

    .dice {
        width: 45px;
        height: 45px;
    }

    .dice-dot {
        width: 8px;
        height: 8px;
    }

    .result-scores {
        flex-direction: column;
        gap: 0.5rem;
    }

    .vs-text {
        margin: 0.5rem 0;
    }

    .char-modal-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 0.5rem;
    }

    .char-modal-card {
        padding: 0.5rem;
    }

    .char-modal-card img {
        width: 45px;
        height: 45px;
    }
}

/* Cheat Code Input */
.cheat-code-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.cheat-code-container.visible {
    opacity: 1;
    pointer-events: auto;
}

.cheat-code-container.hidden {
    opacity: 0;
    pointer-events: none;
}

.cheat-input-wrapper {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid #6366f1;
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 10px 40px rgba(99, 102, 241, 0.4);
    animation: cheatSlideUp 0.3s ease-out;
}

@keyframes cheatSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cheat-prefix {
    color: #6366f1;
    font-size: 1.2rem;
    font-weight: 700;
    padding: 0 0.5rem;
    font-family: 'Outfit', monospace;
}

#cheat-code-input {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1rem;
    font-family: 'Outfit', sans-serif;
    padding: 0.5rem;
    min-width: 180px;
    outline: none;
}

#cheat-code-input::placeholder {
    color: #64748b;
}

#cheat-submit-btn {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

#cheat-submit-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.5);
}

/* Bonus Score Display */
.bonus-score {
    color: #fbbf24;
    font-size: 0.9em;
    margin-left: 0.25rem;
    animation: bonusPulse 0.5s ease-out;
}

@keyframes bonusPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.final-total {
    display: block;
    font-size: 0.8rem;
    color: #22c55e;
    margin-top: 0.25rem;
    font-weight: 600;
}

/* Legal Warning Styles */
.dice-legal-warning {
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(220, 38, 38, 0.1);
    border: 1px solid rgba(220, 38, 38, 0.3);
    border-radius: 12px;
    text-align: center;
}

.dice-legal-warning p {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.dice-legal-warning p:last-child {
    margin-bottom: 0;
}

.dice-legal-warning strong {
    color: #ef4444;
}