/* 丽派朵芭蕾十周年 - 购票系统公共样式 */
:root {
    --primary: #8B1E3F;       /* 酒红 */
    --primary-dark: #6B1531;
    --gold: #C9A227;          /* 金色 */
    --gold-light: #E8D7A3;
    --dark: #2C1810;
    --text: #4A3B2A;
    --bg-cream: #FDF8F0;
    --white: #FFFFFF;
    --success: #2E7D32;
    --danger: #C62828;
    --gray: #888888;
    --border: rgba(201, 162, 39, 0.4);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: var(--text);
    background: var(--bg-cream);
}

/* 首页特殊布局 */
.page-home {
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    background: url('../首页背景图.jpg') no-repeat center top;
    background-size: cover;
    position: relative;
}

.home-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 50%, rgba(44,24,16,0.55) 100%);
}

.home-actions {
    position: absolute;
    bottom: 12vh;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 0 32px;
}

/* 子页背景 */
.page-sub {
    min-height: 100vh;
    background: url('../子页背景图.jpg') no-repeat center top;
    background-size: cover;
    background-attachment: fixed;
    padding-bottom: 40px;
}

.sub-overlay {
    min-height: 100vh;
    background: rgba(253, 248, 240, 0.86);
    backdrop-filter: blur(2px);
}

.container {
    max-width: 720px;
    margin: 0 auto;
    padding: 20px;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 50px;
    padding: 14px 36px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(139, 30, 63, 0.35);
}

.btn-primary:hover, .btn-primary:active {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 30, 63, 0.45);
}

.btn-outline {
    background: rgba(255,255,255,0.12);
    color: var(--gold-light);
    border: 1px solid var(--gold-light);
    backdrop-filter: blur(4px);
}

.btn-outline:hover, .btn-outline:active {
    background: rgba(255,255,255,0.22);
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, #A8821D 100%);
    color: var(--white);
    box-shadow: 0 4px 16px rgba(201, 162, 39, 0.35);
}

.btn-gold:hover { transform: translateY(-2px); }

.btn-sm { padding: 8px 18px; font-size: 14px; }

.btn-block { width: 100%; }

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* 页面标题栏 */
.header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 16px 0;
    margin-bottom: 12px;
}

.header-bar h1 {
    margin: 0;
    font-size: 20px;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 1px;
}

.back-link {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

/* 卡片 */
.card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 20px rgba(139, 30, 63, 0.08);
}

.card-title {
    margin: 0 0 14px 0;
    font-size: 16px;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--text);
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
}

.form-input:focus {
    border-color: var(--gold);
}

/* 座位图 SVG 容器 */
.seat-canvas-wrapper {
    background: rgba(255,255,255,0.9);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: auto;
    margin-bottom: 10px;
    box-shadow: 0 4px 20px rgba(139,30,63,0.06);
    user-select: none;
    max-height: calc(100vh - 240px);
    -webkit-overflow-scrolling: touch;
    text-align: center;
}

.seat-canvas-wrapper svg {
    display: inline-block;
    max-width: none;
}

@media (max-width: 480px) {
    .seat-canvas-wrapper {
        max-height: calc(100vh - 200px);
    }
}

/* 缩放控制栏 */
.zoom-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-bottom: 6px;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.9);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    transition: all 0.15s;
}

.zoom-btn:hover {
    background: rgba(201,162,39,0.1);
    border-color: var(--gold);
}

.zoom-level {
    font-size: 12px;
    color: var(--gray);
    min-width: 42px;
    text-align: center;
}

/* 区域标签 */
.seat-area-label {
    font-size: 11px;
    fill: var(--primary);
    font-weight: 600;
}

.seat-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 16px;
    font-size: 12px;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.legend-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* 固定底部 */
.sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.96);
    border-top: 1px solid var(--border);
    padding: 12px 20px 20px;
    z-index: 100;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
}

.sticky-footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
}

.footer-info { flex: 1; }
.footer-count { font-size: 14px; color: var(--text); }
.footer-tip { font-size: 12px; color: var(--gray); margin-top: 2px; }

/* 凭证 */
.ticket-card {
    background: linear-gradient(135deg, #fff 0%, #FFF9F0 100%);
    border: 1px solid var(--gold);
    border-radius: 16px;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.ticket-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, rgba(201,162,39,0.15) 0%, transparent 70%);
}

.ticket-title {
    text-align: center;
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 18px;
    font-weight: 600;
    letter-spacing: 2px;
}

.ticket-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(201,162,39,0.3);
    font-size: 14px;
}

.ticket-row:last-child { border-bottom: none; }
.ticket-label { color: var(--gray); }
.ticket-value { color: var(--text); font-weight: 500; }

.ticket-seats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.seat-tag {
    background: rgba(201,162,39,0.12);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid var(--border);
}

/* 提示 */
.tips {
    background: rgba(201,162,39,0.1);
    border-left: 3px solid var(--gold);
    padding: 10px 12px;
    border-radius: 0 8px 8px 0;
    font-size: 13px;
    color: var(--text);
    margin-bottom: 16px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray);
}

.empty-state svg {
    stroke: var(--gold);
    margin-bottom: 12px;
}

/* 后台表格 */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th, .admin-table td {
    border: 1px solid var(--border);
    padding: 10px;
    text-align: left;
}

.admin-table th {
    background: rgba(139,30,63,0.06);
    color: var(--primary);
    font-weight: 600;
}

.admin-table tr:nth-child(even) { background: rgba(201,162,39,0.04); }

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.status-occupied { background: #E8F5E9; color: var(--success); border: 1px solid #A5D6A7; }
.status-locked { background: #F5E6EB; color: var(--primary); border: 1px solid #E1BEC7; }
.status-free { background: #FFF; color: var(--gray); border: 1px solid #DDD; }

/* 响应式 */
@media (max-width: 480px) {
    .home-actions { bottom: 10vh; padding: 0 24px; }
    .btn { padding: 13px 28px; font-size: 15px; }
    .container { padding: 16px; }
    .seat { width: 24px; height: 24px; font-size: 9px; }
    .seat-row { gap: 4px; }
    .row-label { width: 20px; }
    .header-bar h1 { font-size: 18px; }
}

@media (min-width: 481px) and (max-width: 720px) {
    .seat { width: 26px; height: 26px; }
}
