:root {
    /* 新配色方案 - 温暖复古风格 */
    --color-cream: #FFF8E8;
    --color-beige: #F7EED3;
    --color-sage: #AAB396;
    --color-coffee: #674636;

    /* 衍生颜色 */
    --color-coffee-dark: #52382b;
    --color-coffee-light: #8d6e5a;
    --color-sage-light: #c5cdb8;
    --color-sage-dark: #8d967a;

    /* 语义化颜色 */
    --primary-color: var(--color-coffee);
    --primary-hover: var(--color-coffee-dark);
    --primary-light: var(--color-coffee-light);
    --accent-color: var(--color-sage);

    --bg-primary: var(--color-cream);
    --bg-secondary: var(--color-beige);
    --bg-tertiary: #fcf6e9;
    --bg-card: rgba(255, 255, 255, 0.85);

    --text-primary: var(--color-coffee);
    --text-secondary: #857065;
    --text-muted: #a69b97;

    --border-color: rgba(170, 179, 150, 0.3);
    --border-color-hover: rgba(103, 70, 54, 0.4);

    --shadow-sm: 0 2px 8px rgba(103, 70, 54, 0.08);
    --shadow-md: 0 4px 16px rgba(103, 70, 54, 0.12);
    --shadow-lg: 0 8px 32px rgba(103, 70, 54, 0.16);
    --shadow-glow: 0 0 20px rgba(170, 179, 150, 0.3);

    /* 渐变 */
    --gradient-primary: linear-gradient(135deg, #674636 0%, #8d6351 100%);
    --gradient-accent: linear-gradient(135deg, #AAB396 0%, #8d967a 100%);
    --gradient-soft: linear-gradient(135deg, #FFF8E8 0%, #F7EED3 100%);

    /* 间距 */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* 圆角 */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-full: 9999px;

    /* 动画时间 */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 400ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --transition-elastic: 600ms cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 柔和的背景装饰 */
body::before {
    content: '';
    position: fixed;
    top: -30%;
    right: -15%;
    width: 70%;
    height: 70%;
    background: radial-gradient(circle, rgba(247, 238, 211, 0.6) 0%, transparent 70%);
    filter: blur(80px);
    animation: float 15s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    left: -15%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(170, 179, 150, 0.3) 0%, transparent 60%);
    filter: blur(100px);
    animation: float 20s ease-in-out infinite alternate-reverse;
    pointer-events: none;
    z-index: 0;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.6;
    }

    100% {
        transform: translate(20px, -20px) scale(1.1);
        opacity: 0.8;
    }
}

.app-container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

/* ========== 头部 ========== */
.app-header {
    background: rgba(255, 248, 232, 0.9);
    backdrop-filter: blur(20px);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
}

.app-header:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-color-hover);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.app-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-coffee);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    letter-spacing: -0.5px;
}

.icon {
    font-size: 2.2rem;
    display: inline-block;
    animation: floatIcon 3s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(103, 70, 54, 0.2));
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-8px) rotate(5deg);
    }
}

.nav-tabs {
    display: flex;
    gap: var(--spacing-xs);
    background: var(--bg-secondary);
    padding: 0.4rem;
    border-radius: var(--radius-full);
    box-shadow: inset 0 2px 4px rgba(103, 70, 54, 0.1);
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: 0.7rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.tab-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(170, 179, 150, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.tab-btn:hover::before {
    width: 100%;
    height: 100%;
}

.tab-btn:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: white;
    color: var(--color-coffee);
    box-shadow: 0 4px 12px rgba(103, 70, 54, 0.15);
    transform: scale(1.05);
}

.tab-icon {
    font-size: 1.2rem;
    transition: transform var(--transition-bounce);
}

.tab-btn:hover .tab-icon {
    transform: scale(1.2) rotate(10deg);
}

/* ========== 视图切换 ========== */
.view {
    display: none;
    animation: fadeIn var(--transition-base);
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== 翻译视图 ========== */
.translate-container {
    max-width: 900px;
    margin: 0 auto;
}

.input-section {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-lg);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.input-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(170, 179, 150, 0.1), transparent);
    transition: left 0.5s;
}

.input-section:hover::before {
    left: 100%;
}

.input-section:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--color-sage);
    transform: translateY(-2px);
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.translate-input {
    width: 100%;
    padding: var(--spacing-md);
    background: var(--bg-secondary);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1.2rem;
    font-family: inherit;
    resize: vertical;
    min-height: 150px;
    transition: all var(--transition-base);
}

.translate-input:focus {
    outline: none;
    background: white;
    border-color: var(--color-sage);
    box-shadow: 0 0 0 4px rgba(170, 179, 150, 0.15), var(--shadow-glow);
    transform: scale(1.01);
}

.translate-input::placeholder {
    color: var(--text-muted);
}

/* 灵动的翻译按钮 */
.translate-btn {
    align-self: flex-end;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.1rem 2.5rem;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius-full);
    color: var(--color-cream);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-bounce);
    box-shadow: 0 4px 0 var(--color-coffee-dark), var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.translate-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.translate-btn:hover::before {
    width: 300px;
    height: 300px;
}

.translate-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 0 var(--color-coffee-dark), var(--shadow-lg);
}

.translate-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 0 var(--color-coffee-dark), var(--shadow-sm);
}

.btn-icon {
    font-size: 1.3rem;
    transition: transform var(--transition-elastic);
    position: relative;
    z-index: 1;
}

.translate-btn:hover .btn-icon {
    transform: rotate(360deg) scale(1.3);
}

/* 加载动画 - 按钮内 */
.translate-btn.loading {
    pointer-events: none;
}

.translate-btn.loading .btn-icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* 翻译结果卡片 */
.translation-result {
    background: white;
    border-left: 5px solid var(--color-coffee);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-md);
    animation: slideUpBounce 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes slideUpBounce {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    60% {
        transform: translateY(-5px) scale(1.02);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px dashed var(--border-color);
}

.result-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.result-content {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.8;
}

/* ========== 管理视图 ========== */
.manage-container {
    max-width: 1200px;
    margin: 0 auto;
}

.search-section {
    background: white;
    padding: var(--spacing-sm);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-lg);
    border: 2px solid var(--border-color);
    transition: all var(--transition-base);
}

.search-section:focus-within {
    border-color: var(--color-sage);
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: scale(1.02);
}

.search-wrapper {
    display: flex;
    gap: var(--spacing-sm);
    align-items: center;
}

.search-input {
    flex: 1;
    padding: 0.9rem 1.5rem;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 500;
}

.search-input:focus {
    outline: none;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 2rem;
    background: var(--gradient-accent);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-bounce);
    box-shadow: 0 3px 0 var(--color-sage-dark);
    position: relative;
    overflow: hidden;
}

.search-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.search-btn:hover::after {
    width: 200px;
    height: 200px;
}

.search-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 5px 0 var(--color-sage-dark), var(--shadow-md);
}

.search-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 0 var(--color-sage-dark);
}

.search-btn .btn-icon {
    position: relative;
    z-index: 1;
    transition: transform var(--transition-bounce);
}

.search-btn:hover .btn-icon {
    transform: scale(1.3) rotate(-15deg);
}

/* 统计卡片 */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-card {
    background: linear-gradient(135deg, #fff 0%, #fcf9f2 100%);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-bounce);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(170, 179, 150, 0.2) 0%, transparent 70%);
    transition: all 0.5s;
}

.stat-card:hover::before {
    top: -20%;
    right: -20%;
    transform: scale(1.5);
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-sage);
}

.stat-value {
    color: var(--color-coffee);
    font-size: 2.8rem;
    font-weight: 900;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-bounce);
}

.stat-card:hover .stat-value {
    transform: scale(1.1);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: var(--spacing-xs);
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* 为第一个统计卡片添加点击提示 */
.stat-card:first-child::after {
    content: '👆 点击查看高频词';
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--color-sage-dark);
    opacity: 0;
    transition: opacity var(--transition-base);
    z-index: 2;
    font-weight: 600;
}

.stat-card:first-child:hover::after {
    opacity: 1;
}


/* 单词列表 */
.word-list {
    background: transparent;
    padding: 0;
    min-height: 400px;
}

.empty-state {
    text-align: center;
    padding: var(--spacing-xl);
    color: var(--text-muted);
    background: white;
    border-radius: var(--radius-lg);
    border: 2px dashed var(--border-color);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.6;
    animation: floatIcon 3s ease-in-out infinite;
}

.empty-hint {
    font-size: 0.95rem;
    margin-top: var(--spacing-xs);
}

.word-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--spacing-md);
}

.word-card {
    position: relative;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-bounce);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.word-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.word-card:hover::before {
    transform: scaleX(1);
}

.word-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-sage);
}

.word-card-word {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-coffee);
    margin-bottom: 0.3rem;
    transition: color var(--transition-base);
}

.word-card:hover .word-card-word {
    color: var(--color-sage-dark);
}

.word-card-translation {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 1rem;
}

.query-badge {
    position: absolute;
    top: 1px;
    right: -8px;
    background: var(--gradient-primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.3rem 0.6rem;
    border-radius: var(--radius-full);
    box-shadow: 0 2px 8px rgba(103, 70, 54, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

/* 单词详情弹窗 */
.word-detail {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 4px solid var(--color-coffee);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 0;
    box-shadow: 0 -8px 32px rgba(103, 70, 54, 0.2);
    max-height: 50vh;
    overflow: hidden;
    animation: slideUpDetail var(--transition-base);
    z-index: 100;
    display: flex;
    flex-direction: column;
}

@keyframes slideUpDetail {
    from {
        transform: translateY(100%);
    }

    to {
        transform: translateY(0);
    }
}

.detail-header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    margin: 0;
    background: white;
    border-bottom: 2px dashed var(--border-color);
    z-index: 10;
    flex-shrink: 0;
}

.detail-header h3 {
    font-size: 1.8rem;
    color: var(--text-primary);
}

.detail-content {
    color: var(--text-secondary);
    line-height: 1.8;
    padding: var(--spacing-lg);
    overflow-y: auto;
    flex: 1;
}

/* ========== 按钮 ========== */
.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-bounce);
}

.icon-btn:hover {
    color: var(--color-coffee);
    background: rgba(103, 70, 54, 0.1);
    transform: rotate(90deg) scale(1.2);
}

/* ========== 加载指示器 ========== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 248, 232, 0.95);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-md);
    z-index: 1000;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--color-beige);
    border-top-color: var(--color-coffee);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-overlay p {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.1rem;
    animation: pulse 1.5s ease-in-out infinite;
}

/* ========== 通知 ========== */
.toast-container {
    position: fixed;
    top: var(--spacing-lg);
    right: var(--spacing-lg);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.toast {
    background: white;
    border: 3px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.2rem 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25), 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 320px;
    animation: slideInRight 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.05rem;
    backdrop-filter: none;
    opacity: 1;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success {
    border: 3px solid var(--color-sage);
    background: #f0f4ec;
    color: #2d5016;
}

.toast.error {
    border: 3px solid #ef4444;
    background: #fef2f2;
    color: #991b1b;
}

.toast.info {
    border: 3px solid var(--color-coffee);
    background: #fef8f0;
    color: #5c3d2e;
}

/* ========== 模态框 ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(103, 70, 54, 0.4);
    backdrop-filter: blur(10px);
    z-index: 3000;
    padding: var(--spacing-lg);
    overflow-y: auto;
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn var(--transition-base);
}

.modal-content {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    animation: scaleIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-secondary);
}

.modal-header h2 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    background: var(--bg-tertiary);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
}

.form-input {
    width: 100%;
    padding: 0.9rem 1.2rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.form-input:focus {
    outline: none;
    background: white;
    border-color: var(--color-sage);
    box-shadow: 0 0 0 4px rgba(170, 179, 150, 0.15);
}

.form-hint {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: var(--spacing-xs);
}

.btn {
    padding: 0.9rem 2rem;
    border: none;
    border-radius: var(--radius-sm);
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-bounce);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--color-cream);
    box-shadow: 0 4px 0 var(--color-coffee-dark);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 0 var(--color-coffee-dark), var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 0 var(--color-coffee-dark);
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--color-sage);
    border-radius: var(--radius-sm);
    transition: background var(--transition-base);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-sage-dark);
}

/* ========== 选中文本 ========== */
::selection {
    background: var(--color-sage);
    color: white;
}

/* ========== 工具类 ========== */
.hidden {
    display: none !important;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .app-title {
        font-size: 1.5rem;
    }

    .header-content {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-tabs {
        width: 100%;
    }

    .tab-btn {
        flex: 1;
        justify-content: center;
    }

    .word-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .search-wrapper {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
        justify-content: center;
    }
}