/* Academic Dictionary Archive Styles */
:root {
    --td-gold: #D4AF37;
    --td-deep-blue: #003366;
    --td-bg: #FDFDFD;
    --td-text: #333;
    --td-text-mute: #888;
}

.td-archive-main {
    background: var(--td-bg);
    padding: 60px 0;
    min-height: 100vh;
    font-family: 'Source Serif 4', serif !important;
    font-size: 17px;
    line-height: 1.7;
}

.td-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.td-archive-header {
    text-align: center;
    margin-bottom: 50px;
}

.td-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 32px !important;
    color: var(--td-deep-blue);
    margin-bottom: 10px;
    font-weight: 700;
    line-height: 1.3 !important;
}

.td-subtitle {
    color: var(--td-text-mute);
    font-size: 18px;
    font-family: sans-serif;
}

/* Sticky Alphabet Bar */
.td-alphabet-wrapper {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    margin-bottom: 40px;
    border-bottom: 1px solid #eee;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.td-alphabet-index {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 15px 0;
    gap: 5px;
}

.td-alpha-item {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--td-deep-blue);
    font-weight: 600;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.2s;
    font-family: sans-serif;
}

.td-alpha-item:hover, .td-alpha-item.active {
    background: var(--td-gold);
    color: #fff;
}

.td-alpha-item.disabled {
    color: #ccc;
    cursor: default;
}

/* Grid & Cards */
.td-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 40px;
}

.td-card {
    display: block;
    background: #fff;
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 12px;
    text-decoration: none;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.td-card:hover {
    transform: translateY(-5px);
    border-color: var(--td-gold);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* Gold Stamp Initial */
.td-card-stamp {
    position: absolute;
    top: -15px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: var(--td-gold);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 800;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
    border: 3px solid #fff;
    font-family: sans-serif;
}

.td-card-titles {
    margin-top: 10px;
    margin-bottom: 15px;
}

.td-card-en-title {
    display: block;
    font-family: 'Playfair Display', serif !important;
    font-size: 16px !important;
    color: var(--td-text-mute);
    font-style: italic;
    margin-bottom: 5px;
}

.td-card-title {
    font-family: 'Playfair Display', serif !important;
    font-size: 21px !important;
    color: var(--td-deep-blue);
    font-weight: 700;
    margin: 0;
    line-height: 1.35 !important;
}

.td-card-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    opacity: 0.8;
}

/* Search Bar Styles */
.td-search-wrapper {
    max-width: 600px;
    margin: 0 auto 40px;
    position: relative;
    z-index: 10;
}

.td-search-form {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100% !important;
    height: 50px !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05) !important;
}

.td-search-input {
    flex: 1 !important;
    height: 50px !important;
    border: 1px solid #eee !important;
    border-right: none !important;
    border-radius: 8px 0 0 8px !important;
    padding: 0 20px !important;
    font-size: 16px !important;
    background: #fff !important;
    margin: 0 !important;
    outline: none !important;
    transition: all 0.2s !important;
    box-shadow: none !important;
    line-height: 50px !important;
    font-family: sans-serif !important;
}

.td-search-input:focus {
    border-color: var(--td-gold) !important;
    background: #fff !important;
}

.td-search-btn {
    background: var(--td-deep-blue) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 0 8px 8px 0 !important;
    padding: 0 25px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 50px !important;
    width: auto !important;
    margin: 0 !important;
    transition: background 0.2s !important;
    text-transform: none !important;
    box-shadow: none !important;
}

.td-search-btn:hover {
    background: #002244 !important;
}

.td-search-btn svg {
    width: 20px !important;
    height: 20px !important;
    fill: #fff !important;
    display: block !important;
}

.td-search-results {
    position: absolute;
    top: 55px;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: none;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .td-title { font-size: 24px !important; }
    .td-grid { gap: 25px; }
    .td-alphabet-index { padding: 10px 0; }
}
