* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, "Microsoft YaHei", sans-serif;
    background: #f5f7fb;
    color: #222;
}
a { color: #1d4ed8; text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header {
    background: #ffffff;
    color: #0f172a;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #e5e7eb;
}

.header-banner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 10px 14px 0 14px;
}
.header-banner img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    display: block;
}
@media (max-width: 980px) {
    .header-banner img { height: 86px; }
}

.top-nav-wrap {
    max-width: 1100px;
    margin: 0 auto;
    height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
}
.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.logo-img {
    height: 34px;
    width: auto;
    display: block;
}
.main-nav {
    display: flex;
    gap: 16px;
}
.main-nav a {
    color: #334155;
    font-size: 15px;
}
.main-nav a.active,
.main-nav a:hover {
    color: #0f172a;
}
.user-area {
    color: #334155;
    font-size: 14px;
}
.user-area a { color: #1d4ed8; }
.user-center-link {
    color: #0f172a;
    font-weight: 700;
    text-decoration: none;
}
.user-center-link:hover { text-decoration: underline; }

.notify-wrap {
    position: relative;
    margin-right: 10px;
    vertical-align: middle;
}
.notify-bell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    cursor: pointer;
}
.notify-icon { font-size: 16px; line-height: 1; }
.notify-dot {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #ef4444;
    border: 2px solid #fff;
}
.notify-dropdown {
    position: absolute;
    right: 0;
    top: 42px;
    width: 320px;
    max-width: calc(100vw - 28px);
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
    padding: 12px;
    display: none;
    z-index: 200;
}
.notify-wrap:hover .notify-dropdown,
.notify-dropdown:hover { display: block; }
.notify-wrap { padding-bottom: 6px; }
.notify-dropdown { margin-top: -4px; }
.notify-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.notify-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 320px;
    overflow: auto;
}
.notify-item {
    display: block;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px;
    text-decoration: none;
    color: #0f172a;
    background: #fff;
}
.notify-item.unread {
    border-color: #93c5fd;
    background: #eff6ff;
}
.notify-title { font-weight: 800; font-size: 13px; line-height: 1.35; }
.notify-meta { margin-top: 6px; font-size: 12px; color: #64748b; }

.post-divider {
    margin-top: 16px;
    margin-bottom: 6px;
    padding-top: 14px;
    border-top: 2px solid #e5e7eb;
    position: relative;
}
.post-divider span {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    border: 1px solid #e5e7eb;
    color: #0f172a;
    font-weight: 900;
    font-size: 12px;
}

.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 14px;
    min-height: calc(100vh - 220px);
}
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.08);
    padding: 18px;
}
.card h1 {
    margin-top: 0;
    font-size: 24px;
}

.auth-box {
    max-width: 1100px;
    margin: 20px auto;
}
.auth-inner {
    max-width: 420px;
    margin: 0 auto;
}
.auth-tabs {
    display: flex;
    gap: 8px;
    margin: 18px 0 16px;
}
.auth-tab {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    color: #475569;
    font-size: 14px;
    cursor: pointer;
}
.auth-tab.active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #1d4ed8;
    font-weight: 600;
}
.auth-panel.hidden {
    display: none;
}
.hidden {
    display: none !important;
}
.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.captcha-row input {
    flex: 0 0 120px;
    max-width: 140px;
}
.captcha-img {
    height: 44px;
    width: auto;
    cursor: pointer;
    border-radius: 8px;
    border: 1px solid #cbd5e1;
    vertical-align: middle;
}
.sms-send-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.sms-cooldown {
    font-size: 13px;
    color: #64748b;
}
.btn-secondary {
    background: #64748b;
}
.btn-secondary:hover {
    background: #475569;
}
.form-row {
    margin-bottom: 14px;
}
.form-row label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}
.form-row input {
    width: 100%;
    height: 40px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 0 10px;
    font-size: 14px;
}
.btn {
    display: inline-block;
    border: 0;
    border-radius: 8px;
    padding: 10px 16px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}
.btn:disabled {
    opacity: .6;
    cursor: not-allowed;
}
.tips {
    font-size: 13px;
    color: #64748b;
}
.msg {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    display: none;
}
.msg.success {
    display: block;
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
}
.msg.error {
    display: block;
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.site-footer {
    background: #0b1220;
    color: #94a3b8;
    margin-top: 30px;
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 18px 14px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.friend-links a {
    color: #cbd5e1;
    margin-right: 12px;
}

.home-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.section-title {
    margin: 0 0 12px 0;
    font-size: 18px;
}

.news-item {
    padding: 12px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    min-height: 76px;
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 16px;
    line-height: 1.35;
}

.course-card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    overflow: hidden;
}
.course-card .cover {
    width: 100%;
    height: 126px;
    object-fit: cover;
    background: #f1f5f9;
}
.course-card .body {
    padding: 12px;
}
.course-card .course-title {
    font-weight: 800;
    font-size: 15px;
    margin-bottom: 6px;
    line-height: 1.3;
}
.course-card .course-desc {
    color: #64748b;
    font-size: 13px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tool-card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 86px;
}
.tool-card img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}
.tool-card .tool-name {
    font-weight: 800;
    font-size: 15px;
}

.forum-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.forum-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
}
.forum-row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
}
.forum-row .left {
    min-width: 0;
    flex: 1;
}
.forum-row .title {
    font-weight: 800;
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.forum-row .meta {
    margin-top: 6px;
    font-size: 12px;
    color: #64748b;
}
.forum-row .count {
    white-space: nowrap;
    font-size: 12px;
    color: #64748b;
    align-self: center;
}

@media (max-width: 980px) {
    .grid-3 { grid-template-columns: 1fr; }
    .container { margin: 10px auto; }
}

.pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.page-btn {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
}
.page-btn.active {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.muted { color: #64748b; }
.right { float: right; }

.form-area {
    max-width: 1100px;
    margin: 0 auto;
}

.textarea {
    width: 100%;
    min-height: 140px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px;
    font-size: 14px;
    resize: vertical;
}
.textarea[contenteditable="true"] {
    background: #fff;
    outline: none;
}
.textarea[contenteditable="true"]:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 16px;
    align-items: start;
}
.side-card {
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 14px;
}
@media (max-width: 980px) {
    .two-col { grid-template-columns: 1fr; }
}

.list-item-title {
    font-weight: 900;
    font-size: 16px;
    margin-bottom: 6px;
    line-height: 1.35;
}

.news-small {
    font-size: 12px;
    color: #64748b;
    margin-bottom: 10px;
}

.lock-badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 12px;
    font-weight: 700;
}

.comment-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    padding: 12px;
}
.comment-meta {
    font-size: 12px;
    color: #64748b;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}
.comment-content {
    margin-top: 8px;
    white-space: pre-wrap;
    line-height: 1.65;
    font-size: 14px;
}
.btn-secondary {
    display: inline-block;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    font-size: 13px;
}
.btn-secondary:disabled { opacity: .6; cursor: not-allowed; }

.comment-actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.indent-1 { margin-left: 18px; }

.player-wrap {
    width: 100%;
    background: #0b1220;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #111827;
}
.player-video {
    width: 100%;
    height: 420px;
    display: block;
    background: #0b1220;
}
@media (max-width: 980px) {
    .player-video { height: 240px; }
}

.episode-grid {
    display: grid;
    grid-template-columns: repeat(10, minmax(0, 1fr));
    gap: 10px;
}
@media (max-width: 980px) {
    .episode-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.episode-tile {
    border: 1px solid #e5e7eb;
    background: #fff;
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    user-select: none;
    font-weight: 800;
    font-size: 13px;
    position: relative;
}
.episode-tile:hover { border-color: #cbd5e1; }
.episode-tile.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}
.episode-tile.locked {
    background: #f8fafc;
    color: #64748b;
}
.episode-tile.locked::after {
    content: "VIP";
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #fff2f0;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-weight: 900;
}
