/* ===== 야구장 테마 스타일 ===== */

/* 전역 스타일 */
* {
    box-sizing: border-box;
}

body {
    font-family: "KBO Dia Gothic";
    margin: 0;
    padding: 0;
    background: url('/images/order-backgorund.png') no-repeat center center fixed;
    background-size: cover;
    color: #333;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* 야구장 배경 효과 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 50% 100%, rgba(139, 69, 19, 0.1) 0%, transparent 70%),
        linear-gradient(180deg, rgba(30, 144, 255, 0.05) 0%, transparent 30%);
    pointer-events: none;
    z-index: -1;
}

/* 야구장 다이아몬드 패턴 */
body::after {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    width: 100vw;
    height: 100vh;
    transform: translate(-50%, -50%) rotate(45deg);
    background: 
        linear-gradient(45deg, transparent 48%, rgba(139, 69, 19, 0.03) 49%, rgba(139, 69, 19, 0.03) 51%, transparent 52%),
        linear-gradient(-45deg, transparent 48%, rgba(139, 69, 19, 0.03) 49%, rgba(139, 69, 19, 0.03) 51%, transparent 52%);
    background-size: 120px 120px;
    pointer-events: none;
    z-index: -1;
}

/* 메인 컨테이너 */
.container {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.2),
        0 8px 16px rgba(0, 0, 0, 0.1),
        inset 0 2px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
    position: relative;
    margin-top: 20px;
    margin-bottom: 20px;
    border: 3px solid #1e3c72;
}

/* 컨테이너 상단 스트라이프 */
.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, 
        #1e3c72 0%, 
        #2a5298 25%, 
        #ffd93d 50%, 
        #2a5298 75%, 
        #1e3c72 100%
    );
    z-index: 3;
}

/* 스타디움 헤더 */
header {
    background: linear-gradient(
        135deg,
        #1e3c72 0%,
        #2a5298 25%,
        #1e3c72 50%,
        #2a5298 75%,
        #1e3c72 100%
    );
    color: white;
    padding: 0;
    position: relative;
    overflow: hidden;
}

/* 스타디움 조명 효과 */
header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    right: -10%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 20% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 0%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 1;
}

.header-logo {
    text-align: center;
    padding: 30px 20px 20px;
    position: relative;
    z-index: 2;
}

.header-logo h1 {
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0 0 8px 0;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.2);
    letter-spacing: 2px;
}

.subtitle {
    margin-top: 12px;
}

.kbo-style {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #ffd700;
    margin-bottom: 6px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.subtitle p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
    font-weight: 500;
}

/* 스코어보드 스타일 */
.baseball-scoreboard {
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 100%);
    margin: 0 20px 20px;
    border-radius: 12px;
    padding: 16px;
    border: 2px solid #ffd700;
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 215, 0, 0.2);
    position: relative;
    z-index: 2;
}

.score-info {
    justify-content: space-between;
    align-items: center;
    font-family: 'KBO Dia Gothic';
    font-weight: light;
}

.inning {
    color: #ffd700;
    font-size: 0.9rem;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.score {
    color: #00ff41;
    font-size: 0.9rem;
    text-shadow: 0 0 8px rgba(0, 255, 65, 0.5);
}

.menu-img-placeholder {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
    box-shadow: 
        0 4px 12px rgba(30, 60, 114, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.menu-details {
    flex: 1;
    min-width: 0;
}

.menu-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3c72;
    margin: 0 0 6px 0;
    line-height: 1.3;
}

.menu-price {
    font-size: 1.05rem;
    font-weight: 600;
    color: #dc3545;
    margin: 0;
}

/* 수량 컨트롤 */
.menu-quantity {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.quantity-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #1e3c72;
    background: #ffffff;
    color: #1e3c72;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.quantity-btn:hover {
    background: #1e3c72;
    color: white;
    transform: scale(1.1);
}

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

.quantity {
    font-size: 1.1rem;
    font-weight: bold;
    color: #1e3c72;
    min-width: 24px;
    text-align: center;
}

/* 버튼 스타일 */
.btn, button {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 12px rgba(30, 60, 114, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

.btn::before, button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover, button:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(30, 60, 114, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn:hover::before, button:hover::before {
    left: 100%;
}

.btn:active, button:active {
    transform: translateY(0);
    box-shadow: 
        0 2px 8px rgba(30, 60, 114, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 주문 타입 버튼 */
.order-type-btn {
    flex: 1;
    margin: 0 6px;
    padding: 16px 12px;
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #dee2e6;
    font-weight: 600;
}

.order-type-btn.selected {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #28a745;
    color: white;
    box-shadow: 
        0 4px 12px rgba(40, 167, 69, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* 장바구니 스타일 */
#cart {
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 20px;
    margin: 20px;
    border: 2px solid #dee2e6;
}

#cart h2 {
    color: #1e3c72;
    font-size: 1.3rem;
    margin-bottom: 16px;
    font-weight: 700;
}

#cart-items {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

#cart-items li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #dee2e6;
    font-weight: 500;
}

#cart-items li:last-child {
    border-bottom: none;
}

#total-price {
    font-size: 1.4rem;
    font-weight: 900;
    color: #dc3545;
    text-align: center;
    padding: 16px;
    background: white;
    border-radius: 12px;
    border: 2px solid #dc3545;
    margin-top: 16px;
}

/* 입력 필드 */
input[type="text"], input[type="number"], input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.04);
}

input[type="text"]:focus, 
input[type="number"]:focus, 
input[type="password"]:focus {
    border-color: #1e3c72;
    outline: none;
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.04),
        0 0 0 3px rgba(30, 60, 114, 0.1);
}

/* 계좌 정보 카드 */
.account-info {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border: 2px solid #ffd93d;
    border-radius: 16px;
    padding: 20px;
    margin: 20px;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.2);
}

.account-info h3 {
    color: #856404;
    font-size: 1.2rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.account-info p {
    margin: 8px 0;
    color: #856404;
    font-weight: 500;
}

.notice {
    background: #dc3545;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 12px;
    text-align: center;
}

/* 웰컴 메시지 스타일 */
.welcome-message {
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.welcome-message h2 {
    color: #1e3c72;
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.welcome-message p {
    color: #495057;
    font-size: 0.95rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* 주문 타입 섹션 */
.order-type-section {
    padding: 20px;
    margin-bottom: 20px;
}

.order-type-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

/* 숨김 클래스 */
.hidden {
    display: none !important;
}

/* 로딩 및 상태 */
.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
}

/* 반응형 디자인 */
@media (max-width: 480px) {
    .container {
        border-radius: 16px;
    }
    
    .header-logo h1 {
        font-size: 1.8rem;
    }
    
    .menu-item {
        margin: -8px;
        padding: 16px;
    }
    
    .menu-img-placeholder {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* 관리자 스타일 */
.admin-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.stat-card {
    flex: 1;
    min-width: 120px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 60, 114, 0.15);
}

.stat-number {
    font-size: 2rem;
    font-weight: 900;
    color: #1e3c72;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6c757d;
}

.payment-pending-stat {
    border-color: #ffd93d;
    background: linear-gradient(145deg, #fff3cd 0%, #ffeaa7 100%);
}

.payment-pending-stat .stat-number {
    color: #856404;
}

/* 주문 카드 스타일 */
.order-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 20px;
    margin: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.order-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1e3c72, #2a5298);
    transition: all 0.3s ease;
}

.order-card[data-status="Payment Pending"]::before {
    background: linear-gradient(90deg, #ffd93d, #ffcc02);
}

.order-card[data-status="Payment Confirmed"]::before {
    background: linear-gradient(90deg, #28a745, #20c997);
}

.order-card[data-status="Preparing"]::before {
    background: linear-gradient(90deg, #fd7e14, #ff6b35);
}

.order-card[data-status="Order Complete"]::before {
    background: linear-gradient(90deg, #6f42c1, #e83e8c);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.order-header h3 {
    margin: 0;
    color: #1e3c72;
    font-weight: 700;
}

/* 상태 버튼 스타일 */
.status-btn {
    padding: 8px 16px;
    margin: 4px;
    border: 2px solid #1e3c72;
    background: white;
    color: #1e3c72;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.status-btn:hover {
    background: #1e3c72;
    color: white;
    transform: translateY(-1px);
}

.payment-confirm-btn {
    background: linear-gradient(135deg, #ffd93d 0%, #ffcc02 100%) !important;
    border-color: #ffd93d !important;
    color: #856404 !important;
    animation: pulse 2s infinite;
}

.payment-confirm-btn:hover {
    background: linear-gradient(135deg, #ffcc02 0%, #ffd93d 100%) !important;
    color: #856404 !important;
}

/* QR 코드 생성 섹션 */
.qr-generator-section {
    background: linear-gradient(145deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 24px;
    margin: 20px;
    border: 2px solid #dee2e6;
}

.qr-generator-section h2 {
    color: #1e3c72;
    margin-bottom: 20px;
    font-weight: 700;
}

.qr-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    margin-bottom: 20px;
}

.qr-input-group {
    flex: 1;
    min-width: 120px;
}

.qr-input-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #495057;
}

.qr-input-group input {
    margin-bottom: 0;
}

/* QR 코드 아이템 */
.qr-code-item {
    background: white;
    border: 2px solid #1e3c72;
    border-radius: 12px;
    padding: 20px;
    margin: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.15);
    display: inline-block;
    width: 280px;
    vertical-align: top;
}

.qr-code-header h3 {
    color: #1e3c72;
    margin: 0 0 8px 0;
    font-weight: 700;
}

.qr-instruction {
    color: #6c757d;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.qr-code-image img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-code-footer {
    margin-top: 16px;
}

.store-name {
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 8px;
}

.qr-url {
    font-size: 0.75rem;
    color: #6c757d;
    word-break: break-all;
    margin-bottom: 4px;
}

/* 알림 컨트롤 */
.notification-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.notification-btn {
    padding: 8px 12px;
    border: 2px solid #ffd93d;
    background: white;
    color: #856404;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.notification-btn:hover {
    background: #ffd93d;
    color: #856404;
    transform: translateY(-1px);
}

/* 매출 대시보드 */
.sales-dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 0 20px 20px;
}

.sales-card {
    flex: 1;
    min-width: 200px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(30, 60, 114, 0.3);
}

.sales-header {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    opacity: 0.9;
}

.sales-amount {
    font-size: 1.8rem;
    font-weight: 900;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.current-time {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    font-family: 'KBO Dia Gothic';
}

.top-menu {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.sales-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sales-detail span {
    font-size: 0.8rem;
    opacity: 0.8;
}

/* 다크 모드 대응 */
@media (prefers-color-scheme: dark) {
    .container {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .menu-item {
        background: linear-gradient(145deg, #2a2a2a 0%, #333333 100%);
        border-color: #444444;
        color: #ffffff;
    }
}

.action-buttons {
    position: fixed;
    left: 84%;
    transform: translateX(-50%);
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
    z-index: 1000;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.action-buttons button {
    background: linear-gradient(135deg, #F24F41, #ffc3be);
    color: #EDECED;
    border: 2px solid #F24F41;
    border-radius: 12px;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s ease;
}

.action-buttons button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(26, 84, 144, .35);
}

/* 3) 대기 번호 컨테이너 스타일 (요청하신 디자인 + ::before 아이콘 정상 작동) / */
.waiting-number-container {
    position: relative;
    isolation: isolate; 
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #1C355D 100%);
    color: #fff;
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    margin: 30px 2rem 30px 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
}
.waiting-number-container::before {
    content: '⚾';
    position: absolute;
    top: -20px;
    right: -20px;
    font-size: 8em;
    opacity: .1;
    z-index: 0;
    pointer-events: none;
}
/* 컨텐츠가 ::before 위로 오도록  */
.waiting-number-container .waiting-title,
.waiting-number-container .waiting-number,
.waiting-number-container .waiting-subtitle {
    position: relative;
    margin-bottom: 10px;
    z-index: 1;
}

/* 1) status-progress 안의 progress-header를 왼쪽 정렬 */
.status-progress .progress-header {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-progress .progress-header h3 {
    margin-left: 7%;
    font-size: 20px;
    font-weight: 700;
    color: #182F5B;
}

.status-progress .auto-refresh-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 300;
    font-size: 12px;
    color: #182F5B;
    opacity: 0.9;
}