/* CSS Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Light Theme Colors */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #06b6d4;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #e2e8f0;
    --bg-overlay: rgba(255, 255, 255, 0.9);
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --bg-overlay: rgba(15, 23, 42, 0.9);
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    
    --border-color: #334155;
    --border-hover: #475569;
}

/* Base Typography */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: var(--transition);
    overflow-x: hidden;
}

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

/* Background */
#background-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-image: url('https://www.loliapi.com/acg/');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

#background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    width: 80px;
    height: 50px;
    border-radius: var(--radius-md);
    object-fit: contain;
}

.project-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    gap: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    font-weight: 500;
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: var(--bg-secondary);
}

.nav-link.active {
    color: var(--primary-color);
    background-color: var(--bg-secondary);
}

.header-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

.action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--primary-color);
    transform: translateY(-1px);
}

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

/* Docker 横幅样式 */
.docker-banner {
    background: linear-gradient(135deg, #2496ed, #0db7ed);
    color: white;
    padding: 1rem 0;
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 20px rgba(36, 150, 237, 0.3);
    animation: slideInDown 0.6s ease-out;
}

.banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
}

.banner-content i.fab {
    font-size: 1.5rem;
    color: white;
}

.banner-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.banner-link:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-section {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.page-section.active {
    display: block;
}

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

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 4rem 0;
}

.hero-content {
    max-width: 600px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* Acceleration Form */
.acceleration-form {
    margin-bottom: 3rem;
}

.input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.url-input {
    flex: 1;
    padding: 1rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.url-input.invalid {
    border-color: var(--error-color);
}

.url-input.valid {
    border-color: var(--success-color);
}

.accelerate-btn {
    position: relative;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    overflow: hidden;
}

.accelerate-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.accelerate-btn:disabled {
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: var(--transition-fast);
}

.accelerate-btn.loading .btn-text {
    opacity: 0;
}

.accelerate-btn.loading .btn-loading {
    opacity: 1;
}

.input-validation {
    text-align: left;
    font-size: 0.875rem;
    min-height: 1.25rem;
    color: var(--text-muted);
}

.input-validation.error {
    color: var(--error-color);
}

/* 输入提示样式 */
.input-hint {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.5;
}

.input-hint i {
    color: var(--primary-color);
    font-size: 0.8rem;
}

.input-hint a {
    text-decoration: none;
    font-weight: 500;
}

.input-hint a:hover {
    text-decoration: underline;
}

.input-validation.success {
    color: var(--success-color);
}

/* Result Section */
.result-section {
    display: none;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    animation: slideUp 0.3s ease-out;
}

.result-section.show {
    display: block;
}

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

.result-content h3 {
    color: var(--success-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.result-url {
    display: flex;
    gap: 0.5rem;
}

.result-url input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: monospace;
}

.copy-btn {
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-fast);
}

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

/* Stats Section */
.stats-section {
    padding: 4rem 0;
}

.stats-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.stats-title {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

/* Footer */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-column h4 {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 64px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: contain;
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.footer-stats {
    margin-top: 2rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    position: relative;
}

.stat-item i {
    color: var(--primary-color);
    width: 16px;
    text-align: center;
}

.stat-item span {
    color: var(--text-primary);
}

.info-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 2px;
    margin-left: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 0.8rem;
}

.info-btn:hover {
    color: var(--primary-color);
    background-color: var(--bg-secondary);
}

.footer-bottom {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-stats {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .stat-item {
        justify-content: center;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h3 {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

/* 信息模态框特殊样式 */
.info-section {
    margin-bottom: 1.5rem;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h4 {
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
}

.info-section p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

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

.info-section li {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.5rem;
    padding-left: 1.2rem;
    position: relative;
}

.info-section li::before {
    content: '•';
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.info-section strong {
    color: var(--text-primary);
}

/* 页脚链接样式 */
.footer-links {
    margin-top: 0.75rem;
    text-align: center;
}

.footer-links a {
    color: #64748b;
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.footer-links .separator {
    color: #94a3b8;
    margin: 0 0.75rem;
    font-size: 0.875rem;
}

/* 法律文档模态框样式 */
.legal-content {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.legal-content h4 {
    color: #1e293b;
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.legal-content h4:first-child {
    margin-top: 0;
}

.legal-content p {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 1rem;
    text-align: justify;
}

.legal-content ul {
    color: #475569;
    padding-left: 1.5rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-content strong {
    color: #1e293b;
    font-weight: 600;
}

.legal-content .update-date {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.875rem;
    text-align: center;
}

/* 法律文档模态框滚动条样式 */
.legal-content::-webkit-scrollbar {
    width: 6px;
}

.legal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.legal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.legal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

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

/* Service Status */
.service-status {
    display: grid;
    gap: 1rem;
}

.service-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.service-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.service-status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--error-color);
}

.service-status-indicator.online {
    background: var(--success-color);
}

.service-details {
    text-align: right;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 使用示例样式 */
.usage-examples {
    margin-top: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.usage-examples details {
    cursor: pointer;
}

.usage-examples summary {
    padding: 0.75rem 1rem;
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    font-weight: 500;
    user-select: none;
    transition: background-color 0.2s ease;
}

.usage-examples summary:hover {
    background: rgba(37, 99, 235, 0.15);
}

.examples-content {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.examples-content p {
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.examples-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.examples-content code {
    display: block;
    background: var(--bg-primary);
    color: var(--primary-color);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    word-break: break-all;
    border: 1px solid var(--border-color);
}

/* Toast */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1rem 1.5rem;
    z-index: 3000;
    transform: translateX(400px);
    transition: var(--transition);
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-icon {
    font-size: 1.25rem;
}

.toast.success .toast-icon {
    color: var(--success-color);
}

.toast.error .toast-icon {
    color: var(--error-color);
}

.toast.info .toast-icon {
    color: var(--primary-color);
}

.toast-message {
    color: var(--text-primary);
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .nav-menu {
        order: 3;
        width: 100%;
        justify-content: center;
    }
    
    .nav-link span {
        display: none;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .input-group {
        flex-direction: column;
    }
    
    .accelerate-btn {
        width: 100%;
    }
    
    /* 统计图表移动端优化 */
    .stats-section {
        padding: 2rem 0;
    }
    
    .stats-container {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .chart-container {
        height: 250px;
        overflow: hidden;
    }
    
    .stats-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .toast {
        right: 1rem;
        left: 1rem;
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .project-name {
        font-size: 1rem;
    }
    
    /* 小屏幕统计图表优化 */
    .stats-container {
        padding: 0.75rem;
        margin: 0 0.25rem;
    }
    
    .chart-container {
        height: 200px;
    }
    
    .stats-title {
        font-size: 1.125rem;
    }
    
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

/* Animations */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.bounce {
    animation: bounce 1s infinite;
}