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

/* Base Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #ffffff;
    color: #1a1a1a;
    overflow-x: hidden;
    padding-bottom: 80px;
    padding-top: 70px;
}

/* Header Styles */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: linear-gradient(135deg, #1a1a2e, #16213e, #0f3460);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


.btn-save {
    background: #3b82f6;
    color: white;
}

.btn-save:hover {
    background: #2563eb;
}

.btn-cancel {
    background: #e5e7eb;
    color: #374151;
}

.btn-cancel:hover {
    background: #d1d5db;
}

.btn-reset {
    background: #ef4444;
    color: white;
}

.btn-reset:hover {
    background: #dc2626;
}

/* 웰컴 메시지 */
.welcome-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transform: translateX(400px);
    transition: transform 0.3s ease-out;
    z-index: 1500;
}

.welcome-toast.show {
    transform: translateX(0);
}

.welcome-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.welcome-toast-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, #10b981, #34d399);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    color: white;
}


.coins {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.4);
    border-radius: 25px;
    padding: 8px 16px;
    gap: 8px;
}

.coin-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-btn {
    width: 32px;
    height: 32px;
    background: #10b981;
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.download-btn {
    background: #374151;
    border: none;
    color: white;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Banner */
.hero-banner {
    position: relative;
    height: 200px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.trophy {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 20px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
}

.trophy::before {
    content: '🏆';
}

.hero-content {
    flex: 1;
    text-align: center;
}

.hero-content h2 {
    font-size: 36px;
    margin-bottom: 10px;
    color: #1e293b;
}

.badges {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.badge {
    padding: 6px 16px;
    border: 2px solid #7c3aed;
    border-radius: 8px;
    font-size: 14px;
    color: #7c3aed;
    background: white;
}

.poker-table {
    width: 100px;
    height: 80px;
}

/* Tabs */
.tabs {
    display: flex;
    padding: 0 20px;
    margin: 20px 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #6b7280;
    border-bottom: 3px solid transparent;
    cursor: pointer;
}

.tab.active {
    color: #3b82f6;
    border-bottom-color: #3b82f6;
}

/* Game Info */
.game-info {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    background: #f9fafb;
    margin: 10px 10px;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    position: relative;
}

.info-item {
    text-align: center;
}

.info-value {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: #1f2937;
}

.info-label {
    font-size: 11px;
    color: #6b7280;
}

/* 의자 정보 - 왼쪽 하단 고정 */
.seat-info {
    position: absolute;
    bottom: 0px;
    right: 12px;
    color: #6b7280;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.room-info {
    position: absolute;
    top: -15px;
    left: -4px;
    color: #374151;
    font-size: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: #ffffff;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: bold;
    border: 1.5px solid #e5e7eb;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Tournament Card */
.tournament-card {
    background: white;
    margin: 10px 20px;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.tournament-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.tournament-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.tournament-title {
    font-size: 20px;
    font-weight: bold;
    color: #1f2937;
}

.tournament-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    color: #374151;
}

.registration {
    display: flex;
    gap: 10px;
}

.reg-info {
    flex: 1;
    background: #f3f4f6;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    color: #374151;
}

.reg-btn {
    background: linear-gradient(135deg, #ea580c, #dc2626);
    border: none;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* How to Play */
.how-to-play {
    background: #fef3c7;
    margin: 20px;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.tip-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    padding: 10px 0;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-item {
    flex: 1;
    text-align: center;
    padding: 10px;
    color: #9ca3af;
    text-decoration: none;
    position: relative;
    cursor: pointer;
}

.nav-item.active {
    color: #3b82f6;
}

.nav-icon {
    width: 32px;
    height: 32px;
    margin: 0 auto 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-label {
    font-size: 12px;
    font-weight: 500;
}

.notification-dot {
    position: absolute;
    top: 5px;
    right: 50%;
    transform: translateX(50%);
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
}

/* Other Components */
.close-btn {
    background: #e5e7eb;
    border: none;
    color: #6b7280;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.money-info {
    background: #f9fafb;
    padding: 15px 20px;
    margin: 10px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.money-icon {
    width: 40px;
    height: 40px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

/* SVG Styles */
.svg-icon {
    width: 100%;
    height: 100%;
}

.arrow-icon {
    width: 14px;
    height: 14px;
}

/* 게임 카드 컨테이너 */
.game-card {
    position: relative;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.game-card.active {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* 게임 정보 스타일 수정 */
.game-info {
    position: relative;
    z-index: 2;
    background: #fff;
    transition: all 0.3s ease;
}

.game-card.active .game-info {
    border-bottom: 1px solid #f0f0f0;
}

/* 슬라이드 메뉴 */
.slide-menu {
    display: flex;
    gap: 10px;
    padding: 0 15px;
    height: 0;
    overflow: hidden;
    background: #f8f9fa;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.game-card.active .slide-menu {
    height: 70px;
    padding: 10px 15px;
}

/* 슬라이드 버튼 */
.slide-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0;
    transform: translateY(10px);
}

.game-card.active .slide-btn {
    opacity: 1;
    transform: translateY(0);
}

.game-card.active .slide-btn:nth-child(1) {
    transition-delay: 0.1s;
}

.game-card.active .slide-btn:nth-child(2) {
    transition-delay: 0.15s;
}

/* 게임 참여 버튼 */
.join-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.join-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.join-btn:active {
    transform: translateY(0);
}

/* 바인/아웃 버튼 */
.buyin-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.buyin-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.buyin-btn:active {
    transform: translateY(0);
}

/* 애니메이션 효과 */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes buttonFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* 모바일 최적화 */
@media (max-width: 768px) {
    .slide-menu {
        gap: 8px;
    }
    
    .game-card.active .slide-menu {
        height: 65px;
        padding: 8px 12px;
    }
    
    .slide-btn {
        font-size: 13px;
        padding: 10px 12px;
    }
}

/* 버튼 아이콘 애니메이션 */
.slide-btn svg {
    transition: transform 0.2s ease;
}

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

/* 리플 효과 */
.slide-btn {
    position: relative;
    overflow: hidden;
}

.slide-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.slide-btn:active::after {
    width: 300px;
    height: 300px;
}


/* 로딩 스피너 */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}