/* CSS 变量 */
:root {
    --bg-color: #0d0c1b;
    --card-bg-color: #1a192f;
    --text-color: #e0e0e0;
    --primary-color: #9c27b0;
    --primary-dark-color: #6a0dad;
    --highlight-color: #ffd700;
    --border-radius: 12px;
    --transition-speed: 0.3s;
}

/* 全局和基础样式 */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
}

/* 头部导航 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: var(--card-bg-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    z-index: 100;
}

.logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--highlight-color);
}

.nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
}

.nav a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: color var(--transition-speed);
}

.nav a:hover {
    color: var(--primary-color);
}

.main-content {
    flex-grow: 1;
    padding: 20px 15px;
    box-sizing: border-box;
}

.section-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 15px;
    padding-left: 10px;
    border-left: 3px solid var(--primary-color);
}

/* 活动信息卡片 */
.event-info-card {
    display: flex;
    background: linear-gradient(135deg, var(--card-bg-color), #2f2e46);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    gap: 20px;
    align-items: center;
}

.event-poster {
    width: 120px;
    height: 168px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.details {
    display: flex;
    flex-direction: column;
}

.event-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 0 5px;
    color: var(--highlight-color);
}

.event-meta {
    font-size: 0.8rem;
    color: #b0b0b0;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.rating {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 1rem;
    color: var(--highlight-color);
}

.rating-icon {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 倒计时模块 */
.countdown-section {
    text-align: center;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.timer-unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: #ccc;
}

.timer-unit span:first-child {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(156, 39, 176, 0.5);
}

/* 场次/票价选择 */
.showtime-list {
    display: flex;
    overflow-x: auto;
    gap: 15px;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.showtime-item {
    padding: 10px 20px;
    font-size: 0.9rem;
    background-color: #33324d;
    color: var(--text-color);
    border: 1px solid #33324d;
    border-radius: 8px;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition-speed);
}

.showtime-item.active {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark-color));
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(156, 39, 176, 0.4);
    transform: translateY(-2px);
}

/* 输入框部分样式，现在只用于弹窗内 */
.info-input-section {
    padding: 20px 0;
}

.input-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.input-group label {
    font-size: 0.9rem;
    color: #b0b0b0;
    margin-bottom: 5px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    background-color: #33324d;
    border: 1px solid #55546d;
    border-radius: 8px;
    color: var(--text-color);
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 底部结账栏 */
.checkout-footer {
    /* 手机端保持静态 */
    position: static;
    left: auto;
    bottom: auto;
    width: auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
    z-index: 50;
    margin-top: 50px;
    border-top: 1px solid #33324d;
}

.summary {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.summary-item {
    font-size: 0.9rem;
    color: #b0b0b0;
}

#selected-price-info {
    font-weight: bold;
    color: var(--primary-color);
}

#selected-showtime-info {
    font-weight: bold;
    color: var(--primary-color);
}

.buy-button {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    background: #4a4a6b;
    color: #999;
    border: none;
    border-radius: 50px;
    cursor: not-allowed;
    transition: all 0.2s;
}

.buy-button.active {
    background-color: var(--primary-color);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(156, 39, 176, 0.4);
    animation: blink-button 1.5s infinite;
}

@keyframes blink-button {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ------------------ 模态窗口样式 ------------------ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

.modal-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.modal-content {
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform: translateY(0);
    transition: transform 0.3s ease-in-out;
    position: relative;
}

.modal-overlay.hidden .modal-content {
    transform: translateY(-20px);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--highlight-color);
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-icon {
    font-size: 2.5rem;
    color: var(--highlight-color);
    display: block;
    margin-bottom: 10px;
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 0;
}

.modal-body {
    font-size: 0.9rem;
    line-height: 1.8;
}

.modal-body p {
    color: #ccc;
}

.modal-body strong {
    color: var(--primary-color);
    font-weight: 700;
}

.modal-body ul {
    padding-left: 20px;
    margin-top: 10px;
    color: #b0b0b0;
}

.modal-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.modal-button {
    padding: 12px 25px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s;
}

.cancel-btn {
    background-color: #4a4a6b;
    color: #fff;
}

.cancel-btn:hover {
    background-color: #5d5d81;
}

.confirm-btn {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark-color));
    color: #fff;
    box-shadow: 0 4px 10px rgba(156, 39, 176, 0.4);
}

.confirm-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(156, 39, 176, 0.5);
}

/* 诈骗警告弹窗的专属样式和动画 */
.scam-content {
    background-color: #0d0c1b; /* 红色背景 */
    border: 3px solid #ffeb3b; /* 醒目的黄色边框，与红色形成对比 */
    animation: scam-border-pulse 1.5s infinite; /* 边框闪烁，主体内容不晃动 */
}

/* 诈骗警告弹窗的图标震动动画 */
@keyframes scam-icon-shake {
    0%, 100% { transform: translateX(0) scale(1); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px) scale(1.1); }
    20%, 40%, 60%, 80% { transform: translateX(5px) scale(1.1); }
}

/* 覆盖 .modal-icon 样式，使其只在诈骗弹窗中应用晃动 */
.scam-content .modal-icon {
    animation: scam-icon-shake 0.5s ease-in-out infinite; /* 只让图标晃动 */
    color: #ffeb3b; /* 警告图标改为黄色 */
}

/* 边框闪烁动画 */
@keyframes scam-border-pulse {
    0%, 100% { border-color: #ffeb3b; } /* 闪烁的黄色边框 */
    50% { border-color: transparent; }
}


/* 桌面端适配 */
@media (min-width: 768px) {
    .header { padding: 20px 50px; }
    .main-content {
        max-width: 800px;
        margin: 0 auto;
        padding: 40px 20px 100px; /* 新增底部内边距，留出空间给固定栏 */
        flex-grow: 1;
        overflow-y: auto;
    }
    .event-info-card { gap: 40px; }
    .event-poster { width: 200px; height: 280px; }
    .event-title { font-size: 2rem; }
    .event-meta { font-size: 0.9rem; }
    .countdown-timer { gap: 20px; }
    .timer-unit span:first-child { font-size: 3.5rem; }
    .showtime-list { overflow-x: visible; flex-wrap: wrap; padding-bottom: 0; }
    .buy-button.active:hover { transform: scale(1.02); }

    /* 桌面端 footer 样式调整 */
    .checkout-footer {
        position: fixed;
        bottom: 20px;
        width: 760px; /* max-width of main-content (800) - padding (20*2) */
        left: 50%;
        transform: translateX(-50%);
        padding: 20px 30px;
        border-radius: var(--border-radius);
        background-color: var(--card-bg-color);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
        border-top: none;
    }
    
    .info-input-section {
        padding: 0;
    }
}