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

:root {
    --primary-color: #1a73e8;
    --primary-dark: #1557b0;
    --secondary-color: #34a853;
    --danger-color: #ea4335;
    --warning-color: #fbbc05;
    --text-color: #333;
    --text-light: #666;
    --text-lighter: #999;
    --bg-color: #f8f9fa;
    --bg-white: #fff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 5px 20px rgba(0,0,0,0.15);
    --radius: 8px;
    --radius-lg: 12px;
    --transition: all 0.3s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

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

/* Header Styles */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

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

.logo-img {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav a {
    color: var(--text-color);
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius);
    transition: var(--transition);
}

.nav a:hover, .nav a.active {
    color: var(--primary-color);
    background: rgba(26, 115, 232, 0.1);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

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

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

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

.btn-secondary:hover {
    background: #2d9348;
    color: white;
}

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

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

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #4285f4 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h2 {
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
}

.hero p {
    font-size: 20px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero .btn-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Section Styles */
.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 36px;
    color: var(--text-color);
    margin-bottom: 15px;
}

.section-title p {
    color: var(--text-light);
    font-size: 18px;
}

/* Card Styles */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--bg-color);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.card-text {
    color: var(--text-light);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-lighter);
    font-size: 14px;
}

/* Software Card */
.software-card .card-body {
    padding: 25px;
}

.software-card .version {
    display: inline-block;
    background: rgba(26, 115, 232, 0.1);
    color: var(--primary-color);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    margin-bottom: 10px;
}

.software-card .file-size {
    color: var(--text-lighter);
    font-size: 14px;
}

.software-card .download-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Features Section */
.features {
    background: var(--bg-white);
}

.feature-item {
    text-align: center;
    padding: 30px;
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #4285f4);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 36px;
    color: white;
}

.feature-item h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

.feature-item p {
    color: var(--text-light);
}

/* Footer Styles */
.footer {
    background: #1a1a1a;
    color: #ccc;
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 18px;
}

.footer ul {
    list-style: none;
}

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

.footer ul li a {
    color: #ccc;
    transition: var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    color: #999;
}

/* Login Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    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: var(--radius-lg);
    padding: 40px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-lighter);
}

.modal-close:hover {
    color: var(--text-color);
}

.wechat-qr {
    width: 250px;
    height: 250px;
    margin: 20px auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-color);
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.1);
}

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

/* Alert Styles */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

.alert-success {
    background: #e6f4ea;
    color: #1e8e3e;
    border: 1px solid #ceead6;
}

.alert-error {
    background: #fce8e6;
    color: #d93025;
    border: 1px solid #f8d7da;
}

.alert-warning {
    background: #fef7e0;
    color: #e37400;
    border: 1px solid #feefc3;
}

.alert-info {
    background: #e8f0fe;
    color: #1a73e8;
    border: 1px solid #d2e3fc;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a {
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    color: var(--text-color);
    transition: var(--transition);
}

.pagination a:hover, .pagination a.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 30px;
    color: var(--text-lighter);
}

.breadcrumb a {
    color: var(--text-light);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

/* Article Styles */
.article-content {
    background: var(--bg-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    line-height: 1.8;
}

.article-content h1, .article-content h2, .article-content h3 {
    margin: 30px 0 15px;
}

.article-content p {
    margin-bottom: 15px;
}

.article-content img {
    border-radius: var(--radius);
    margin: 20px 0;
}

/* Admin Styles */
.admin-sidebar {
    width: 250px;
    background: var(--bg-white);
    min-height: calc(100vh - 70px);
    padding: 20px 0;
    box-shadow: var(--shadow);
}

.admin-sidebar a {
    display: block;
    padding: 12px 25px;
    color: var(--text-color);
    transition: var(--transition);
}

.admin-sidebar a:hover, .admin-sidebar a.active {
    background: rgba(26, 115, 232, 0.1);
    color: var(--primary-color);
    border-right: 3px solid var(--primary-color);
}

.admin-content {
    flex: 1;
    padding: 30px;
}

.admin-layout {
    display: flex;
    min-height: calc(100vh - 70px);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table th, .table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.table th {
    background: var(--bg-color);
    font-weight: 600;
    color: var(--text-color);
}

.table tr:hover {
    background: rgba(26, 115, 232, 0.05);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #e6f4ea;
    color: #1e8e3e;
}

.badge-warning {
    background: #fef7e0;
    color: #e37400;
}

.badge-danger {
    background: #fce8e6;
    color: #d93025;
}

.badge-info {
    background: #e8f0fe;
    color: #1a73e8;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-wrap: wrap;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 10px;
        padding: 20px 0;
    }

    .nav.active {
        display: flex;
    }

    .hero h2 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        min-height: auto;
    }
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-10 { gap: 10px; }
.hidden { display: none; }
