/* ===== naida 成长日记 · 全部样式 ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'ZCOOL KuaiLe', 'Comic Sans MS', cursive, sans-serif;
    background: #fdf2f8;
    color: #4a1942;
    line-height: 1.7;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== 导航栏 ===== */
.navbar {
    background: linear-gradient(135deg, #fbcfe8, #f3a8d4);
    padding: 14px 0;
    border-bottom: 4px solid #f472b6;
    box-shadow: 0 4px 15px rgba(244, 114, 182, 0.2);
    position: sticky;
    top: 0;
    z-index: 99;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #831843;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: #facc15;
    font-size: 2rem;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    font-size: 1.15rem;
    background: rgba(255, 255, 255, 0.3);
    padding: 6px 20px;
    border-radius: 50px;
    backdrop-filter: blur(4px);
}

.nav-links a {
    color: #831843;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 30px;
    transition: 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    background: #ffffff;
    color: #db2777;
    box-shadow: 0 2px 10px rgba(219, 39, 119, 0.15);
}

.menu-toggle {
    display: none;
    font-size: 1.8rem;
    color: #831843;
    cursor: pointer;
}

/* ===== 博主头部 ===== */
.blog-header {
    background: white;
    border-radius: 40px;
    padding: 30px;
    margin: 30px 0 25px;
    box-shadow: 0 8px 30px rgba(244, 114, 182, 0.15);
    border: 2px solid #f9a8d4;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 30px;
}

.avatar-box {
    display: flex;
    align-items: center;
    gap: 20px;
}

.avatar-box img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #fbcfe8;
    object-fit: cover;
}

.avatar-box .info h1 {
    font-size: 2rem;
    color: #831843;
}

.avatar-box .info .badge {
    background: #fef3c7;
    color: #b45309;
    padding: 2px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    border: 1px solid #fcd34d;
}

.blog-stats {
    display: flex;
    gap: 25px;
    margin-left: auto;
    flex-wrap: wrap;
}

.blog-stats .stat {
    text-align: center;
    background: #fdf2f8;
    padding: 6px 18px;
    border-radius: 40px;
    border: 1px solid #fbcfe8;
}

.blog-stats .stat .num {
    font-size: 1.5rem;
    font-weight: bold;
    color: #db2777;
}

.blog-stats .stat .label {
    font-size: 0.8rem;
    color: #9d174d;
}

/* ===== 主布局 ===== */
.blog-main {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.posts-area {
    flex: 2;
    min-width: 280px;
}

.sidebar {
    flex: 1;
    min-width: 220px;
}

/* ===== 文章卡片 ===== */
.post-card {
    background: #ffffff;
    border-radius: 30px;
    padding: 28px;
    margin-bottom: 28px;
    box-shadow: 0 4px 16px rgba(244, 114, 182, 0.08);
    border: 1px solid #fce7f3;
    transition: 0.25s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(244, 114, 182, 0.15);
    border-color: #f9a8d4;
}

.post-tag {
    display: inline-block;
    background: #fce7f3;
    color: #be185d;
    font-size: 0.7rem;
    padding: 2px 14px;
    border-radius: 30px;
    margin-bottom: 8px;
    font-weight: bold;
}

.post-card h2 {
    font-size: 1.6rem;
    color: #4c0519;
}

.post-card h2 a {
    text-decoration: none;
    color: inherit;
}

.post-card h2 a:hover {
    color: #db2777;
}

.post-meta {
    font-size: 0.9rem;
    color: #a21caf;
    margin: 8px 0 12px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.post-meta i {
    margin-right: 4px;
    color: #f472b6;
}

.post-content {
    color: #4a1942;
    font-size: 1.05rem;
    margin-bottom: 16px;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
    border-top: 1px dashed #fbcfe8;
    padding-top: 16px;
    margin-top: 6px;
}

.like-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #9d174d;
    padding: 4px 12px;
    border-radius: 30px;
    background: #fdf2f8;
    transition: 0.2s;
}

.like-btn:hover {
    background: #fce7f3;
    transform: scale(1.05);
}

.like-btn.liked {
    color: #e11d48;
}

.like-btn.liked i {
    animation: pop 0.3s ease;
}

@keyframes pop {
    0% { transform: scale(1); }
    50% { transform: scale(1.4); }
    100% { transform: scale(1); }
}

.comment-toggle {
    background: none;
    border: none;
    color: #7c3aed;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 30px;
    background: #f5f3ff;
    transition: 0.2s;
}

.comment-toggle:hover {
    background: #ede9fe;
}

/* ===== 评论区 ===== */
.comment-area {
    margin-top: 18px;
    background: #fdf2f8;
    padding: 18px 20px;
    border-radius: 24px;
    display: none;
    border: 1px solid #fbcfe8;
}

.comment-area.open {
    display: block;
}

.comment-area .comment-list {
    max-height: 120px;
    overflow-y: auto;
    margin-bottom: 14px;
}

.comment-area .comment-item {
    background: white;
    padding: 6px 14px;
    border-radius: 30px;
    margin-bottom: 6px;
    font-size: 0.9rem;
    border: 1px solid #fce7f3;
}

.comment-area .comment-item strong {
    color: #831843;
}

.comment-input-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.comment-input-group input {
    flex: 1;
    padding: 10px 16px;
    border-radius: 40px;
    border: 2px solid #f9a8d4;
    background: white;
    font-family: inherit;
    outline: none;
    min-width: 140px;
}

.comment-input-group input:focus {
    border-color: #ec4899;
    box-shadow: 0 0 0 4px #fce7f3;
}

.comment-input-group button {
    background: #ec4899;
    color: white;
    border: none;
    padding: 10px 22px;
    border-radius: 40px;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: 0.2s;
    box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
}

.comment-input-group button:hover {
    background: #db2777;
    transform: scale(1.02);
}

/* ===== 侧边栏 ===== */
.sidebar-card {
    background: #ffffff;
    border-radius: 30px;
    padding: 24px 22px;
    margin-bottom: 28px;
    border: 1px solid #fce7f3;
}

.sidebar-card h3 {
    color: #831843;
    font-size: 1.3rem;
    border-bottom: 3px dotted #fbcfe8;
    padding-bottom: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-card ul {
    list-style: none;
}

.sidebar-card ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-card ul li i {
    color: #f472b6;
    width: 20px;
}

.sidebar-card ul li a {
    text-decoration: none;
    color: #4a1942;
    transition: 0.2s;
}

.sidebar-card ul li a:hover {
    color: #db2777;
    padding-left: 4px;
}

.mood-tag {
    display: inline-block;
    background: #fef3c7;
    padding: 4px 16px;
    border-radius: 30px;
    font-size: 1.1rem;
    margin: 4px;
    border: 1px solid #fcd34d;
}

/* ===== 后台管理 ===== */
.admin-panel {
    background: white;
    border-radius: 30px;
    padding: 30px;
    border: 2px solid #f9a8d4;
}

.admin-panel h2 {
    color: #831843;
    margin-bottom: 20px;
}

.admin-panel table {
    width: 100%;
    border-collapse: collapse;
}

.admin-panel th,
.admin-panel td {
    padding: 12px;
    border-bottom: 1px solid #fce7f3;
    text-align: left;
}

.admin-panel th {
    background: #fdf2f8;
    color: #831843;
}

.admin-panel .btn {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    margin-right: 6px;
}

.btn-primary {
    background: #ec4899;
    color: white;
}

.btn-primary:hover {
    background: #db2777;
}

.btn-edit {
    background: #fcd34d;
    color: #78350f;
}

.btn-edit:hover {
    background: #fbbf24;
}

.btn-danger {
    background: #f87171;
    color: #7f1d1d;
}

.btn-danger:hover {
    background: #ef4444;
    color: white;
}

.btn-success {
    background: #34d399;
    color: #065f46;
}

.btn-success:hover {
    background: #10b981;
    color: white;
}

/* ===== 表单 ===== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: bold;
    color: #831843;
    margin-bottom: 4px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 30px;
    border: 2px solid #f9a8d4;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* ===== 登录框 ===== */
.login-box {
    max-width: 400px;
    margin: 40px auto;
    background: white;
    padding: 40px;
    border-radius: 40px;
    border: 2px solid #f9a8d4;
    text-align: center;
}

.login-box input {
    width: 100%;
    padding: 12px;
    border-radius: 40px;
    border: 2px solid #fbcfe8;
    margin-bottom: 16px;
    font-family: inherit;
}

.login-box button {
    background: #ec4899;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 40px;
    font-family: inherit;
    font-size: 1.2rem;
    cursor: pointer;
}

/* ===== 页脚 ===== */
.footer {
    background: linear-gradient(135deg, #831843, #4c0519);
    color: #fbcfe8;
    padding: 30px 0 20px;
    border-radius: 40px 40px 0 0;
    margin-top: 20px;
    text-align: center;
}

.footer .heart {
    color: #f43f5e;
}

/* ===== 响应式 ===== */
@media (max-width: 760px) {
    .nav-links {
        display: none;
        flex-direction: column;
        background: white;
        padding: 20px;
        border-radius: 30px;
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
        width: 100%;
        text-align: center;
        gap: 10px;
    }

    .nav-links.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .blog-header {
        flex-direction: column;
        text-align: center;
    }

    .blog-stats {
        margin-left: 0;
        justify-content: center;
    }

    .avatar-box {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .post-card h2 {
        font-size: 1.3rem;
    }
    .sidebar {
        min-width: 100%;
    }
}

/* ===== 管理后台样式 ===== */
.admin-body {
    background: #f5f5f5;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: linear-gradient(135deg, #831843, #4c0519);
    color: white;
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
}

.admin-user img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #fbcfe8;
}

.admin-user strong {
    font-size: 1.1rem;
}

.admin-user span {
    font-size: 0.85rem;
    opacity: 0.7;
}

.admin-menu {
    list-style: none;
}

.admin-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #fbcfe8;
    text-decoration: none;
    transition: 0.2s;
    border-left: 3px solid transparent;
}

.admin-menu li a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.admin-menu li a.active {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: #fbcfe8;
}

.admin-content {
    flex: 1;
    margin-left: 260px;
    padding: 30px;
    background: #f5f5f5;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.admin-header h1 {
    color: #831843;
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-header p {
    color: #666;
    font-size: 0.9rem;
}

.btn-sm {
    padding: 4px 12px;
    font-size: 0.85rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: 0.2s;
}

.data-table-wrapper {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #fce7f3;
}

.data-table th {
    background: #fdf2f8;
    color: #831843;
    font-weight: bold;
}

.data-table tbody tr:hover {
    background: #fdf2f8;
}

.empty-text {
    text-align: center;
    color: #999;
    padding: 40px;
}

.form-wrapper {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-hint {
    display: block;
    color: #999;
    font-size: 0.85rem;
    margin-top: 5px;
}

.required {
    color: #e11d48;
}

.alert {
    padding: 15px 20px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    color: #831843;
    margin-bottom: 5px;
}

.stat-info p {
    color: #999;
    font-size: 0.9rem;
}

.dashboard-panels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.panel {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.panel-header {
    background: #fdf2f8;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #fce7f3;
}

.panel-header h3 {
    color: #831843;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-body {
    padding: 20px;
}

.recent-list {
    list-style: none;
}

.recent-list li {
    padding: 12px 0;
    border-bottom: 1px solid #fce7f3;
}

.recent-list li:last-child {
    border-bottom: none;
}

.recent-item-title {
    margin-bottom: 5px;
}

.recent-item-title a {
    color: #831843;
    text-decoration: none;
}

.recent-item-title a:hover {
    color: #db2777;
}

.recent-item-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: #999;
}

.quick-actions {
    background: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.quick-actions h3 {
    color: #831843;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.status-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.status-tabs a {
    padding: 8px 20px;
    border-radius: 30px;
    background: white;
    color: #831843;
    text-decoration: none;
    transition: 0.2s;
}

.status-tabs a:hover {
    background: #fdf2f8;
}

.status-tabs a.active {
    background: #ec4899;
    color: white;
}

.batch-form {
    margin-bottom: 20px;
}

.batch-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-default {
    background: #f3f4f6;
    color: #6b7280;
}

.upload-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.upload-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upload-area {
    position: relative;
    border: 2px dashed #fbcfe8;
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    transition: 0.2s;
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: #ec4899;
    background: #fdf2f8;
}

.upload-area input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    color: #831843;
}

.upload-label i {
    font-size: 3rem;
    color: #ec4899;
}

.upload-label small {
    color: #999;
}

.attachment-preview {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.settings-sections {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.settings-section h3 {
    color: #831843;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #fce7f3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-form {
    max-width: 600px;
}

.theme-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.theme-option {
    cursor: pointer;
    text-align: center;
}

.theme-option input {
    display: none;
}

.theme-preview {
    padding: 20px;
    border-radius: 15px;
    border: 3px solid transparent;
    transition: 0.2s;
    margin-bottom: 10px;
}

.theme-option.selected .theme-preview {
    border-color: #ec4899;
}

.theme-colors {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.theme-colors span {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.current-avatar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.current-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #fbcfe8;
}

.current-avatar span {
    color: #666;
}

.text-muted {
    color: #999;
}

@media (max-width: 768px) {
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .admin-wrapper {
        flex-direction: column;
    }
    
    .admin-content {
        margin-left: 0;
    }
    
    .dashboard-panels {
        grid-template-columns: 1fr;
    }
    
    .data-table-wrapper {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 600px;
    }
}

.admin-menu li a i {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.admin-header h1 i {
    font-size: 1.5rem;
}

.btn i {
    font-size: 0.9em;
}

.panel-header h3 i {
    font-size: 1rem;
}

.quick-actions h3 i {
    font-size: 1rem;
}

.settings-section h3 i {
    font-size: 1.2rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #ec4899;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.1);
}

.form-group select {
    width: 100%;
    padding: 12px;
    border-radius: 30px;
    border: 2px solid #f9a8d4;
    font-family: inherit;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.data-table td {
    vertical-align: middle;
}

.data-table .btn {
    margin: 2px;
}

.status-tabs a i {
    margin-right: 5px;
}

.badge i {
    margin-right: 3px;
}