/* ========================================
   imgpolish - 主样式文件
   主题: 浅色专业风
   框架: Layui 2.13.3
   ======================================== */

/* CSS 变量 */
:root {
    /* 主色调 - 蓝紫色系 */
    --primary: #6366F1;
    --primary-light: #818CF8;
    --primary-dark: #4F46E5;
    --primary-bg: #EEF2FF;
    
    /* 强调色 - 橙色 */
    --accent: #F97316;
    --accent-light: #FB923C;
    --accent-dark: #EA580C;
    
    /* 背景色 */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-tertiary: #F1F5F9;
    
    /* 文字色 */
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    
    /* 边框 */
    --border-color: #E2E8F0;
    --border-light: #F1F5F9;
    
    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    
    /* 圆角 */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    /* 过渡 */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* 布局 */
    --max-width: 1200px;
    --nav-height: 70px;
}

/* 重置样式 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========================================
   通用组件
   ======================================== */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

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

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.btn-accent {
    background: var(--accent);
    color: white;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.3);
}

.btn-accent:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.4);
}

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

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

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: var(--radius-lg);
}

/* 卡片 */
.card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-normal);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.card-clickable {
    cursor: pointer;
}

.card-clickable:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* 渐变文字 */
.gradient-text {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 区块标题 */
.section-header {
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* 标签 */
.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-full);
    background: var(--primary-bg);
    color: var(--primary);
}

.badge-hot {
    background: #FEF3C7;
    color: #D97706;
}

.badge-new {
    background: #D1FAE5;
    color: #059669;
}

/* ========================================
   导航栏
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    height: var(--nav-height);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-brand img {
    width: 36px;
    height: 36px;
}

.navbar-brand span {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    margin-right: 24px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.navbar-brand img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
}

.navbar-brand span {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-menu a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.navbar-menu a:hover,
.navbar-menu a.active {
    color: var(--primary);
    background: var(--primary-bg);
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex !important;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.nav-dropdown-toggle i {
    font-size: 12px;
    transition: transform var(--transition-fast);
}

.nav-dropdown:hover .nav-dropdown-toggle i {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 8px 0;
    display: none;
    z-index: 100;
}

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

.nav-dropdown-menu a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--text-primary);
    border-radius: 0;
}

.nav-dropdown-menu a:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav-dropdown-menu a i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

/* 语言选择器 */
.lang-select {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-primary);
    color: var(--text-primary);
    cursor: pointer;
    outline: none;
    transition: border-color var(--transition-fast);
}

.lang-select:hover,
.lang-select:focus {
    border-color: var(--primary);
}

/* 手机端汉堡菜单 */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    cursor: pointer;
    background: none;
    border: none;
}

.navbar-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ========================================
   Hero 区域
   ======================================== */

.hero {
    padding: calc(var(--nav-height) + 60px) 24px 80px;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    text-align: center;
}

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

.hero-title {
    font-size: 48px;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 16px;
    line-height: 1.2;
}

.hero-title .highlight {
    color: var(--primary);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* 上传区域 */
.upload-area {
    max-width: 600px;
    margin: 0 auto 40px;
    padding: 48px 24px;
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.upload-area:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.upload-area.dragover {
    border-color: var(--primary);
    background: var(--primary-bg);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: 16px;
}

.upload-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.upload-hint {
    font-size: 14px;
    color: var(--text-muted);
}

/* 快捷工具网格 */
.quick-tools {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.quick-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    text-decoration: none;
    transition: all var(--transition-normal);
}

.quick-tool:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.quick-tool-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
    font-size: 24px;
    color: var(--primary);
}

.quick-tool-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.quick-tool-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ========================================
   工具分类区域
   ======================================== */

.tools-section {
    padding: 80px 24px;
    background: var(--bg-primary);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.tool-category {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 32px;
}

.tool-category h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tool-category h3 i {
    color: var(--primary);
}

.tool-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all var(--transition-fast);
}

.tool-item:hover {
    border-color: var(--primary);
    transform: translateX(4px);
}

.tool-item i {
    font-size: 20px;
    color: var(--primary);
}

.tool-item span {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ========================================
   功能展示区域
   ======================================== */

.features-section {
    padding: 80px 24px;
    background: var(--bg-secondary);
}

.feature-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto 80px;
}

.feature-block:last-child {
    margin-bottom: 0;
}

.feature-block.reverse .feature-visual {
    order: 2;
}

.feature-content h3 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.feature-content p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
}

.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.feature-list li i {
    color: var(--primary);
    font-size: 18px;
}

.feature-visual {
    position: relative;
}

.feature-visual .comparison-slider {
    max-width: 100%;
}

.feature-image {
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

/* Before/After 对比 */
.compare-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.compare-image {
    display: block;
    width: 100%;
    height: auto;
}

.compare-label {
    position: absolute;
    bottom: 16px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
}

.compare-label.before {
    left: 16px;
}

.compare-label.after {
    right: 16px;
}

/* 交互式对比滑块 */
.comparison-slider {
    position: relative;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    cursor: col-resize;
    aspect-ratio: 4/3;
}

.comparison-slider .image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.comparison-slider .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

.comparison-slider .image-wrapper.before {
    z-index: 1;
}

.comparison-slider .image-wrapper.after {
    z-index: 2;
    clip-path: inset(0 0 0 50%);
}

.comparison-slider .slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: #fff;
    z-index: 10;
    transform: translateX(-50%);
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

.comparison-slider .slider-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.comparison-slider .slider-handle::after {
    content: '\e603 \e602';
    font-family: layui-icon !important;
    font-size: 16px;
    color: var(--primary);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 11;
}

.comparison-slider .label {
    position: absolute;
    bottom: 16px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 13px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    z-index: 5;
    pointer-events: none;
}

.comparison-slider .label.before-label {
    left: 16px;
}

.comparison-slider .label.after-label {
    right: 16px;
}

/* ========================================
   用户评价
   ======================================== */

.testimonials-section {
    padding: 80px 24px;
    background: var(--bg-primary);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}

.testimonial-card {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.testimonial-stars {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    color: #F59E0B;
    font-size: 18px;
}

.testimonial-text {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--primary);
    font-weight: 600;
}

.testimonial-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.testimonial-info span {
    font-size: 13px;
    color: var(--text-muted);
}

/* ========================================
   CTA 区域
   ======================================== */

.cta-section {
    padding: 80px 24px;
    background: var(--primary);
    text-align: center;
}

.cta-section h2 {
    font-size: 32px;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
}

.cta-section p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 32px;
}

.cta-section .btn {
    background: var(--accent);
    color: white;
}

.cta-section .btn:hover {
    background: var(--accent-dark);
}

/* ========================================
   Footer
   ======================================== */

.footer {
    padding: 32px 24px 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 24px;
}

.footer-brand {
    max-width: 280px;
    flex-shrink: 0;
}

.footer-brand img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.footer-brand p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.footer-brand .footer-desc {
    margin-bottom: 12px;
}

.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: var(--bg-primary);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
}

.footer-links {
    display: flex;
    gap: 48px;
    flex-wrap: wrap;
}

.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 14px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ========================================
   响应式设计
   ======================================== */

@media (max-width: 1024px) {
    .quick-tools {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-block {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .feature-block.reverse .feature-visual {
        order: 0;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-main {
        flex-direction: column;
        gap: 24px;
    }
    
    .footer-links {
        flex-wrap: wrap;
    }
    
    .comparison-slider {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    :root {
        --nav-height: 60px;
    }
    
    .navbar-inner {
        flex-wrap: wrap;
    }
    
    .navbar-menu {
        display: none;
        position: absolute;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-lg);
        margin: 0;
        width: 100%;
    }
    
    .navbar-menu.active {
        display: flex;
    }
    
    .navbar-toggle {
        display: flex;
    }
    
    .navbar-actions .lang-select {
        display: none;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .quick-tools {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .quick-tool {
        padding: 16px 12px;
    }
    
    .quick-tool-icon {
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
    
    .quick-tool-title {
        font-size: 14px;
    }
    
    .quick-tool-desc {
        display: none;
    }
    
    .section-header h2 {
        font-size: 26px;
    }
    
    .feature-content h3 {
        font-size: 22px;
    }
    
    .feature-block {
        grid-template-columns: 1fr;
    }
    
    .feature-block.reverse .feature-visual {
        order: -1;
    }
    
    .cta-section h2 {
        font-size: 26px;
    }
    
    .footer-main {
        flex-direction: column;
    }
    
    .footer-links {
        gap: 24px;
    }
}

/* ========================================
   Layui 样式覆盖
   ======================================== */

/* 导航栏 */
.layui-nav {
    background: transparent;
}

.layui-nav * {
    font-size: 15px;
}

.layui-nav .layui-nav-item a {
    color: var(--text-secondary);
}

.layui-nav .layui-nav-item a:hover,
.layui-nav .layui-this a {
    color: var(--primary);
}

.layui-nav .layui-nav-bar {
    background: var(--primary);
}

/* 按钮 */
.layui-btn {
    border-radius: var(--radius-md);
    font-weight: 500;
}

.layui-btn-primary {
    border-color: var(--border-color);
    color: var(--text-primary);
}

.layui-btn-primary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* 输入框 */
.layui-input,
.layui-textarea {
    border-color: var(--border-color);
    border-radius: var(--radius-md);
}

.layui-input:focus,
.layui-textarea:focus {
    border-color: var(--primary) !important;
}

/* 表单标签 */
.layui-form-label {
    color: var(--text-secondary);
}

/* 上传组件 */
.layui-upload-drag {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
}

.layui-upload-drag:hover {
    border-color: var(--primary);
}

/* 弹层 */
.layui-layer {
    border-radius: var(--radius-lg);
}

.layui-layer-title {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.layui-layer-btn a {
    border-radius: var(--radius-md);
}

/* 下拉选择 */
.layui-form-select dl {
    border-radius: var(--radius-md);
}

.layui-form-select dl dd.layui-this {
    background: var(--primary-bg);
    color: var(--primary);
}

/* ========================================
   动画效果
   ======================================== */

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

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

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.6s ease forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease forwards;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-slide-left {
    animation: slideInLeft 0.6s ease forwards;
}

.animate-slide-right {
    animation: slideInRight 0.6s ease forwards;
}

/* 延迟动画 */
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* 悬停效果 */
.hover-lift {
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

/* Feature block animations */
.feature-block {
    opacity: 0;
    animation: slideUp 0.8s ease forwards;
}

.feature-block:nth-child(1) { animation-delay: 0.2s; }
.feature-block:nth-child(2) { animation-delay: 0.4s; }

.feature-block.reverse {
    animation-name: slideUp;
}

.feature-visual {
    animation: scaleIn 0.8s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.feature-block:nth-child(2) .feature-visual {
    animation-delay: 0.5s;
}

/* ========================================
   工具页专用样式
   ======================================== */

.tools-page {
    padding-top: calc(var(--nav-height) + 40px);
}

.page-header {
    padding: 40px 24px;
    background: var(--bg-secondary);
    text-align: center;
    margin-bottom: 40px;
}

.page-header h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.page-header p {
    font-size: 16px;
    color: var(--text-secondary);
}

/* 工具详情卡片 */
.tool-detail-card {
    max-width: 900px;
    margin: 0 auto 40px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.tool-detail-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.tool-detail-body {
    padding: 32px;
}

/* 编辑器布局 */
.editor-layout {
    display: grid;
    grid-template-columns: 250px 1fr 280px;
    min-height: calc(100vh - var(--nav-height));
    margin-top: var(--nav-height);
}

.editor-sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    padding: 20px;
    overflow-y: auto;
}

.editor-main {
    background: var(--bg-tertiary);
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.editor-properties {
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    padding: 20px;
    overflow-y: auto;
}

.editor-tool-group {
    margin-bottom: 24px;
}

.editor-tool-group h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.editor-tools {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.editor-tool {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.editor-tool:hover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.editor-tool i {
    font-size: 22px;
    color: var(--text-secondary);
}

.editor-tool:hover i {
    color: var(--primary);
}

.editor-tool span {
    font-size: 11px;
    color: var(--text-muted);
}

@media (max-width: 1024px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }
    
    .editor-sidebar,
    .editor-properties {
        display: none;
    }
}

/* 转换器 */
.converter-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.format-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.format-option:hover,
.format-option.selected {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.format-option i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 8px;
}

.format-option span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.format-option small {
    font-size: 12px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .converter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
