/* Rock Paper Scissors Game Styles */

.game-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Players Area */
.players-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.player-section {
    flex: 1;
    text-align: center;
}

.player-label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-bs-theme="dark"] .player-label {
    color: #e9ecef;
}

.choice-display {
    background: #f8f9fa;
    border-radius: 50%;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid #dee2e6;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

[data-bs-theme="dark"] .choice-display {
    background: #2d3239;
    border-color: #495057;
}

.choice-icon {
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.choice-icon.waiting img {
    opacity: 0.3;
}

.choice-icon.rock {
    animation: choice-appear 0.3s ease;
}

.choice-icon.rock img {
    filter: invert(47%) sepia(7%) saturate(552%) hue-rotate(169deg) brightness(93%) contrast(88%);
}

.choice-icon.paper {
    animation: choice-appear 0.3s ease;
}

.choice-icon.paper img {
    filter: invert(33%) sepia(96%) saturate(1792%) hue-rotate(203deg) brightness(98%) contrast(101%);
}

.choice-icon.scissors {
    animation: choice-appear 0.3s ease;
}

.choice-icon.scissors img {
    filter: invert(24%) sepia(89%) saturate(2769%) hue-rotate(343deg) brightness(89%) contrast(93%);
}

@keyframes choice-appear {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* VS Divider */
.vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.vs-text {
    font-size: 28px;
    font-weight: 900;
    color: #495057;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 10px 15px;
    border: 3px solid #667eea;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
}

[data-bs-theme="dark"] .vs-text {
    border-color: #764ba2;
}

/* Result Display */
.result-display {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    background: #f1f3f5;
    color: #495057;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

[data-bs-theme="dark"] .result-display {
    background: #2d3239;
    color: #e9ecef;
}

.result-display.result-win {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-color: #28a745;
    animation: result-pulse 0.5s ease;
}

.result-display.result-lose {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-color: #dc3545;
    animation: result-pulse 0.5s ease;
}

.result-display.result-draw {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    color: #856404;
    border-color: #ffc107;
    animation: result-pulse 0.5s ease;
}

@keyframes result-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Choice Buttons */
.choices-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.choice-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 15px;
    padding: 20px 30px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-width: 140px;
}

.choice-btn img {
    margin-bottom: 5px;
}

.choice-btn:hover:not(.disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.choice-btn:active:not(.disabled) {
    transform: translateY(-1px);
}

.choice-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.choice-btn[data-choice="rock"] {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.choice-btn[data-choice="rock"]:hover:not(.disabled) {
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.4);
}

.choice-btn[data-choice="paper"] {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.choice-btn[data-choice="paper"]:hover:not(.disabled) {
    box-shadow: 0 8px 20px rgba(13, 110, 253, 0.4);
}

.choice-btn[data-choice="scissors"] {
    background: linear-gradient(135deg, #dc3545 0%, #bb2d3b 100%);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.choice-btn[data-choice="scissors"]:hover:not(.disabled) {
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
}

/* Stats Cards */
.stat-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .stat-card {
    background: #2d3239;
    border-color: #495057;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 8px;
    font-family: 'Courier New', monospace;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    margin-bottom: 4px;
}

.stat-percent {
    font-size: 11px;
    color: #28a745;
    font-weight: 600;
    opacity: 0.8;
}

[data-bs-theme="dark"] .stat-label {
    color: #adb5bd;
}

/* History Table */
.history-table {
    margin-top: 20px;
    border-radius: 10px;
    overflow: hidden;
}

.history-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 0;
}

.history-table th,
.history-table td {
    padding: 14px;
    text-align: center;
    vertical-align: middle;
}

.history-table th {
    background: #f1f3f5;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
}

[data-bs-theme="dark"] .history-table th {
    background: #2d3239;
    color: #e9ecef;
    border-bottom-color: #495057;
}

.history-table tbody tr {
    border-bottom: 1px solid #e9ecef;
    transition: background 0.2s ease;
}

.history-table tbody tr:hover {
    background: #f8f9fa;
}

[data-bs-theme="dark"] .history-table tbody tr {
    border-bottom-color: #495057;
}

[data-bs-theme="dark"] .history-table tbody tr:hover {
    background: #343a40;
}

/* Choice Badge */
.choice-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
}

.choice-badge.rock {
    background: linear-gradient(135deg, #6c757d, #495057);
    color: #fff;
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.25);
}

.choice-badge.paper {
    background: linear-gradient(135deg, #0d6efd, #0a58ca);
    color: #fff;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25);
}

.choice-badge.scissors {
    background: linear-gradient(135deg, #dc3545, #bb2d3b);
    color: #fff;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.25);
}

/* Result Badge */
.result-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-badge.win {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.25);
}

.result-badge.lose {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    color: #fff;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.25);
}

.result-badge.draw {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.25);
}

/* Game Announcement */
.game-announcement {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: #fff;
    padding: 35px 70px;
    border-radius: 25px;
    font-size: 48px;
    font-weight: 800;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    animation: show-announcement 2s ease-in-out;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
    border: 3px solid rgba(255, 255, 255, 0.15);
    text-transform: uppercase;
    letter-spacing: 3px;
}

.game-announcement.win {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-color: rgba(255, 255, 255, 0.4);
}

.game-announcement.lose {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
    border-color: rgba(255, 255, 255, 0.4);
}

.game-announcement.draw {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    color: #000;
    border-color: rgba(0, 0, 0, 0.2);
}

@keyframes show-announcement {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.3);
    }
    15% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    30% {
        transform: translate(-50%, -50%) scale(0.95);
    }
    45% {
        transform: translate(-50%, -50%) scale(1);
    }
    85% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.7);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .players-area {
        flex-direction: column;
        gap: 30px;
    }

    .vs-divider {
        transform: rotate(90deg);
        margin: -10px 0;
    }

    .choice-display {
        width: 130px;
        height: 130px;
    }

    .choice-icon img {
        width: 50px !important;
        height: 50px !important;
    }

    .result-display {
        font-size: 20px;
    }

    .choices-buttons {
        gap: 10px;
    }

    .choice-btn {
        min-width: 110px;
        padding: 15px 20px;
        font-size: 14px;
    }

    .choice-btn img {
        width: 28px !important;
        height: 28px !important;
    }

    .game-announcement {
        font-size: 32px;
        padding: 25px 50px;
    }
}

@media (max-width: 480px) {
    .game-container {
        padding: 20px 10px;
    }

    .choice-display {
        width: 110px;
        height: 110px;
    }

    .choice-icon img {
        width: 40px !important;
        height: 40px !important;
    }

    .vs-text {
        font-size: 24px;
        width: 60px;
        height: 60px;
    }

    .result-display {
        font-size: 18px;
        padding: 15px;
    }

    .choice-btn {
        min-width: 100px;
        padding: 12px 16px;
    }

    .game-announcement {
        font-size: 24px;
        padding: 20px 40px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-value {
        font-size: 28px;
    }
}
