/* Chinese Degen Dictionary - Professional UI */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #e2e8f0;
    background: linear-gradient(135deg, #0a0b0f 0%, #0f1115 50%, #1a1d23 100%);
    min-height: 100vh;
    font-weight: 400;
    overflow-x: hidden;
}

.dictionary-container {
    max-width: 1400px;
    margin: 0 auto;
    background: linear-gradient(145deg, #1a1d23 0%, #0f1115 100%);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    overflow: hidden;
    margin-top: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.dictionary-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 208, 0.03) 0%, rgba(255, 0, 127, 0.03) 100%);
    pointer-events: none;
    border-radius: 20px;
}

/* Professional Header Section */
.toc-section {
    padding: 80px 60px;
    background: linear-gradient(145deg, #1a1d23 0%, #0f1115 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.toc-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 208, 0.02) 0%, rgba(255, 0, 127, 0.02) 100%);
    pointer-events: none;
}

.toc-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(0, 255, 208, 0.03) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255, 0, 127, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.toc-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.dictionary-title {
    font-size: 4rem;
    font-weight: 800;
    color: #ffffff;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.02em;
    line-height: 1.1;
    background: linear-gradient(135deg, #00FFD0 0%, #ffffff 50%, #00FFD0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.dictionary-subtitle {
    font-size: 2rem;
    font-weight: 500;
    color: #00FFD0;
    margin-bottom: 20px;
    font-style: normal;
    letter-spacing: -0.01em;
    text-shadow: 0 0 10px rgba(0, 255, 208, 0.3);
    background: linear-gradient(135deg, #00FFD0 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dictionary-description {
    font-size: 1.3rem;
    color: #94a3b8;
    font-weight: 400;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.language-badge {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: rgba(0, 255, 208, 0.1);
    color: #00FFD0;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(0, 255, 208, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.badge:hover {
    box-shadow: 0 4px 12px rgba(0, 255, 208, 0.2);
    transform: translateY(-1px);
}

.toc-description {
    text-align: center;
    color: #94a3b8;
    font-size: 1.1rem;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.toc-content h3 {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
    position: relative;
    z-index: 2;
}

.toc-column h4 {
    font-size: 1.4rem;
    color: #00FFD0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #00FFD0;
    font-weight: 600;
    text-shadow: 0 0 8px rgba(0, 255, 208, 0.2);
}

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

.toc-list li {
    margin-bottom: 12px;
}

.toc-list a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 12px 16px;
    border-radius: 12px;
    display: block;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.toc-list a:hover {
    background: rgba(0, 255, 208, 0.1);
    color: #00FFD0;
    transform: translateX(6px) translateY(-1px);
    border-left-color: #00FFD0;
    box-shadow: 0 4px 15px rgba(0, 255, 208, 0.2);
    border: 1px solid rgba(0, 255, 208, 0.2);
    text-shadow: 0 0 5px rgba(0, 255, 208, 0.3);
}

/* Professional Entry Pages */
.entries-container {
    padding: 0;
}

.entry-page {
    display: none;
    padding: 80px 60px;
    min-height: 90vh;
    background: linear-gradient(145deg, #1a1d23 0%, #0f1115 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.entry-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 20%, rgba(0, 255, 208, 0.02) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(255, 0, 127, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.entry-page:target {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

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

.entry-header {
    text-align: center;
    margin-bottom: 60px;
    padding: 50px 40px;
    background: linear-gradient(145deg, #1a1d23 0%, #0f1115 100%);
    color: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(20px);
}

.entry-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 255, 208, 0.03) 0%, rgba(255, 0, 127, 0.03) 100%);
    border-radius: 20px;
    pointer-events: none;
}

.term-english {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #ffffff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.term-chinese {
    font-size: 2.5rem;
    font-weight: 500;
    margin-bottom: 10px;
    color: #00FFD0;
    text-shadow: 0 0 8px rgba(0, 255, 208, 0.3);
    position: relative;
    z-index: 1;
}

.term-pinyin {
    font-size: 1.3rem;
    font-weight: 300;
    color: #94a3b8;
    font-style: italic;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.term-category {
    display: inline-block;
    background: rgba(0, 255, 208, 0.1);
    color: #00FFD0;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 20px;
    border: 1px solid rgba(0, 255, 208, 0.2);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.english-explanation, .context-note, .english-tips {
    background: rgba(11, 12, 16, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 24px;
    margin-top: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.english-explanation {
    border-left: 4px solid #10b981;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05) 0%, rgba(11, 12, 16, 0.8) 100%);
}

.context-note {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.05) 0%, rgba(11, 12, 16, 0.8) 100%);
}

.english-tips {
    border-left: 4px solid #f59e0b;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05) 0%, rgba(11, 12, 16, 0.8) 100%);
}

.english-explanation strong, .context-note strong, .english-tips strong {
    color: #ffffff;
    font-weight: 600;
}

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

.definition, .example, .usage-tips {
    margin-bottom: 40px;
    padding: 35px;
    background: rgba(11, 12, 16, 0.8);
    border-radius: 20px;
    border-left: 5px solid #00FFD0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    z-index: 2;
}

.definition h3, .example h3, .usage-tips h3 {
    font-size: 1.5rem;
    color: #00FFD0;
    margin-bottom: 25px;
    font-weight: 600;
    display: flex;
    align-items: center;
    text-shadow: 0 0 10px rgba(0, 255, 208, 0.3);
}

.definition h3::before, .example h3::before, .usage-tips h3::before {
    content: "📖";
    margin-right: 12px;
    font-size: 1.3rem;
}

.definition p, .example p, .usage-tips p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #94a3b8;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.english-def {
    font-style: italic;
    color: #94a3b8;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    margin-top: 20px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chinese-example, .english-example {
    font-size: 1.2rem;
    padding: 20px;
    background: rgba(11, 12, 16, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 15px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.chinese-example {
    color: #00FFD0;
    font-weight: 500;
    border-left: 3px solid #00FFD0;
    text-shadow: 0 0 5px rgba(0, 255, 208, 0.3);
}

.english-example {
    color: #94a3b8;
    font-style: italic;
    border-left: 3px solid #FF007F;
}

.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 60px;
    padding: 40px;
    background: rgba(11, 12, 16, 0.8);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    background: linear-gradient(135deg, #00FFD0 0%, #FF007F 100%);
    color: #0B0C10;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 255, 208, 0.3);
    border: 1px solid rgba(0, 255, 208, 0.3);
    backdrop-filter: blur(10px);
    font-size: 0.95rem;
    text-shadow: none;
}

.nav-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 255, 208, 0.5);
    color: #0B0C10;
    text-decoration: none;
    background: linear-gradient(135deg, #00FFD0 0%, #FF007F 100%);
    box-shadow: 0 0 30px rgba(0, 255, 208, 0.6);
}

.nav-link:active {
    transform: translateY(-1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .dictionary-container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .toc-section, .entry-page {
        padding: 30px 20px;
    }
    
    .dictionary-title {
        font-size: 2.5rem;
    }
    
    .dictionary-subtitle {
        font-size: 1.4rem;
    }
    
    .term-english {
        font-size: 2.5rem;
    }
    
    .term-chinese {
        font-size: 2rem;
    }
    
    .toc-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .entry-footer {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .dictionary-title {
        font-size: 2rem;
    }
    
    .term-english {
        font-size: 2rem;
    }
    
    .term-chinese {
        font-size: 1.5rem;
    }
    
    .definition, .example, .usage-tips {
        padding: 20px;
    }
}

/* 特殊效果 */
.entry-page:target .entry-header {
    animation: slideInFromTop 0.6s ease-out;
}

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

/* Premium Neon Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: rgba(11, 12, 16, 0.8);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #00FFD0 0%, #FF007F 100%);
    border-radius: 6px;
    border: 2px solid rgba(11, 12, 16, 0.8);
    box-shadow: 0 0 10px rgba(0, 255, 208, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #00FFD0 0%, #FF007F 100%);
    box-shadow: 0 0 15px rgba(0, 255, 208, 0.5);
}

/* Professional Search Styling */
.search-container {
    margin-bottom: 40px;
    padding: 35px;
    background: linear-gradient(145deg, #1a1d23 0%, #0f1115 100%);
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    position: relative;
    z-index: 2;
}

.search-box {
    display: flex;
    gap: 12px;
    margin-bottom: 25px;
    align-items: center;
}

#searchInput {
    flex: 1;
    padding: 18px 24px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
    background: rgba(11, 12, 16, 0.8);
    color: #ffffff;
    backdrop-filter: blur(10px);
}

#searchInput:focus {
    border-color: #00FFD0;
    background: rgba(11, 12, 16, 0.9);
    box-shadow: 0 0 0 3px rgba(0, 255, 208, 0.2);
}

#searchInput::placeholder {
    color: #94a3b8;
}

#searchBtn, #clearSearchBtn {
    padding: 18px 28px;
    background: linear-gradient(135deg, #00FFD0 0%, #00d4aa 100%);
    color: #0B0C10;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: 60px;
    border: 1px solid rgba(0, 255, 208, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 255, 208, 0.2);
}

#searchBtn:hover, #clearSearchBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 255, 208, 0.3);
    background: linear-gradient(135deg, #00FFD0 0%, #00d4aa 100%);
}

.search-results {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(11, 12, 16, 0.8);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(20px);
}

.search-result-item {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: #94a3b8;
}

.search-result-item:hover {
    background: rgba(0, 255, 208, 0.05);
    transform: translateX(4px);
    color: #00FFD0;
    text-shadow: 0 0 3px rgba(0, 255, 208, 0.2);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item strong {
    color: #00FFD0;
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 0 3px rgba(0, 255, 208, 0.2);
}

.search-result-item small {
    color: #94a3b8;
    font-size: 0.9rem;
}

/* Professional Navigation Enhancements */
.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    font-size: 0.95rem;
}

.nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

.nav-link:active {
    transform: translateY(0);
}

/* Enhanced Entry Pages */
.entry-page {
    display: none;
    padding: 80px 60px;
    min-height: 90vh;
    background: linear-gradient(145deg, #1a1d23 0%, #0f1115 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.entry-page:target {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

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

/* Professional Footer */
.entry-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 60px;
    padding: 40px;
    background: rgba(11, 12, 16, 0.8);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 打印样式 */
@media print {
    body {
        background: white;
    }
    
    .dictionary-container {
        box-shadow: none;
        border-radius: 0;
        margin: 0;
    }
    
    .entry-page {
        display: block;
        page-break-after: always;
        padding: 20px;
    }
    
    .nav-link {
        display: none;
    }
}
