/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ===== 深邃背景 ===== */
body {
    background-color: #05070e; 
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    color: #ffffff;
    padding: 0 20px; 
    overflow-x: hidden;
    position: relative;
    z-index: 1;
}

/* ===== 背景画布 ===== */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: 
        radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(15, 23, 42, 0.5) 0%, #05070e 100%);
}

/* ===== 外层包裹 ===== */
.page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 140px;
    position: relative;
    z-index: 10;
    flex: 1;
}

/* ===== 顶部放大区域 ===== */
.top-section {
    width: 100%;
    max-width: 780px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    zoom: 1.2; 
}

/* ===== 标题 ===== */
.header {
    text-align: center;
    margin-bottom: 28px;
    animation: fadeInDown 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    z-index: 10;
}
.header h1 a {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    display: inline-block;
}
.header h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: 2px;
    margin-bottom: 12px;
    background: linear-gradient(90deg, #38bdf8, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.header p {
    font-size: 14px;
    color: #94a3b8;
    font-weight: 400;
}

.help-link {
    color: #38bdf8;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    border-bottom: 1px dashed #38bdf8;
    transition: all 0.2s;
    margin-left: 4px;
}
.help-link:hover {
    color: #7dd3fc;
    border-bottom-style: solid;
}

/* ===== 主操作卡片 ===== */
.glass-card {
    width: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 20px -15px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
    position: relative;
    z-index: 10;
}

/* ===== 线路选择 ===== */
.line-selector-wrapper {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.line-selector-wrapper span {
    font-size: 14px;
    color: #94a3b8;
    white-space: nowrap;
}
.custom-select {
    flex: 1;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    transition: all 0.3s;
}
.custom-select:focus {
    border-color: #38bdf8;
}
.custom-select option {
    background-color: #0f172a;
    color: #e2e8f0;
}

/* ===== 输入区域 ===== */
.input-group {
    display: flex;
    gap: 12px;
    position: relative;
    margin-bottom: 0px;
}
.input-box {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0 16px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.input-box:hover {
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.15), inset 0 0 10px rgba(56, 189, 248, 0.05);
}
.input-box:focus-within {
    border-color: #38bdf8;
    box-shadow: 0 0 25px rgba(56, 189, 248, 0.3), inset 0 0 15px rgba(56, 189, 248, 0.1);
    background: rgba(0, 0, 0, 0.4);
}
.input-box input {
    width: 100%;
    height: 56px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 15px;
    outline: none;
}
.input-box input::placeholder {
    color: #64748b;
    transition: color 0.3s;
}
.input-box:focus-within input::placeholder {
    color: #94a3b8;
}

/* ===== 主按钮 ===== */
.submit-btn {
    height: 56px;
    padding: 0 32px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.85) 0%, rgba(168, 85, 247, 0.85) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3); 
    border-radius: 16px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 20px -5px rgba(56, 189, 248, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}
.submit-btn:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(56, 189, 248, 1) 0%, rgba(168, 85, 247, 1) 100%);
    box-shadow: 0 15px 25px -5px rgba(56, 189, 248, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}
.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ===== 播放器容器 ===== */
.video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.8);
    display: none;
    margin-bottom: 20px;
}
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== 快速通道按钮组 ===== */
.quick-links-wrapper {
    width: 100%;
    max-width: 780px;
    margin-top: 40px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
    position: relative;
    z-index: 10;
}
.quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    background: rgba(255, 255, 255, 0.04); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.12); 
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.quick-btn:hover {
    background: rgba(56, 189, 248, 0.15);
    color: #fff;
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(56, 189, 248, 0.2);
}

/* ===== 底部版权 ===== */
.footer-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none; 
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
    margin-top: 30px;
    margin-bottom: 40px;
    position: relative;
}
.footer {
    font-size: 13px;
    color: #64748b;
    white-space: nowrap;
    pointer-events: auto;
    text-align: center;
}
.footer span.highlight a {
    color: #a855f7;
    text-decoration: none;
    transition: color 0.2s;
}
.footer span.highlight a:hover {
    color: #c084fc;
    text-decoration: underline;
}

/* ===== 弹窗 ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(5, 7, 14, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    padding: 25px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.modal-header-left {
    display: flex;
    align-items: center;
}
.modal-title-text {
    font-size: 18px;
    font-weight: bold;
    color: #94a3b8; 
    cursor: pointer;
    transition: all 0.3s ease;
}
.modal-title-text.active {
    color: #38bdf8; 
}
#tabDisclaimer {
    margin-left: 60px; 
}
.close-btn {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 24px;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    padding: 0 8px;
}
.close-btn:hover {
    color: #fff;
}

.modal-body {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.8;
    max-height: 60vh;
    overflow-y: auto;
}
.modal-body p {
    margin-bottom: 12px;
    display: flex;
}
.modal-body p:last-child {
    margin-bottom: 0;
}
.modal-body::-webkit-scrollbar {
    width: 6px;
}
.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* ===== 动画 ===== */
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .page-wrapper { margin-top: 60px; } 
    .top-section { zoom: 1; }
    .input-group { flex-direction: column; }
    .submit-btn { width: 100%; }
    .glass-card { padding: 20px; }
    .quick-links-wrapper { grid-template-columns: repeat(2, 1fr); }
    .modal-content { padding: 20px; }
    .footer-wrapper { margin-bottom: 20px; }
    .footer { font-size: 12px; }
    #tabDisclaimer { margin-left: 25px; }
}

@media (max-width: 480px) {
    .header h1 { font-size: 26px; }
    .glass-card { padding: 16px; }
    .quick-links-wrapper { gap: 8px; }
    .quick-btn { font-size: 12px; height: 38px; }
}