* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: #1e3c72;
    min-height: 100vh;
    color: white;
    margin: 0;
    padding: 0;
    overflow: hidden;
    position: relative;
}

.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    z-index: 10;
}

.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* 시작 화면 */
#startScreen h1 {
    font-size: 4rem;
    margin-bottom: 3rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.menu-buttons {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.main-button {
    padding: 20px 60px;
    font-size: 2rem;
    background: linear-gradient(45deg, #ff6b6b, #ee5a6f);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.main-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.main-button:active {
    transform: translateY(-2px);
}

#startBlackjackBtn {
    background: linear-gradient(45deg, #2ecc71, #27ae60);
}

.slot-btn {
    background: linear-gradient(45deg, #e91e63, #9c27b0);
}

.back-button {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 20px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 25px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* 게임 화면 */
.game-container {
    width: 90%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px;
    margin: 20px 0;
}

.player-area {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.player-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
111
.player-info h3 {
    font-size: 1.5rem;
}

.chips {
    font-size: 1.2rem;
    background: rgba(255, 215, 0, 0.3);
    padding: 5px 15px;
    border-radius: 20px;
}

/* 카드 */
.cards {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 15px 0;
}

.card {
    width: 80px;
    height: 112px;
    background: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-10px);
}

.card.back {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.card.back::before {
    content: '🂠';
    font-size: 3rem;
}

.card-value {
    font-size: 1.8rem;
}

.card-suit {
    font-size: 2rem;
}

.card.red {
    color: #ff0000;
}

.card.black {
    color: #000000;
}

/* 커뮤니티 영역 */
.community-area {
    text-align: center;
    padding: 20px;
}

.pot-info {
    font-size: 1.5rem;
    margin-bottom: 20px;
    background: rgba(255, 215, 0, 0.2);
    display: inline-block;
    padding: 10px 30px;
    border-radius: 25px;
}

.community-cards {
    min-height: 112px;
    margin: 20px 0;
}

.game-message {
    font-size: 1.2rem;
    margin-top: 15px;
    min-height: 30px;
    color: #ffd700;
}

.action-display {
    text-align: center;
    font-size: 1.1rem;
    margin-top: 10px;
    color: #ffd700;
    min-height: 25px;
}

/* 베팅 컨트롤 */
.betting-controls {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 15px;
}

.action-button {
    padding: 12px 25px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: bold;
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#foldBtn {
    background: #e74c3c;
    color: white;
}

#foldBtn:hover:not(:disabled) {
    background: #c0392b;
}

#checkBtn {
    background: #95a5a6;
    color: white;
}

#checkBtn:hover:not(:disabled) {
    background: #7f8c8d;
}

#callBtn {
    background: #3498db;
    color: white;
}

#callBtn:hover:not(:disabled) {
    background: #2980b9;
}

#raiseBtn {
    background: #2ecc71;
    color: white;
}

#raiseBtn:hover:not(:disabled) {
    background: #27ae60;
}

.raise-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

#raiseSlider {
    width: 150px;
}

#raiseAmount {
    font-size: 1.2rem;
    font-weight: bold;
    min-width: 60px;
}

/* 결과 화면 */
.result-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.1);
    padding: 50px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

#resultTitle {
    font-size: 3rem;
    margin-bottom: 20px;
}

#resultMessage {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

/* 블랙잭 승리 조건 선택 화면 */
#bjGoalScreen h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.goal-buttons {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.goal-button {
    padding: 20px 80px;
    font-size: 1.8rem;
    background: linear-gradient(45deg, #3498db, #2980b9);
    border: none;
    border-radius: 15px;
    color: white;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s;
    min-width: 300px;
    font-weight: bold;
}

.goal-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.goal-button:active {
    transform: translateY(-2px) scale(1.02);
}

.goal-button.unlimited {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    font-size: 2rem;
    margin-top: 10px;
}

.bj-goal-btn {
    background: linear-gradient(45deg, #3498db, #2980b9);
}

.slot-goal-btn {
    background: linear-gradient(45deg, #e91e63, #c2185b);
}

/* 블랙잭 전용 스타일 */
.dealer-area {
    background: rgba(231, 76, 60, 0.15);
}

.score-display {
    font-size: 1.3rem;
    background: rgba(52, 152, 219, 0.3);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: bold;
}

.bj-betting-phase, .bj-game-phase, .bj-result-phase {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.bet-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 15px;
}

.bet-chip-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid #ffd700;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.bet-chip-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.bet-chip-btn:active {
    transform: scale(0.95);
}

.bet-chip-btn.selected {
    border-color: #2ecc71;
    background: linear-gradient(135deg, #2ecc71, #27ae60);
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    animation: fadeIn 0.3s ease-out;
}

@keyframes bust {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.bust-animation {
    animation: bust 0.5s ease-in-out;
}

/* 슬롯머신 스타일 */
.slot-container {
    width: 90%;
    max-width: 800px;
    text-align: center;
    padding: 20px;
    margin: 20px 0;
}

.slot-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.slot-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.slot-info-item {
    font-size: 1.3rem;
    background: rgba(255, 255, 255, 0.15);
    padding: 10px 25px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.goal-info {
    background: rgba(255, 215, 0, 0.3);
}

.slot-machine {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    border: 5px solid #f39c12;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    margin-bottom: 30px;
}

.slot-reels {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.slot-reel {
    width: 150px;
    height: 150px;
    background: white;
    border: 4px solid #2c3e50;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    box-shadow: inset 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.symbol {
    animation: symbolPop 0.3s ease-out;
}

.slot-reel.spinning .symbol {
    animation: spin 0.1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

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

@keyframes win {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); box-shadow: 0 0 30px gold; }
}

.slot-reel.win {
    animation: win 0.5s ease-in-out 3;
    border-color: gold;
}

.slot-message {
    font-size: 1.8rem;
    min-height: 40px;
    margin-bottom: 20px;
    color: #ffd700;
    font-weight: bold;
}

.slot-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.bet-selection {
    display: flex;
    gap: 10px;
}

.bet-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: 3px solid #3498db;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.bet-btn:hover {
    transform: scale(1.1);
}

.bet-btn.active {
    border-color: #f39c12;
    background: linear-gradient(135deg, #f39c12, #e67e22);
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.5);
}

.spin-button {
    padding: 20px 80px;
    font-size: 2rem;
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    border: none;
    border-radius: 50px;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    font-weight: bold;
}

.spin-button:hover:not(:disabled) {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.spin-button:active:not(:disabled) {
    transform: translateY(-2px);
}

.spin-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.paytable {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

.paytable h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.paytable-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.paytable-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 10px;
    border-radius: 10px;
    font-size: 1.1rem;
}

