/* 中国水墨风样式主题 */

:root {
    --ink-black: #1a1a1a;
    --ink-gray: #5a5a5a;
    --ink-light: #8a8a8a;
    --paper-white: #faf8f3;
    --paper-cream: #f5f2e8;
    --bamboo-green: #4a6741;
    --plum-pink: #8b4513;
    --seal-red: #8b0000;
}

body {
    background: var(--paper-white);
    background-image:
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 100px,
            rgba(0, 0, 0, 0.03) 100px,
            rgba(0, 0, 0, 0.03) 101px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 100px,
            rgba(0, 0, 0, 0.03) 100px,
            rgba(0, 0, 0, 0.03) 101px
        );
}

.container {
    background: var(--paper-cream);
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.1);
}

.header {
    border-bottom: 3px solid var(--ink-black);
    position: relative;
    margin-bottom: 50px;
}

.header::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--seal-red);
}

.title {
    font-family: 'KaiTi', '楷体', serif;
    font-size: 3em;
    color: var(--ink-black);
    letter-spacing: 0.2em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.subtitle {
    font-family: '宋体', 'SimSun', serif;
    color: var(--ink-gray);
    font-style: italic;
    letter-spacing: 0.1em;
}

.input-section,
.file-section,
.download-section,
.settings-section {
    background: white;
    border: 2px solid var(--ink-light);
    border-radius: 0;
    box-shadow: 5px 5px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

.input-section::before,
.file-section::before,
.download-section::before,
.settings-section::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px solid var(--ink-black);
    pointer-events: none;
}

.form-control {
    border: 2px solid var(--ink-light);
    background: white;
    border-radius: 0;
    font-family: '宋体', 'SimSun', serif;
}

.form-control:focus {
    border-color: var(--bamboo-green);
    box-shadow: 0 0 8px rgba(74, 103, 65, 0.3);
}

.btn {
    border-radius: 0;
    font-family: '黑体', 'SimHei', sans-serif;
    font-weight: bold;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--bamboo-green);
    border-color: var(--bamboo-green);
    color: white;
}

.btn-primary:hover {
    background: var(--paper-white);
    color: var(--bamboo-green);
}

.btn-success {
    background: var(--plum-pink);
    border-color: var(--plum-pink);
    color: white;
}

.btn-success:hover {
    background: var(--paper-white);
    color: var(--plum-pink);
}

.btn-secondary {
    background: var(--ink-gray);
    border-color: var(--ink-gray);
    color: white;
}

.btn-secondary:hover {
    background: var(--paper-white);
    color: var(--ink-gray);
}

.file-item {
    border-bottom: 1px solid #e8e8e8;
    position: relative;
}

.file-item:hover {
    background: linear-gradient(90deg, transparent, rgba(74, 103, 65, 0.05), transparent);
}

.file-item:last-child {
    border-bottom: 2px solid var(--ink-black);
}

.file-icon {
    font-family: '宋体', 'SimSun', serif;
    color: var(--bamboo-green);
}

.file-name {
    font-family: '黑体', 'SimHei', sans-serif;
    color: var(--ink-black);
}

.file-size,
.file-date {
    font-family: '宋体', 'SimSun', serif;
    color: var(--ink-light);
}

.link-item {
    background: linear-gradient(135deg, #f8f8f8, #f0f0f0);
    border: 1px solid var(--ink-light);
    position: relative;
}

.link-item::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px;
    bottom: 5px;
    border: 1px dashed var(--ink-light);
}

.link-name {
    font-family: '黑体', 'SimHei', sans-serif;
    color: var(--ink-black);
}

.link-url {
    font-family: 'Courier New', monospace;
    color: var(--bamboo-green);
}

.breadcrumb {
    font-family: '宋体', 'SimSun', serif;
    color: var(--ink-gray);
    border-left: 3px solid var(--bamboo-green);
    padding-left: 15px;
}

.toast {
    background: var(--ink-black);
    border: 1px solid var(--ink-light);
    border-radius: 0;
    font-family: '黑体', 'SimHei', sans-serif;
}

.toast.success {
    background: var(--bamboo-green);
}

.toast.error {
    background: var(--seal-red);
}

.toast.warning {
    background: #d35400;
}

.admin-link a {
    background: var(--ink-black);
    border: 1px solid var(--ink-light);
    font-family: '宋体', 'SimSun', serif;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.admin-link a:hover {
    background: var(--ink-gray);
}

/* 水墨画装饰元素 */
.header::before {
    content: '萌';
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: '楷体', 'KaiTi', serif;
    font-size: 1.5em;
    color: var(--seal-red);
    opacity: 0.8;
    transform: rotate(-15deg);
}

/* 印章效果 */
.input-section::after,
.file-section::after,
.download-section::after,
.settings-section::after {
    content: '解析';
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-family: '篆书', '篆书', serif;
    font-size: 1.2em;
    color: var(--seal-red);
    opacity: 0.6;
    transform: rotate(-5deg);
    pointer-events: none;
}

/* 毛笔字标题效果 */
.title {
    position: relative;
}

.title::after {
    content: attr(data-english);
    position: absolute;
    bottom: -15px;
    right: 0;
    font-family: 'Times New Roman', serif;
    font-size: 0.3em;
    color: var(--ink-light);
    font-style: italic;
    letter-spacing: 0.1em;
}

/* 传统花纹边框 */
@media (min-width: 1200px) {
    .container {
        border: 8px solid transparent;
        border-image: repeating-linear-gradient(
            45deg,
            var(--ink-black),
            var(--ink-black) 10px,
            transparent 10px,
            transparent 20px
        ) 8;
    }
}

/* 滚动条水墨风格 */
.file-list::-webkit-scrollbar {
    width: 8px;
}

.file-list::-webkit-scrollbar-track {
    background: var(--paper-cream);
}

.file-list::-webkit-scrollbar-thumb {
    background: var(--ink-gray);
    border-radius: 0;
}

.file-list::-webkit-scrollbar-thumb:hover {
    background: var(--ink-black);
}