:root {
    /* 主题颜色 */
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --success-color: #10B981;
    --error-color: #EF4444;
    --warning-color: #F59E0B;
    
    /* 背景颜色 */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-accent: #f1f5f9;
    
    /* 文本颜色 */
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-accent: #94a3b8;
    
    /* 边框颜色 */
    --border-color: #e2e8f0;
    --border-focus: #3b82f6;
    --primary-color-alpha: rgba(37, 99, 235, 0.1);
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

/* 暗色主题 */
[data-theme="dark"] {
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #94a3b8;
    --accent-color: #0ea5e9;
    --success-color: #22c55e;
    --error-color: #ef4444;
    
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-accent: #334155;
    
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-accent: #cbd5e1;
    
    --border-color: #334155;
    --border-focus: #60a5fa;
    --primary-color-alpha: rgba(59, 130, 246, 0.1);
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
}

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

/* 布局组件 */
.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
}

.col-span-12 { grid-column: span 12; }
.col-span-6 { grid-column: span 6; }
.col-span-4 { grid-column: span 4; }

/* 主题切换按钮 */
.theme-toggle {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    z-index: 10000;
    box-shadow: var(--shadow);
}

.theme-toggle:hover {
    background: var(--bg-accent);
}

/* 页头样式 */
.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.header p {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

/* Toast 容器 */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

/* Toast 样式 */
.toast {
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 8px;
    background: var(--bg-primary);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 300px;
    animation: toast-slide-in 0.3s ease;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.toast-success {
    border-left: 4px solid var(--success-color);
}

.toast-error {
    border-left: 4px solid var(--error-color);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 5px;
}

.toast-fade-out {
    animation: toast-slide-out 0.3s ease forwards;
}

/* Loader 容器 */
#loader-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none !important;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    pointer-events: none;
}

#loader-container.visible {
    display: flex !important;
    pointer-events: auto;
}

.loader {
    background: var(--bg-primary);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.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;
}

.loader-message {
    color: var(--text-primary);
}

/* 响应式布局 */
@media (max-width: 768px) {
    .col-span-6, .col-span-4 {
        grid-column: span 12;
    }
    
    .container {
        padding: 1rem;
    }
    
    .header h1 {
        font-size: 2rem;
    }
}

/* 动画 */
@keyframes toast-slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

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

/* 添加或修改这些样式 */
.loader-container {
    position: fixed !important;
    inset: 0 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 9999 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loader-container.visible {
    opacity: 1;
    visibility: visible;
}

.loader-wrapper {
    position: absolute !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.loader-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.spinner {
    /* 添加加载动画样式 */
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Add these styles */
.url-input-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.url-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.url-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-color-alpha);
}

.url-preview {
    margin-top: 1rem;
}

.url-screenshot {
    max-width: 100%;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

/* Add these styles */
.upload-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    padding: 0.75rem 1.5rem;
    border: none;
    background: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-button i {
    margin-right: 0.5rem;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
} 