* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

#app {
    max-width: 414px;
    margin: 0 auto;
    min-height: 100vh;
    background: #f5f5f5;
}

.page {
    display: none;
    min-height: 100vh;
    padding-bottom: 80px;
}

.page.active {
    display: block;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header h1 {
    flex: 1;
    text-align: center;
    font-size: 18px;
    margin-right: 40px;
}

.back-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

/* Content */
.content {
    padding: 16px;
}

/* Info Card */
.info-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.info-card h2 {
    font-size: 18px;
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 14px;
    color: #666;
}

/* Seat Section */
.seat-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.seat-section h3 {
    font-size: 16px;
    text-align: center;
    margin-bottom: 16px;
}

.stage {
    background: #e5e7eb;
    padding: 12px;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #6b7280;
}

.seats-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.seat {
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.seat.available {
    background: #dbeafe;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.seat.available:hover {
    background: #2563eb;
    color: white;
}

.seat.selected {
    background: #2563eb;
    color: white;
    border: 2px solid #2563eb;
}

.seat.occupied {
    background: #f3f4f6;
    color: #d1d5db;
    border: 2px solid #e5e7eb;
    cursor: not-allowed;
}

.seat-legend {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 12px;
    color: #6b7280;
}

.seat-legend span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.seat-legend .seat {
    width: 18px;
    height: 18px;
    font-size: 0;
}

/* Deposit Note */
.deposit-note {
    background: #fef3c7;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    font-size: 14px;
    color: #92400e;
    margin-bottom: 16px;
}

/* Selected Info */
.selected-info {
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.selected-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 14px;
}

#selected-seats {
    color: #2563eb;
    font-weight: 500;
}

.price {
    font-size: 18px;
    font-weight: 600;
    color: #2563eb;
}

/* Bottom Bar */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 414px;
    background: white;
    padding: 16px 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 100;
}

.confirm-btn {
    width: 100%;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.confirm-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

.confirm-btn:active:not(:disabled) {
    transform: scale(0.98);
}

/* Confirm Page */
.confirm-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.confirm-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.confirm-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 14px;
}

.confirm-row span:first-child {
    color: #666;
}

/* Payment Section */
.payment-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.payment-options {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.payment-item {
    display: flex;
    align-items: center;
    padding: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.payment-item:active {
    background: #f5f5f5;
}

.payment-item:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

.pay-icon {
    font-size: 28px;
    margin-right: 12px;
}

.pay-text {
    flex: 1;
}

.pay-name {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 4px;
}

.pay-desc {
    font-size: 12px;
    color: #999;
}

.pay-arrow {
    color: #ccc;
    font-size: 18px;
}

/* QR Code Page */
.qrcode-container {
    padding: 20px 0;
    text-align: center;
}

.qrcode-box {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.qrcode {
    width: 200px;
    height: 200px;
    margin: 0 auto 16px;
    background: #f5f5f5;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.qr-pattern {
    width: 120px;
    height: 120px;
    position: relative;
}

.qr-dot {
    position: absolute;
    width: 30px;
    height: 30px;
    background: #2563eb;
    border-radius: 6px;
}

.qr-dot:nth-child(1) { top: 0; left: 0; }
.qr-dot:nth-child(2) { top: 0; right: 0; }
.qr-dot:nth-child(3) { bottom: 0; left: 0; }
.qr-dot:nth-child(4) { 
    bottom: 0; 
    right: 0; 
    width: 60px;
    height: 60px;
    background: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-dot:nth-child(4)::after {
    content: "✓";
    color: white;
    font-size: 24px;
}

.order-number {
    font-size: 13px;
    color: #666;
}

.qrcode-timer {
    font-size: 18px;
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 20px;
}

.qrcode-tips {
    color: #666;
    font-size: 14px;
}

.qrcode-tips p {
    padding: 4px 0;
}

/* Success Page */
.success-container {
    padding: 40px 20px 20px;
    text-align: center;
}

.success-icon {
    font-size: 80px;
    margin-bottom: 16px;
}

.success-container h1 {
    font-size: 24px;
    color: #10b981;
    margin-bottom: 8px;
}

.sub-title {
    color: #666;
    margin-bottom: 24px;
}

.ticket-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ticket-header {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    padding: 14px;
    font-weight: 600;
}

.ticket-body {
    padding: 16px;
}

.ticket-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.ticket-row:last-child {
    border-bottom: none;
}

.ticket-row span:first-child {
    color: #666;
}

.rules-card {
    background: #f0fdf4;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #bbf7d0;
    text-align: left;
}

.rules-card h4 {
    font-size: 14px;
    color: #166534;
    margin-bottom: 10px;
}

.rule-item {
    font-size: 13px;
    color: #166534;
    padding: 4px 0;
}

.btn-primary {
    width: 100%;
    background: #2563eb;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Toast */
.toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    display: none;
}

.toast.show {
    display: block;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; }
    20% { opacity: 1; }
    80% { opacity: 1; }
    100% { opacity: 0; }
}
