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

:root {
    --color-bg: #ffffff;
    --color-text: #000000;
    --color-text-secondary: #666666;
    --color-border: #e5e5e5;
    --color-hover: #f5f5f5;
    --color-accent: #000000;
}

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

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

/* Header */
header {
    border-bottom: 1px solid var(--color-border);
    padding: 1.5rem 0;
    background: var(--color-bg);
}

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

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

header h1 a {
    color: var(--color-text);
    text-decoration: none;
    transition: opacity 0.2s;
}

header h1 a:hover {
    opacity: 0.6;
}

.subtitle {
    display: none;
}

/* Main */
main {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
}

.hero h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text);
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.products, .features {
    margin-bottom: 4rem;
}

h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    text-align: center;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1px;
    background: var(--color-border);
    border: 1px solid var(--color-border);
}

@media (min-width: 1400px) {
    .product-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 1024px) and (max-width: 1399px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 480px) and (max-width: 767px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 479px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}

.product-card {
    background: var(--color-bg);
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    min-height: 320px;
    position: relative;
    overflow: hidden;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-text);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-card:hover {
    background: var(--color-hover);
    transform: translateY(-4px);
}

.product-card:active {
    transform: translateY(-2px);
}

.product-card img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.product-card:hover img {
    transform: scale(1.05);
}

.product-card h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    transition: color 0.2s;
}

.product-card:hover h4 {
    color: var(--color-text);
}

.product-card p {
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.5;
    flex: 1;
    transition: color 0.2s;
}

.category-tag {
    display: inline-block;
    background: var(--color-text);
    color: var(--color-bg);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    transition: all 0.2s;
}

.product-card:hover .category-tag {
    transform: translateX(4px);
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--color-text);
    color: var(--color-bg);
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

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

.btn:active {
    transform: translateY(0);
}

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

.btn-secondary:hover {
    background: var(--color-hover);
    opacity: 1;
}

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

.view-all {
    text-align: center;
    margin-top: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1px;
    background: var(--color-border);
    border: 1px solid var(--color-border);
}

.feature-item {
    background: var(--color-bg);
    padding: 2.5rem 2rem;
    text-align: center;
}

.feature-item h4 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--color-text);
    font-weight: 600;
}

.feature-item p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
}

footer {
    border-top: 1px solid var(--color-border);
    padding: 3rem 0;
    margin-top: 4rem;
}

footer .container {
    text-align: center;
}

footer p {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

footer a {
    color: var(--color-text);
    text-decoration: none;
    transition: opacity 0.2s;
}

footer a:hover {
    opacity: 0.7;
}

.page-header {
    margin-bottom: 3rem;
    text-align: center;
}

.page-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.category-description {
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.category-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 2rem;
}

.category-filter a {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--color-text-secondary);
    text-decoration: none;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    position: relative;
}

.category-filter a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-text);
    transform: scaleX(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-filter a:hover {
    background: var(--color-hover);
    color: var(--color-text);
    transform: translateY(-2px);
}

.category-filter a.active {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-text);
}

.category-filter a.active::after {
    transform: scaleX(1);
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-secondary);
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

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

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

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: 0.95rem;
    font-family: inherit;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-text);
}

.form-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

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

.error-message {
    background: #fee;
    color: #dc2626;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
}

#modalTitle {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    clear: both;
    padding-top: 0.5rem;
}

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

.admin-sidebar {
    width: 250px;
    background: var(--color-text);
    color: var(--color-bg);
    padding: 2rem 1rem;
}

.admin-sidebar h2 {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.admin-sidebar nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--color-bg);
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    transition: background 0.2s;
    opacity: 0.7;
}

.admin-sidebar nav a:hover,
.admin-sidebar nav a.active {
    background: rgba(255,255,255,0.1);
    opacity: 1;
}

.admin-main {
    flex: 1;
    padding: 2rem;
    background: var(--color-bg);
}

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

.admin-header h1 {
    font-size: 2rem;
    font-weight: 600;
}

.admin-table {
    width: 100%;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-collapse: collapse;
}

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

.admin-table th {
    background: var(--color-hover);
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9rem;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background: var(--color-hover);
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    background: var(--color-text);
    color: var(--color-bg);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: opacity 0.2s;
}

.btn-small:hover {
    opacity: 0.8;
}

.btn-danger {
    background: #dc2626;
}

.btn-danger:hover {
    opacity: 0.8;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    overflow-y: auto;
    padding: 2rem 0;
}

.modal-content {
    background: white;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    position: relative;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.close {
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    font-size: 2rem;
    cursor: pointer;
    color: #999;
    background: white;
    z-index: 10;
    line-height: 1;
    padding: 0.5rem;
}

.close:hover {
    color: #333;
}

@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
    }
}

/* 详情页样式 */
.breadcrumb {
    padding: 1.5rem 0;
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

.product-detail {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    padding: 3rem;
    margin-bottom: 3rem;
}

.detail-header {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid var(--color-border);
}

.detail-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    flex-shrink: 0;
    border-radius: 12px;
}

.detail-info {
    flex: 1;
}

.detail-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text);
    letter-spacing: -0.02em;
}

.detail-description {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.detail-actions {
    margin-top: 2rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.detail-content {
    line-height: 1.8;
    color: var(--color-text);
}

.detail-content h2 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 2.5rem 0 1rem;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

.detail-content h3 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 2rem 0 1rem;
    color: var(--color-text);
    text-align: left;
}

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

.detail-content ul {
    margin: 1rem 0 1.5rem 2rem;
}

.detail-content li {
    margin-bottom: 0.5rem;
    color: var(--color-text-secondary);
}

.detail-cta {
    background: var(--color-text);
    color: var(--color-bg);
    padding: 3rem;
    text-align: center;
    margin-top: 3rem;
    border: 1px solid var(--color-text);
}

.detail-cta h3 {
    color: var(--color-bg);
    margin-bottom: 0.75rem;
    font-size: 1.75rem;
}

.detail-cta p {
    margin-bottom: 2rem;
    opacity: 0.8;
}

.detail-cta .btn {
    background: var(--color-bg);
    color: var(--color-text);
}

.detail-cta .btn:hover {
    opacity: 0.9;
}

.related-products {
    margin-top: 4rem;
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-header {
        flex-direction: column;
        gap: 2rem;
    }
    
    .detail-logo {
        margin: 0 auto;
    }
    
    .detail-info h1 {
        font-size: 2rem;
    }
}

code {
    background: var(--color-hover);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
    font-size: 0.9rem;
}

small {
    display: block;
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.category-description {
    text-align: center;
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #667eea;
}

/* 图片上传样式 */
.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.image-preview {
    width: 150px;
    height: 150px;
    border: 2px dashed #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    margin-bottom: 0.5rem;
}

.image-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.upload-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.upload-progress {
    display: none;
    margin-top: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 4px;
    background: #eee;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s;
}

/* 信息区块样式 */
.info-section {
    margin: 4rem 0;
    padding: 3rem 0;
    border-top: 1px solid var(--color-border);
}

.info-content {
    max-width: 900px;
    margin: 0 auto;
}

.info-block {
    margin-bottom: 2.5rem;
    padding: 2rem;
    background: var(--color-hover);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.info-block h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--color-text);
    position: relative;
    padding-left: 1rem;
}

.info-block h4::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 1.2em;
    background: var(--color-text);
    border-radius: 2px;
}

.info-block p {
    color: var(--color-text-secondary);
    line-height: 1.8;
    margin-bottom: 0.75rem;
}

.info-block strong {
    color: var(--color-text);
    font-weight: 600;
}

.info-block ol,
.info-block ul {
    margin: 1rem 0 1rem 2rem;
    color: var(--color-text-secondary);
}

.info-block li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.info-block ol {
    list-style: decimal;
}

.info-block ul {
    list-style: disc;
}

/* CTA 区块 */
.cta-section {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--color-hover);
    border: 1px solid var(--color-border);
    margin: 4rem 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,0,0,0.03), transparent);
    transition: left 0.6s;
}

.cta-section:hover::before {
    left: 100%;
}

.cta-section h3 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
}

.cta-section p {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    margin-bottom: 2rem;
    position: relative;
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.05rem;
    position: relative;
}

/* Hero 优化 */
.hero {
    text-align: center;
    margin-bottom: 4rem;
    padding: 2rem 0;
    animation: fadeInUp 0.6s ease-out;
}

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

.hero h2 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--color-text);
    letter-spacing: -0.03em;
    line-height: 1.2;
    animation: fadeInUp 0.6s ease-out 0.1s both;
}

.hero p {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

/* Features 网格优化 */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1px;
    background: var(--color-border);
    border: 1px solid var(--color-border);
}

.feature-item {
    background: var(--color-bg);
    padding: 2.5rem 2rem;
    text-align: left;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-text);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item:hover::before {
    transform: scaleX(1);
}

.feature-item:hover {
    background: var(--color-hover);
    transform: translateY(-4px);
}

.feature-item h4 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
    color: var(--color-text);
    font-weight: 600;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-item:hover h4 {
    transform: translateX(4px);
}

.feature-item p {
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .info-section {
        padding: 2rem 0;
    }
    
    .cta-section {
        padding: 3rem 1.5rem;
    }
    
    .cta-section h3 {
        font-size: 1.5rem;
    }
}

footer a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--color-text);
    text-decoration: underline;
}

/* 设置页面样式 */
.settings-form {
    background: white;
    border: 1px solid var(--color-border);
    padding: 2rem;
    margin-bottom: 2rem;
}

.settings-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.settings-section:last-child {
    border-bottom: none;
}

.settings-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-actions {
    margin-top: 2rem;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 1.5rem;
    border: 1px solid #c3e6cb;
}

.settings-tips {
    background: var(--color-hover);
    border: 1px solid var(--color-border);
    padding: 2rem;
}

.settings-tips h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 1rem;
    text-align: left;
}

.settings-tips ul {
    list-style: none;
    padding: 0;
}

.settings-tips li {
    padding: 0.5rem 0;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.settings-tips strong {
    color: var(--color-text);
}
