* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --success-color: #22c55e;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    overflow: hidden;
}

.user-avatar-img {
    width: 32px;
    height: 32px;
    object-fit: cover;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    border-radius: 2px;
}

.profile-header {
    margin-top: 60px;
    background: var(--bg-white);
}

.profile-cover {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.cover-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cover-placeholder:hover {
    background: rgba(0, 0, 0, 0.1);
}

.profile-info {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem 2rem;
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    position: relative;
}

.avatar-section {
    margin-top: -60px;
}

.avatar-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.avatar-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.avatar-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.avatar-wrapper:hover .avatar-overlay {
    opacity: 1;
}

.avatar-overlay span {
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
}

.avatar-status {
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.75rem;
}

.avatar-status.pending {
    color: var(--warning-color);
}

.avatar-status.approved {
    color: var(--success-color);
}

.avatar-status.rejected {
    color: var(--error-color);
}

.info-section {
    flex: 1;
    padding-top: 1rem;
}

.username-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.info-section h1 {
    font-size: 1.75rem;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

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

.status-badge.approved {
    background: #dcfce7;
    color: #166534;
}

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

.info-section p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.info-section .bio {
    font-style: italic;
}

.nickname-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
}

.nickname-row span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.btn-edit-nickname {
    padding: 0.375rem 0.75rem;
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-edit-nickname:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.action-section {
    padding-top: 1rem;
    display: flex;
    gap: 1rem;
}

.btn-edit, .btn-logout {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    border: none;
}

.btn-edit {
    background: var(--primary-color);
    color: white;
}

.btn-edit:hover {
    background: var(--primary-dark);
}

.btn-logout {
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-logout:hover {
    background: var(--error-color);
    color: white;
    border-color: var(--error-color);
}

.profile-content {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.content-tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--primary-color);
}

.tab-btn.active {
    color: var(--primary-color);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.posts-placeholder {
    border: 3px dashed var(--border-color);
    border-radius: 16px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-white);
}

.placeholder-box {
    text-align: center;
    color: var(--text-secondary);
}

.placeholder-box span {
    font-size: 1.25rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.settings-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.settings-card h3 {
    margin-bottom: 1rem;
    font-size: 1.125rem;
}

.settings-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.settings-card form textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 1rem;
}

.settings-card form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn-save {
    padding: 0.625rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-save:hover {
    background: var(--primary-dark);
}

.danger-zone {
    border-color: rgba(239, 68, 68, 0.3);
}

.danger-zone h3 {
    color: var(--error-color);
}

.btn-logout-danger {
    padding: 0.625rem 1.5rem;
    background: white;
    color: var(--error-color);
    border: 1px solid var(--error-color);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-logout-danger:hover {
    background: var(--error-color);
    color: white;
}

.request-status {
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    text-align: center;
}

.request-status.success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.request-status.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-header h2 {
    font-size: 1.25rem;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: var(--bg-light);
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: var(--error-color);
    color: white;
}

.modal .form-group {
    margin-bottom: 1.25rem;
}

.modal .form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.modal .form-group input,
.modal .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
}

.modal .form-group input:disabled {
    background: var(--bg-light);
    color: var(--text-secondary);
}

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

.modal .form-group input:focus,
.modal .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.nicknote-tip {
    font-size: 0.75rem;
    color: var(--warning-color);
    margin-bottom: 1rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-cancel {
    padding: 0.625rem 1.5rem;
    background: var(--bg-light);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-cancel:hover {
    background: var(--text-secondary);
    color: white;
}

.footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-content a {
    color: #93c5fd;
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .profile-info {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .avatar-section {
        margin-top: -40px;
    }

    .avatar-placeholder {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }

    .action-section {
        justify-content: center;
    }

    .profile-header {
        margin-top: 60px;
    }

    .content-tabs {
        overflow-x: auto;
        white-space: nowrap;
    }

    .tab-btn {
        padding: 0.75rem 1rem;
    }

    .username-row {
        justify-content: center;
    }

    .nickname-row {
        justify-content: center;
        flex-direction: column;
    }
}

.post-card {
    background: var(--bg-white);
    padding: 1.5rem;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
}

.post-content {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    white-space: pre-wrap;
}

.post-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.post-images img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.post-video {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.post-actions {
    display: flex;
    gap: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.post-admin-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.post-admin-controls button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.delete-btn {
    background: #fee2e2;
    color: #dc2626;
}

.delete-btn:hover {
    background: #fecaca;
}

.post-content a.safe-link {
    color: var(--primary-color);
    text-decoration: underline;
    transition: opacity 0.2s;
}

.post-content a.safe-link:hover {
    opacity: 0.8;
}

.post-time {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    overflow: hidden;
    flex-shrink: 0;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-user-info h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.post-user-info span {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.post-user-controls {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.control-btn {
    padding: 0.25rem 0.5rem;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.875rem;
}

.hidden-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}