@charset "UTF-8";
/* ============================================================
   style.css - 橙子CMS 前台通用样式（右侧滑出汉堡菜单版）
   ============================================================ */

/* ===== 基础重置 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #1a73e8;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ============================================================
   顶部导航
   ============================================================ */
header {
    background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
    color: white;
    padding: 10px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 92%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.site-logo {
    flex-shrink: 0;
}
.site-logo h1 {
    font-size: 22px;
    margin: 0;
}
.site-logo h1 a {
    color: white;
    text-decoration: none;
}
.site-logo img {
    max-height: 45px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 26px;
    cursor: pointer;
    padding: 4px 10px;
    border-radius: 4px;
    transition: background 0.3s;
    line-height: 1;
}
.menu-toggle:hover {
    background: rgba(255,255,255,0.15);
}

.nav-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

/* ===== 桌面端：隐藏关闭按钮 ===== */
.nav-wrapper .menu-close {
    display: none !important;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
}
.main-nav ul li a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    padding: 5px 12px;
    border-radius: 6px;
    transition: background 0.3s;
    font-size: 14px;
    display: block;
}
.main-nav ul li a:hover {
    background: rgba(255,255,255,0.15);
    text-decoration: none;
}

.main-nav .dropdown {
    position: relative;
}
.main-nav .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 150px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 6px 0;
    list-style: none;
    z-index: 200;
}
.main-nav .dropdown-menu li a {
    color: #333;
    padding: 6px 18px;
}
.main-nav .dropdown-menu li a:hover {
    background: #f0f0f0;
}
.main-nav .dropdown:hover .dropdown-menu {
    display: block;
}

.search-box {
    margin-left: auto;
}
.search-box form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.2);
    border-radius: 20px;
    padding: 3px 10px;
}
.search-box input {
    background: transparent;
    border: none;
    padding: 5px 8px;
    color: white;
    outline: none;
    font-size: 14px;
    min-width: 100px;
}
.search-box input::placeholder {
    color: rgba(255,255,255,0.7);
}
.search-box button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 15px;
    padding: 3px 5px;
}

/* ============================================================
   主容器
   ============================================================ */
main {
    flex: 1;
    max-width: 92%;
    margin: 16px auto;
    padding: 0 10px;
    width: 100%;
}

.container {
    background: white;
    border-radius: 12px;
    padding: 16px 18px 20px 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 14px;
    border: 1px solid #e9ecef;
}
.container:last-child {
    margin-bottom: 0;
}

/* ============================================================
   通用区块样式
   ============================================================ */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}
.section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0;
}
.more-link {
    font-size: 14px;
    color: #1a73e8;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
    background: #1a1a2e;
    color: rgba(255,255,255,0.6);
    padding: 16px 0;
    margin-top: 16px;
    text-align: center;
}
.footer-container {
    max-width: 92%;
    margin: 0 auto;
    padding: 0 15px;
}
.footer-container p {
    margin: 0;
    font-size: 14px;
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
    display: inline-block;
    padding: 9px 22px;
    background: #1a73e8;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s;
}
.btn:hover {
    background: #1557b0;
    text-decoration: none;
}
.btn-primary {
    background: #1a73e8;
}
.btn-primary:hover {
    background: #1557b0;
}
.btn-secondary {
    background: #6c757d;
}
.btn-secondary:hover {
    background: #5a6268;
}
.btn-danger {
    background: #dc3545;
}
.btn-danger:hover {
    background: #c82333;
}
.btn-success {
    background: #28a745;
}
.btn-success:hover {
    background: #1e7e34;
}
.btn-sm {
    padding: 4px 12px;
    font-size: 13px;
}

/* ============================================================
   提示
   ============================================================ */
.alert {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 14px;
}
.alert-error {
    background: #fde8e8;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

.no-data {
    color: #999;
    font-size: 14px;
    padding: 30px 0;
    text-align: center;
}
.no-data .icon {
    font-size: 40px;
    margin-bottom: 8px;
}

/* ============================================================
   登录/注册/个人中心
   ============================================================ */
.auth-form {
    max-width: 400px;
    margin: 30px auto;
    padding: 28px 26px 32px 26px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.auth-form h2 {
    text-align: center;
    margin-bottom: 18px;
    font-size: 22px;
}
.auth-form .form-group {
    margin-bottom: 14px;
}
.auth-form label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
    color: #555;
}
.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="email"] {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}
.auth-form input:focus {
    border-color: #1a73e8;
    outline: none;
}
.auth-form .btn {
    width: 100%;
    padding: 11px;
    font-size: 16px;
}
.auth-form .links {
    text-align: center;
    margin-top: 14px;
    font-size: 14px;
}

.profile {
    max-width: 600px;
    margin: 30px auto;
}
.profile-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
}
.profile-tabs .tab-btn {
    padding: 8px 18px;
    background: #f0f0f0;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}
.profile-tabs .tab-btn:hover {
    background: #e0e0e0;
}
.profile-tabs .tab-btn.active {
    background: #1a73e8;
    color: white;
}
.tab-content {
    background: #f8f9fa;
    padding: 18px 20px;
    border-radius: 8px;
}
.tab-content .form-group {
    margin-bottom: 12px;
}
.tab-content label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}
.tab-content input[type="text"],
.tab-content input[type="email"],
.tab-content input[type="password"] {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
}
.tab-content input:focus {
    border-color: #1a73e8;
    outline: none;
}
.tab-content input[disabled] {
    background: #f0f0f0;
    cursor: not-allowed;
}

.password-form {
    max-width: 400px;
    margin: 30px auto;
    padding: 30px 26px 34px 26px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    text-align: center;
}
.password-icon {
    font-size: 44px;
    margin-bottom: 8px;
}
.password-form h2 {
    font-size: 22px;
    color: #333;
    margin-bottom: 6px;
}
.password-form p {
    color: #666;
    font-size: 15px;
    margin-bottom: 18px;
}
.password-form-input .form-group {
    margin-bottom: 14px;
}
.password-form-input input[type="password"] {
    width: 100%;
    padding: 10px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    transition: border-color 0.3s;
}
.password-form-input input[type="password"]:focus {
    border-color: #1a73e8;
    outline: none;
}
.password-form .form-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}
.password-form .form-actions .btn {
    width: 100%;
    max-width: 100%;
    padding: 10px 20px;
    font-size: 15px;
}

/* ============================================================
   灯箱
   ============================================================ */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.lightbox-content {
    max-width: 98vw;
    max-height: 90vh;
    object-fit: contain;
}
.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 36px;
    cursor: pointer;
    z-index: 10000;
}

/* ============================================================
   单页详情页
   ============================================================ */
.page-detail-container {
    padding: 20px 24px 28px 24px;
}

.page-header-center {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f2f5;
}
.page-title-center {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a2e;
    line-height: 1.3;
    margin: 0 0 12px 0;
}
.page-meta-center {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px 20px;
    font-size: 14px;
    color: #8c8f9c;
}
.page-meta-center .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.page-body-center {
    margin-bottom: 28px;
}
.page-content-center {
    font-size: 16px;
    line-height: 1.9;
    color: #2d2d3f;
}
.page-content-center p {
    margin-bottom: 14px;
}

.page-comment-section {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #f0f2f5;
}
.page-comment-section .comment-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 16px 0;
}

.comment-form-wrapper {
    background: #f8f9fc;
    border-radius: 12px;
    padding: 18px 22px;
    margin-bottom: 24px;
}
.comment-form-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.comment-user-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #667eea;
    color: white;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50%;
    text-transform: uppercase;
    flex-shrink: 0;
}
.comment-user-name {
    font-weight: 500;
    font-size: 14px;
    color: #1a1a2e;
}
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e4e7ed;
    border-radius: 8px;
    font-size: 14px;
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.3s;
    background: white;
    color: #333;
}
.comment-form textarea:focus {
    border-color: #667eea;
    outline: none;
}
.comment-form .btn {
    margin-top: 10px;
}

.comment-login-tip {
    text-align: center;
    padding: 18px;
    color: #8c8f9c;
    font-size: 14px;
}
.comment-login-tip a {
    color: #667eea;
    font-weight: 500;
}
.comment-login-tip a:hover {
    text-decoration: underline;
}

.comment-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.comment-item {
    display: flex;
    gap: 14px;
    padding: 14px 18px;
    background: #f8f9fc;
    border-radius: 10px;
}
.comment-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #667eea;
    color: white;
    font-size: 15px;
    font-weight: 600;
    border-radius: 50%;
    text-transform: uppercase;
    flex-shrink: 0;
}
.comment-body {
    flex: 1;
    min-width: 0;
}
.comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.comment-author strong {
    font-size: 14px;
    color: #1a1a2e;
}
.comment-time {
    font-size: 12px;
    color: #b0b4c0;
}
.comment-content {
    font-size: 14px;
    color: #3d3d4f;
    line-height: 1.7;
    word-wrap: break-word;
}

/* ============================================================
   响应式 - 移动端 (768px 以下)
   ============================================================ */
@media (max-width: 1024px) {
    .header-container {
        max-width: 96%;
    }
}

@media (max-width: 768px) {
    /* 导航栏 */
    .header-container {
        flex-wrap: wrap;
    }
    .header-left {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        gap: 0;
    }
    .site-logo h1 {
        font-size: 18px;
    }
    .menu-toggle {
        display: block !important;
        background: none;
        border: none;
        color: white;
        font-size: 28px;
        cursor: pointer;
        padding: 4px 12px;
        border-radius: 4px;
        transition: background 0.3s;
        line-height: 1;
        z-index: 1001;
        position: relative;
    }
    .menu-toggle:hover {
        background: rgba(255,255,255,0.15);
    }
    .menu-toggle.active {
        color: #fff;
    }

    /* 菜单浮层：从右侧滑出 */
    .nav-wrapper {
        display: block !important;
        position: fixed;
        top: 0;
        right: -300px;
        width: 280px;
        max-width: 80vw;
        height: 100vh;
        background: #ffffff;
        padding: 60px 20px 30px 20px;
        overflow-y: auto;
        z-index: 1000;
        transition: right 0.3s ease;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        border-left: 1px solid rgba(0, 0, 0, 0.05);
        flex-direction: column;
    }
    .nav-wrapper.open {
        right: 0;
    }

    /* 关闭按钮（仅在移动端显示） */
    .nav-wrapper .menu-close {
        display: block !important;
        position: absolute;
        top: 12px;
        right: 16px;
        font-size: 28px;
        color: #666;
        background: none;
        border: none;
        cursor: pointer;
        padding: 4px 8px;
        transition: color 0.3s;
        z-index: 1002;
    }
    .nav-wrapper .menu-close:hover {
        color: #000;
    }

    /* 导航菜单内部 */
    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin-top: 10px;
        padding: 0;
    }
    .main-nav ul li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        margin: 0;
        padding: 0;
    }
    .main-nav ul li a {
        padding: 12px 16px;
        text-align: left;
        font-size: 15px;
        color: #333 !important;
        border-radius: 0;
        transition: background 0.3s;
    }
    .main-nav ul li a:hover {
        background: rgba(0, 0, 0, 0.05);
        color: #000 !important;
        text-decoration: none;
    }

    /* 下拉菜单：默认展开 */
    .main-nav .dropdown-menu {
        position: static;
        background: rgba(0, 0, 0, 0.03);
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        margin: 0;
        display: block !important;
        width: 100%;
    }
    .main-nav .dropdown-menu li {
        border-bottom: none;
    }
    .main-nav .dropdown-menu li a {
        padding: 8px 16px 8px 32px;
        font-size: 14px;
        color: #555 !important;
    }
    .main-nav .dropdown-menu li a:hover {
        background: rgba(0, 0, 0, 0.03);
        color: #000 !important;
    }

    /* 搜索框 */
    .search-box {
        margin-left: 0;
        width: 100%;
        margin-top: 16px;
    }
    .search-box form {
        max-width: 100%;
        background: #f0f2f5;
        border-radius: 8px;
        padding: 4px 12px;
    }
    .search-box input {
        font-size: 14px;
        padding: 8px 6px;
        width: 100%;
        color: #333;
    }
    .search-box input::placeholder {
        color: #999;
    }
    .search-box button {
        color: #666;
        font-size: 16px;
        padding: 6px 8px;
    }

    /* 主内容 */
    main {
        max-width: 98%;
        margin: 10px auto;
        padding: 0 6px;
    }
    .container {
        padding: 12px 12px 16px 12px;
        margin-bottom: 10px;
        border-radius: 8px;
    }
    .section-title {
        font-size: 16px;
    }

    /* 单页 */
    .page-detail-container {
        padding: 14px 16px 20px 16px;
    }
    .page-title-center {
        font-size: 22px;
    }
    .page-meta-center {
        font-size: 13px;
        gap: 10px 14px;
    }
    .page-content-center {
        font-size: 15px;
    }
    .comment-form-wrapper {
        padding: 14px 16px;
    }
    .comment-item {
        padding: 12px 14px;
        gap: 12px;
    }

    /* 登录/注册 */
    .auth-form {
        padding: 22px 18px 26px 18px;
        margin: 20px 10px;
    }
    .password-form {
        padding: 24px 18px 28px 18px;
        margin: 20px 10px;
    }

    /* 页脚 */
    .site-footer {
        padding: 12px 0;
    }
    .footer-container p {
        font-size: 12px;
    }
}

/* ============================================================
   响应式 - 小屏手机 (480px 以下)
   ============================================================ */
@media (max-width: 480px) {
    .site-logo h1 {
        font-size: 16px;
    }
    .menu-toggle {
        font-size: 24px;
        padding: 4px 10px;
    }
    .nav-wrapper {
        width: 260px;
        max-width: 80vw;
        padding: 50px 16px 20px 16px;
    }
    .main-nav ul li a {
        font-size: 14px;
        padding: 10px 14px;
    }
    .main-nav .dropdown-menu li a {
        font-size: 13px;
        padding: 6px 14px 6px 28px;
    }

    main {
        max-width: 100%;
        margin: 6px auto;
        padding: 0 4px;
    }
    .container {
        padding: 10px 8px 14px 8px;
        border-radius: 6px;
        margin-bottom: 8px;
    }
    .section-title {
        font-size: 15px;
    }

    .btn {
        font-size: 14px;
        padding: 8px 18px;
    }
    .btn-sm {
        font-size: 12px;
        padding: 3px 10px;
    }

    .auth-form {
        padding: 18px 14px 22px 14px;
        margin: 10px 8px;
    }
    .auth-form h2 {
        font-size: 20px;
    }

    .profile {
        margin: 20px 8px;
    }
    .profile-tabs {
        flex-wrap: wrap;
        gap: 6px;
    }
    .profile-tabs .tab-btn {
        font-size: 13px;
        padding: 6px 14px;
        flex: 1;
        min-width: 80px;
        text-align: center;
    }
    .tab-content {
        padding: 14px 14px;
    }

    .password-form {
        padding: 20px 14px 24px 14px;
        margin: 14px 8px;
    }
    .password-form h2 {
        font-size: 20px;
    }
    .password-icon {
        font-size: 36px;
    }

    .page-detail-container {
        padding: 10px 10px 16px 10px;
    }
    .page-title-center {
        font-size: 19px;
    }
    .page-meta-center {
        font-size: 12px;
        flex-direction: column;
        gap: 6px;
        align-items: center;
    }
    .page-content-center {
        font-size: 14px;
    }
    .comment-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .comment-avatar {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
    .comment-form .btn {
        width: 100%;
        text-align: center;
    }

    .footer-container p {
        font-size: 12px;
    }
    .no-data .icon {
        font-size: 32px;
    }
}