/* 가위바위보 게임 스타일 */
.rps-screen {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-gradient-start) 0%, var(--primary-gradient-end) 100%);
    display: flex;
    flex-direction: column;
}

/* 헤더 */
.rps-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.rps-title {
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    margin: 0;
}

.rps-info {
    font-size: 14px;
    font-weight: 500;
}

.free-chance {
    color: #90EE90;
    background: rgba(144, 238, 144, 0.2);
    padding: 4px 12px;
    border-radius: 12px;
}

/* 게임 설명 */
.game-description {
    padding: 20px;
    text-align: center;
}

.description-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.description-icon {
    font-size: 32px;
    min-width: 40px;
}

.description-text {
    flex: 1;
    text-align: left;
    color: var(--white);
}

.description-text p {
    margin: 4px 0;
    font-size: 14px;
    line-height: 1.4;
}

.description-text strong {
    font-weight: 700;
}

/* 게임 영역 */
.game-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    gap: 20px;
}

.computer-section,
.player-section {
    text-align: center;
}

.player-label {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0.9;
}

.choice-display {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    border: 2px solid rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.choice-placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
    font-weight: 500;
}

.thinking-dots::after {
    content: '';
    animation: thinking-dots 1.5s infinite;
}

@keyframes thinking-dots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
    100% { content: ''; }
}

.select-text {
    animation: pulse 2s infinite;
}

/* 선택된 항목 표시 */
.selected-choice {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: choice-appear 0.5s ease-out;
}

.choice-icon-large {
    font-size: 48px;
    transition: transform 0.3s ease;
}

.choice-name-large {
    font-size: 20px;
    font-weight: 700;
    color: var(--white);
}

/* VS 섹션 */
.vs-section {
    text-align: center;
    position: relative;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-text {
    font-size: 28px;
    font-weight: 900;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 4px;
}

.countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.countdown-number {
    font-size: 48px;
    font-weight: 900;
    color: #FFD700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    display: inline-block;
}

.countdown-number.animate {
    animation: countdown-bounce 0.8s ease-out;
}

@keyframes countdown-bounce {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* 선택 버튼 */
.choice-buttons {
    display: flex;
    gap: 16px;
    padding: 0 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.choice-btn {
    flex: 1;
    min-width: 100px;
    max-width: 120px;
    background: rgba(255, 255, 255, 0.9);
    border: 3px solid transparent;
    border-radius: var(--border-radius-lg);
    padding: 20px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.choice-btn:hover:not(.disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: var(--primary-gradient-end);
}

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

.choice-btn.selected {
    border-color: #FFD700;
    background: rgba(255, 215, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.4);
}

.choice-btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.choice-icon {
    font-size: 32px;
    margin-bottom: 8px;
    display: block;
}

.choice-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 4px;
}

.choice-emoji {
    font-size: 20px;
    opacity: 0.7;
}

/* 게임 상태 */
.game-status {
    text-align: center;
    padding: 20px;
}

.status-message {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.status-message.result-win {
    background: rgba(40, 167, 69, 0.2);
    border-color: #28a745;
    color: #90EE90;
    animation: result-glow 1s ease-out;
}

.status-message.result-lose {
    background: rgba(220, 53, 69, 0.2);
    border-color: #dc3545;
    color: #FFB6C1;
}

.status-message.result-draw {
    background: rgba(255, 193, 7, 0.2);
    border-color: #ffc107;
    color: #FFE135;
}

@keyframes result-glow {
    0% {
        box-shadow: 0 0 5px rgba(40, 167, 69, 0.5);
    }
    50% {
        box-shadow: 0 0 25px rgba(40, 167, 69, 0.8);
    }
    100% {
        box-shadow: 0 0 10px rgba(40, 167, 69, 0.6);
    }
}

/* 결과 액션 */
.result-actions {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.action-btn {
    padding: 14px 28px;
    border: none;
    border-radius: var(--border-radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 200px;
}

.action-btn.btn-primary {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.action-btn.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
}

.action-btn.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.action-btn.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

/* 게임 규칙 */
.game-rules {
    background: var(--white);
    margin-top: auto;
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    overflow: hidden;
}

.rules-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #eee;
}

.rules-toggle:hover {
    background-color: #f8f9fa;
}

.rules-icon {
    font-size: 20px;
}

.rules-text {
    flex: 1;
    font-weight: 600;
    color: var(--dark-color);
}

.toggle-arrow {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

.rules-content {
    padding: 20px;
    border-top: 1px solid #eee;
}

.rule-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px 0;
}

.rule-item:last-child {
    margin-bottom: 0;
}

.rule-icon {
    font-size: 18px;
    min-width: 24px;
    text-align: center;
}

.rule-text {
    flex: 1;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

/* 결과 애니메이션 */
.reveal-animation {
    animation: reveal 0.5s ease-out;
}

@keyframes reveal {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.selected-choice.winner .choice-icon-large {
    animation: winner-bounce 1s ease-out;
    color: #28a745;
}

.selected-choice.loser .choice-icon-large {
    animation: loser-shake 0.5s ease-out;
    color: #dc3545;
    opacity: 0.6;
}

.selected-choice.draw .choice-icon-large {
    animation: draw-pulse 1s ease-out;
    color: #ffc107;
}

@keyframes choice-appear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes winner-bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-10px) scale(1.1);
    }
    60% {
        transform: translateY(-5px) scale(1.05);
    }
}

@keyframes loser-shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

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

/* 모바일 최적화 */
@media (max-width: 768px) {
    .rps-header {
        padding: 16px;
    }
    
    .rps-title {
        font-size: 18px;
    }
    
    .game-description {
        padding: 16px;
    }
    
    .description-card {
        padding: 16px;
        gap: 12px;
    }
    
    .description-icon {
        font-size: 28px;
        min-width: 32px;
    }
    
    .description-text p {
        font-size: 13px;
    }
    
    .game-area {
        padding: 16px;
        gap: 16px;
    }
    
    .choice-display {
        height: 100px;
    }
    
    .choice-icon-large {
        font-size: 40px;
    }
    
    .choice-name-large {
        font-size: 18px;
    }
    
    .vs-text {
        font-size: 24px;
        letter-spacing: 2px;
    }
    
    .countdown-number {
        font-size: 36px;
    }
    
    .choice-buttons {
        padding: 0 16px;
        gap: 12px;
    }
    
    .choice-btn {
        min-width: 80px;
        max-width: 100px;
        padding: 16px 8px;
    }
    
    .choice-icon {
        font-size: 28px;
        margin-bottom: 6px;
    }
    
    .choice-name {
        font-size: 13px;
    }
    
    .choice-emoji {
        font-size: 16px;
    }
    
    .game-status {
        padding: 16px;
    }
    
    .status-message {
        font-size: 16px;
        padding: 14px 16px;
    }
    
    .result-actions {
        padding: 16px;
    }
    
    .action-btn {
        min-width: 160px;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .rules-content {
        padding: 16px;
    }
    
    .rule-text {
        font-size: 13px;
    }
}

@media (max-width: 375px) {
    .choice-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .choice-btn {
        max-width: 200px;
        width: 100%;
    }
    
    .description-card {
        flex-direction: column;
        text-align: center;
    }
}

/* 접근성 */
@media (prefers-reduced-motion: reduce) {
    .choice-btn,
    .selected-choice,
    .countdown-number,
    .choice-icon-large {
        animation: none !important;
        transition: none !important;
    }
    
    .thinking-dots::after {
        animation: none;
        content: '...';
    }
}

/* 다크 모드 */
@media (prefers-color-scheme: dark) {
    .game-rules {
        background: #2c3e50;
        color: var(--white);
    }
    
    .rules-toggle {
        border-bottom-color: #495057;
    }
    
    .rules-toggle:hover {
        background-color: #495057;
    }
    
    .rules-text {
        color: var(--white);
    }
    
    .rule-text {
        color: #adb5bd;
    }
    
    .rules-content {
        border-top-color: #495057;
    }
    
    .choice-btn {
        background: rgba(52, 73, 94, 0.9);
        color: var(--white);
    }
    
    .choice-name {
        color: var(--white);
    }
}

/* 상품 미리보기 카드 */
.prize-preview-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 20px;
    margin-top: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.prize-preview-header {
    text-align: center;
    margin-bottom: 16px;
}

.preview-label {
    color: var(--white);
    font-size: 16px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
}

.prize-preview-content {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.prize-preview-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

.prize-preview-info {
    flex: 1;
}

.prize-preview-name {
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.prize-preview-grade {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.prize-preview-value {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* 도전 메시지 (가위바위보 버튼 위에) */
.challenge-message {
    padding: 0 20px;
    margin: 8px 0 4px 0;
}

.challenge-text {
    text-align: center;
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    padding: 12px 16px;
    border-radius: 12px;
    border-left: 4px solid #ffd93d;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}