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

html {
    font-size: 15px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background-color: #f0f2f5;
    color: #1a1a2e;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

.header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 50%, #1e3a5f 100%);
    color: #fff;
    padding: 16px 0;
    box-shadow: 0 4px 20px rgba(30, 58, 95, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.header .logo {
    flex-shrink: 0;
}

.header .logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.header .logo a:hover {
    transform: scale(1.02);
}

.header .logo .logo-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header .logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1px;
}

.header .search {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.header .search input {
    width: 100%;
    padding: 12px 45px 12px 20px;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.header .search input:focus {
    outline: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.header .search button {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.header .search button:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.header .nav {
    flex-shrink: 0;
}

.header .nav ul {
    list-style: none;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.header .nav ul li a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.header .nav ul li a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.header .nav ul li.active a {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.content {
    padding: 30px 0;
    min-height: calc(100vh - 140px);
}

.main-content {
    display: block;
}

.forums-section {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin-bottom: 24px;
    overflow: hidden;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #f0f0f0;
}

.section-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1a1a2e;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header h2::before {
    content: '';
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f0f2f5;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.forum-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: #fafbfc;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.forum-card:hover {
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border-color: #e2e8f0;
    transform: translateX(4px);
}

.forum-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 100%);
    border-radius: 12px;
    color: #fff;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(30, 58, 95, 0.3);
}

.forum-info {
    flex: 1;
    min-width: 0;
}

.forum-info h3 {
    font-size: 1.15rem;
    margin-bottom: 6px;
}

.forum-info h3 a {
    color: #1a1a2e;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.forum-info h3 a:hover {
    color: #667eea;
}

.forum-info .description {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

.forum-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: #94a3b8;
}

.forum-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.forum-last {
    display: none;
    flex-shrink: 0;
    text-align: right;
}

.forum-last .last-title {
    font-size: 0.85rem;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.forum-last .last-title a {
    color: #334155;
    text-decoration: none;
    transition: color 0.3s ease;
}

.forum-last .last-title a:hover {
    color: #667eea;
}

.forum-last .last-author,
.forum-last .last-time {
    font-size: 0.75rem;
    color: #94a3b8;
}

.empty-state {
    text-align: center;
    padding: 50px 20px;
    background: #fafbfc;
    border-radius: 12px;
    color: #94a3b8;
}

.empty-state svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.widget {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.widget h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.widget h3::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, #667eea 0%, transparent 100%);
}

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

.thread-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

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

.thread-list li:hover {
    transform: translateX(4px);
}

.thread-list li a {
    color: #334155;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thread-list li a:hover {
    color: #667eea;
}

.thread-meta {
    display: flex;
    gap: 10px;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 4px;
}

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

.member-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
    flex-shrink: 0;
}

.member-info {
    flex: 1;
    min-width: 0;
}

.member-info .username {
    font-weight: 600;
    color: #1a1a2e;
    display: block;
    font-size: 0.9rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-info .posts {
    font-size: 0.75rem;
    color: #94a3b8;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.stat-item {
    text-align: center;
    padding: 14px 10px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 8px;
}

.stat-item .stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: #667eea;
    display: block;
}

.stat-item .stat-label {
    font-size: 0.7rem;
    color: #64748b;
    margin-top: 2px;
}

.footer {
    background: #1a1a2e;
    color: #a0aec0;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 16px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section ul li a {
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #2d3748;
    color: #64748b;
    font-size: 0.85rem;
}

.hero-section {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.95) 0%, rgba(45, 90, 135, 0.95) 100%);
    padding: 50px 0;
    text-align: center;
    margin-bottom: 24px;
    border-radius: 16px;
    color: #fff;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -50%;
    width: 200%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
}

.hero-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
}

.hero-content p {
    font-size: 1rem;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 25px;
    position: relative;
    z-index: 1;
}

.hero-stat {
    text-align: center;
}

.hero-stat .number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    color: #ffd700;
}

.hero-stat .label {
    font-size: 0.85rem;
    opacity: 0.85;
}

.form-container {
    max-width: 420px;
    margin: 40px auto;
}

.form-card {
    background: #fff;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 8px;
}

.form-header p {
    font-size: 0.9rem;
    color: #64748b;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fafbfc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: #fff;
}

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

.form-group .error {
    color: #e53e3e;
    font-size: 0.8rem;
    margin-top: 6px;
}

.form-actions {
    margin-top: 25px;
}

.form-actions .btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
}

.form-links {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.form-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.form-links a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.form-links span {
    color: #a0aec0;
    margin: 0 10px;
}

.alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.alert-success {
    background: #f0fff4;
    border-color: #9ae6b4;
    color: #276749;
}

.alert-error {
    background: #fff5f5;
    border-color: #fed7d7;
    color: #742a2a;
}

.alert-warning {
    background: #fffaf0;
    border-color: #feebc8;
    color: #744210;
}

@media (min-width: 480px) {
    .header .search {
        display: block;
    }
    
    .forum-info .description {
        display: block;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 640px) {
    .forum-card {
        gap: 20px;
        padding: 22px;
    }
    
    .forum-icon {
        width: 60px;
        height: 60px;
        font-size: 1.75rem;
    }
    
    .forum-last {
        display: block;
        width: 140px;
    }
    
    .hero-content h1 {
        font-size: 2.25rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) {
    .header {
        padding: 18px 0;
    }
    
    .header .logo .logo-img {
        width: 50px;
        height: 50px;
    }
    
    .header .logo-text {
        font-size: 1.75rem;
    }
    
    .header .search {
        max-width: 550px;
    }
    
    .header .search input {
        padding: 14px 50px 14px 20px;
    }
    
    .header .nav ul {
        gap: 12px;
    }
    
    .header .nav ul li a {
        padding: 12px 22px;
        font-size: 1rem;
    }
    
    .content {
        padding: 35px 0;
    }
    
    .main-content {
        display: grid;
        grid-template-columns: 1fr 280px;
        gap: 25px;
    }
    
    .forums-section {
        padding: 28px;
        margin-bottom: 0;
    }
    
    .section-header {
        margin-bottom: 28px;
        padding-bottom: 18px;
    }
    
    .forum-card {
        gap: 22px;
        padding: 24px;
        margin-bottom: 14px;
    }
    
    .forum-icon {
        width: 65px;
        height: 65px;
        font-size: 2rem;
    }
    
    .forum-last {
        width: 160px;
    }
    
    .widget {
        padding: 22px;
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .hero-section {
        padding: 60px 0;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-stat .number {
        font-size: 3rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 25px;
    }
    
    .main-content {
        grid-template-columns: 1fr 300px;
        gap: 30px;
    }
    
    .forum-card {
        gap: 24px;
    }
    
    .forum-last {
        width: 180px;
    }
    
    .hero-section {
        padding: 70px 0;
    }
    
    .hero-stats {
        gap: 60px;
    }
}

@media (min-width: 1200px) {
    .header .search {
        max-width: 600px;
    }
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 8px;
}

@media (max-width: 480px) {
    .header .container {
        flex-wrap: wrap;
    }
    
    .header .nav {
        order: 3;
        width: 100%;
    }
    
    .header .nav ul {
        justify-content: center;
        gap: 6px;
    }
    
    .header .nav ul li a {
        font-size: 0.85rem;
        padding: 8px 14px;
    }
    
    .header .logo-text {
        display: none;
    }
    
    .form-card {
        padding: 25px;
    }
}

.float-post-btn {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 80px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
}

.float-post-btn:hover,
.float-post-btn.active {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.5);
}

.float-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.float-icon {
    color: #fff;
    font-size: 1.8rem;
    font-weight: 300;
}

.float-post-menu {
    display: none;
    position: fixed;
    right: 20px;
    bottom: 150px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.float-post-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.float-post-menu .menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    min-width: 190px;
    text-decoration: none;
    color: #334155;
    transition: background 0.2s;
}

.float-post-menu .menu-item:hover {
    background: #f0f2f5;
}

.menu-icon {
    font-size: 1.3rem;
}

.menu-text {
    font-size: 1rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .float-post-btn {
        display: flex;
    }
}

.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a87 50%, #1e3a5f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-header {
    margin-bottom: 40px;
}

.login-header .brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.login-header .brand-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.login-header h1 {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 2px;
}

.login-header p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    margin: 0;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-check input {
    width: auto;
    margin: 0;
}

.form-check label {
    margin: 0;
    font-weight: 400;
    color: #64748b;
}

.login-footer {
    margin-top: 30px;
}

.login-footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}