/* ==================== Base ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
                 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f6fa;
    -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ==================== Splash Header ==================== */
.splash-header {
    position: relative;
    background: linear-gradient(135deg, #0f1a3a 0%, #1a2a5e 40%, #1e3a6e 100%);
    color: #fff;
    overflow: hidden;
}
.splash-header__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: .15;
}
.splash-header__inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
    padding: 32px 20px;
}
.splash-header__cover {
    flex: 0 0 160px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.3);
}
.splash-header__cover img {
    width: 100%;
    aspect-ratio: 3/4;
    object-fit: cover;
    background: rgba(255,255,255,.08);
}
.splash-header__cover img[src=""] { display: none; }
.splash-header__cover:has(img[src=""]) { display: none; }
.splash-header__main { flex: 1; min-width: 0; }

.live-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,.15);
    font-size: 12px;
    margin-bottom: 10px;
}
.live-tag__bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
}
.live-tag__bars span {
    width: 3px;
    background: #4f8cff;
    border-radius: 2px;
    animation: barPulse 1.2s ease-in-out infinite;
}
.live-tag__bars span:nth-child(1) { height: 8px; animation-delay: 0s; }
.live-tag__bars span:nth-child(2) { height: 12px; animation-delay: .1s; }
.live-tag__bars span:nth-child(3) { height: 6px; animation-delay: .2s; }
.live-tag__bars span:nth-child(4) { height: 10px; animation-delay: .3s; }
.live-tag__bars span:nth-child(5) { height: 7px; animation-delay: .4s; }
@keyframes barPulse {
    0%, 100% { opacity: .5; }
    50% { opacity: 1; }
}

.splash-header__title {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 10px;
    word-break: break-word;
}
.splash-header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 14px;
    opacity: .9;
    margin-bottom: 18px;
}
.splash-header__meta .icon { font-size: 14px; }

/* ==================== Buttons ==================== */
.btn-primary {
    display: inline-block;
    padding: 10px 32px;
    border: none;
    border-radius: 24px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
}
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(37, 99, 235, .35);
}
.btn-primary:active { transform: translateY(0); }
.btn-full { width: 100%; }

.btn-upload {
    padding: 8px 18px;
    border: 1px solid #3b82f6;
    border-radius: 18px;
    background: #fff;
    color: #3b82f6;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.btn-upload:hover { background: #3b82f6; color: #fff; }

.btn-remove {
    padding: 8px 18px;
    border: 1px solid #e5e5e5;
    border-radius: 18px;
    background: #fff;
    color: #e53e3e;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
}
.btn-remove:hover { background: #ffeaea; }

/* ==================== Post Signup ==================== */
.post-signup-msg {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    background: rgba(255,255,255,.15);
    font-size: 14px;
}

/* ==================== Main Content ==================== */
.main-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}
.content-block {
    margin: 28px 0;
    padding: 24px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.content-block__title {
    font-size: 20px;
    font-weight: 700;
    color: #1a2a5e;
    padding-bottom: 10px;
    margin-bottom: 18px;
    border-bottom: 3px solid #3b82f6;
}

/* ==================== Video Player ==================== */
.video-section { margin-top: 8px; }
.video-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    border: 2px dashed #d0d6e0;
    border-radius: 12px;
    background: #f8f9fc;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.video-player:hover {
    border-color: #3b82f6;
    background: #eef4ff;
}
.video-player__icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 3px 12px rgba(37, 99, 235, .3);
}
.video-player__text { font-size: 16px; color: #555; }
.video-player__meeting-id {
    font-size: 13px;
    color: #888;
    padding: 4px 12px;
    border-radius: 10px;
    background: #eee;
}

/* ==================== Embed Code / Live Link Area ==================== */
.embed-code-area {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fafbfd;
}
.embed-code-area__header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}
.embed-code-area__hint { font-size: 12px; font-weight: 400; color: #9ca3af; }
.embed-code-area__actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.embed-code-input,
.live-link-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color .15s;
}
.embed-code-input:focus,
.live-link-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .1);
}

/* ==================== Schedule ==================== */
.schedule-image-area {
    margin-bottom: 16px;
    border-radius: 10px;
    overflow: hidden;
}
.schedule-image-area img { width: 100%; }
.schedule-controls { display: flex; gap: 8px; margin-bottom: 12px; }
.table-wrap { overflow-x: auto; margin-top: 12px; }
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.schedule-table th {
    padding: 10px 8px;
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid #e2e8f0;
}
.schedule-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}
.schedule-table tbody tr:hover { background: #f8fafc; }

/* ==================== Footer ==================== */
.page-footer {
    text-align: center;
    padding: 24px 20px;
    font-size: 13px;
    color: #94a3b8;
    max-width: 900px;
    margin: 0 auto;
}

/* ==================== Modals ==================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .5);
    padding: 20px;
}
.modal-overlay.show { display: flex; }
.modal-box {
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px 24px;
    box-shadow: 0 10px 40px rgba(0,0,0,.16);
    position: relative;
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: none;
    background: none;
    font-size: 22px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}
.modal-close:hover { color: #333; }
.modal-box h3 { font-size: 20px; margin-bottom: 18px; color: #1a2a5e; }

/* ==================== Signup Modal ==================== */
.signup-modal .form-group {
    margin-bottom: 14px;
}
.form-group label,
.form-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 5px;
}
.form-group input,
.form-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    transition: border-color .15s;
}
.form-group input:focus,
.form-field input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .08);
}
.required { color: #e53e3e; }
.form-hint {
    font-size: 12px;
    color: #94a3b8;
    margin: 8px 0 16px;
}
.form-error {
    font-size: 13px;
    color: #e53e3e;
    margin-bottom: 12px;
}

/* ==================== Admin Login Modal ==================== */
.admin-login-modal .form-field { margin-bottom: 14px; }

/* ==================== Analytics Modal ==================== */
.analytics-modal {
    max-width: 580px;
}
.analytics-modal__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f1f5f9;
}
.analytics-modal__header p {
    font-size: 12px;
    color: #94a3b8;
    margin-top: 4px;
}
.analytics-refresh {
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    white-space: nowrap;
}
.analytics-refresh:hover { background: #f8fafc; }
.analytics-status {
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
    padding: 16px 0;
}
.analytics-content {}
.analytics-summary {
    display: flex;
    gap: 12px;
    margin-bottom: 18px;
}
.analytics-summary__item {
    flex: 1;
    padding: 14px;
    border-radius: 10px;
    background: #f8fafc;
    text-align: center;
}
.analytics-summary__item span {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    margin-bottom: 4px;
}
.analytics-summary__item strong {
    font-size: 24px;
    color: #1a2a5e;
}
.analytics-section { margin-bottom: 16px; }
.analytics-section h4 {
    font-size: 14px;
    color: #475569;
    margin-bottom: 10px;
}
.analytics-chart {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 120px;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
}
.analytics-chart__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.analytics-chart__bar {
    width: 100%;
    max-width: 20px;
    border-radius: 4px 4px 0 0;
    background: #3b82f6;
    min-height: 2px;
    transition: height .3s;
}
.analytics-chart__label {
    font-size: 10px;
    color: #94a3b8;
}
.analytics-visits {
    list-style: none;
    font-size: 13px;
    color: #555;
    max-height: 180px;
    overflow-y: auto;
}
.analytics-visits li {
    padding: 6px 0;
    border-bottom: 1px solid #f8fafc;
}

/* ==================== Signup Data Modal ==================== */
.signup-data-modal {
    max-width: 640px;
}
.signup-data-status {
    text-align: center;
    font-size: 13px;
    color: #94a3b8;
    padding: 12px 0;
}
.signup-data-wrap {
    max-height: 50vh;
    overflow-y: auto;
}

/* ==================== Analytics Bar Rows ==================== */
.analytics-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 13px;
}
.analytics-bar-label {
    flex: 0 0 64px;
    color: #555;
    text-align: right;
}
.analytics-bar-track {
    flex: 1;
    height: 18px;
    border-radius: 9px;
    background: #f1f5f9;
    overflow: hidden;
}
.analytics-bar-fill {
    display: block;
    height: 100%;
    border-radius: 9px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    min-width: 4px;
    transition: width .4s ease;
}
.analytics-bar-num {
    flex: 0 0 80px;
    font-size: 12px;
    color: #94a3b8;
}

/* ==================== Admin Editable ==================== */
.admin-editable {
    outline-offset: 3px;
    border-radius: 4px;
    cursor: text;
}
.admin-editable:focus {
    outline: 2px dashed #3b82f6;
    background: rgba(59, 130, 246, .04);
}
.admin-editable.editing {
    outline: 2px solid #3b82f6;
    background: #fff;
}

/* ==================== Widget Buttons ==================== */
.fixed-widgets {
    position: fixed;
    right: 12px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 1000;
}
.widget-btn {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 16px;
    border: 1px solid #d0d0d0;
    background: #fff;
    color: #555;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 1px 6px rgba(0, 0, 0, .08);
    transition: border-color .15s, color .15s;
    text-align: center;
}
.widget-btn:hover {
    border-color: #aaa;
    color: #333;
}
.widget-btn.admin-btn {
    border-color: #2b6ef0;
    color: #2b6ef0;
    font-weight: 600;
}
.widget-btn.admin-btn:hover {
    background: #2b6ef0;
    color: #fff;
}
.widget-btn.admin-active {
    background: #eef3ff;
    border-color: #1a5cde;
    color: #1a5cde;
}
.widget-btn.admin-active:hover {
    background: #ff4444;
    border-color: #cc3333;
    color: #fff;
}

/* ==================== Utility ==================== */
.hidden { display: none !important; }

/* ==================== Mobile ==================== */
@media (max-width: 768px) {
    .splash-header__inner {
        flex-direction: column;
        text-align: center;
        padding: 24px 16px;
        gap: 16px;
    }
    .splash-header__cover { flex: 0 0 120px; width: 120px; }
    .splash-header__title { font-size: 20px; }
    .splash-header__meta { justify-content: center; font-size: 13px; }
    .main-content { padding: 0 12px; }
    .content-block { padding: 18px 14px; margin: 20px 0; border-radius: 10px; }
    .content-block__title { font-size: 18px; }
    .video-player { padding: 28px 16px; }
    .video-player__icon { width: 46px; height: 46px; font-size: 18px; }
    .video-player__text { font-size: 14px; }
    .fixed-widgets { right: 8px; bottom: 12px; gap: 4px; }
    .widget-btn { padding: 4px 10px; font-size: 11px; border-radius: 12px; }
    .modal-box { padding: 22px 18px; border-radius: 12px; }
    .analytics-summary { flex-direction: column; }
    .analytics-chart { height: 80px; }
}
