/* 完整修复版 CSS 文件 */
:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --light: #f8f9fa;
    --dark: #212529;
    --success: #4cc9f0;
    --warning: #f72585;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --dark-gray: #343a40;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f2f5;
    color: var(--dark);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-outline {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

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

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.alert {
    padding: 0.8rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* 顶部导航栏 */
.navbar {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.8rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

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

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
    background-color: rgba(67, 97, 238, 0.1);
}

.user-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.admin-menu {
    position: relative;
    display: inline-block;
}

.admin-dropdown {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 160px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 100;
    border-radius: 5px;
    overflow: hidden;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
}

.admin-dropdown a {
    display: block;
    padding: 0.8rem 1rem;
    color: var(--dark);
    transition: background-color 0.3s;
}

.admin-dropdown a:hover {
    background-color: var(--light-gray);
}

.admin-menu:hover .admin-dropdown {
    display: block;
}

/* 主内容区 */
main {
    flex: 1;
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* 首页样式 */
.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 3rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"><polygon points="0,0 100,100 0,100" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero .btn {
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.feature {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.feature:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.feature i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.templates {
    margin-bottom: 3rem;
}

.templates h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--dark);
}

.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.template-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.template-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.template-preview {
    height: 200px;
    background: var(--light-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray);
    font-size: 4rem;
    opacity: 0.5;
}

.template-item h3 {
    padding: 1rem;
    text-align: center;
    font-size: 1.2rem;
    color: var(--dark);
}

/* 页脚样式 */
.footer {
    background-color: var(--dark-gray);
    color: white;
    padding: 3rem 0 0;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-section {
    padding: 1rem;
}

.footer-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section h4 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    margin-bottom: 1rem;
    color: #adb5bd;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #adb5bd;
    transition: color 0.3s;
    display: block;
    padding: 0.3rem 0;
}

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

.footer-section ul li i {
    margin-right: 0.5rem;
    width: 20px;
    text-align: center;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.social-links a:hover {
    background: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #adb5bd;
    font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 992px) {
    .navbar {
        flex-wrap: wrap;
    }
    
    .nav-links {
        order: 3;
        width: 100%;
        margin-top: 1rem;
        justify-content: center;
    }
    
    .user-actions {
        margin-left: auto;
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .templates-grid {
        grid-template-columns: 1fr;
    }
    
    .user-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .admin-menu {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .admin-dropdown {
        width: 100%;
        right: auto;
        left: 0;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 2rem 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .feature {
        padding: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}
/* 动画效果 */
.animate {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate.active {
    opacity: 1;
    transform: translateY(0);
}