/* css/search.css (已更新) */
.main-search {
    padding: 80px 20px 60px;
    min-height: calc(100vh - 80px - 70px);
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.main-search .container {
    max-width: 1200px;
}

.main-search h2 {
    text-align: center;
    font-size: 2.3rem;
    margin-bottom: 10px;
}

.main-search .subtitle {
    text-align: center;
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

/* 新增：全局搜索栏样式 */
.search-bar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

#global-search {
    flex: 1;
    max-width: 500px;
    padding: 12px 15px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 25px;
    font-size: 1rem;
    backdrop-filter: blur(5px);
}

#global-search::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#global-search:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

#search-btn {
    padding: 0 25px;
    background: #d32f2f;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
}

#search-btn:hover {
    background: #b71c1c;
}

/* 方言种类标签样式 (保持不变) */
.dialect-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn-dialect {
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s;
    
}

.tab-btn-dialect[data-dialect="northeast"] {
    background: linear-gradient(45deg, #d32f2f, #ff5722);
}

.tab-btn-dialect[data-dialect="wenzhou"] {
    background: linear-gradient(45deg, #2196f3, #03a9f4);
}

.tab-btn-dialect:hover,
.tab-btn-dialect.active {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* 词性分类标签样式 (保持不变) */
.category-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.tab-btn-category {
    padding: 8px 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    color: white;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.tab-btn-category:hover,
.tab-btn-category.active {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    transform: translateY(-2px);
}

/* 词汇列表样式 (保持不变) */
.word-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
}

.word-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.word-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.word-card h3 {
    font-size: 1.3rem;
    margin-bottom: 5px;
    color: #ffeb3b;
}

.word-card p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* 详情弹窗样式 (保持不变) */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    color: #333;
    backdrop-filter: blur(10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close:hover {
    color: #000;
}

#word-detail h2 {
    color: #d32f2f;
    margin-bottom: 15px;
    text-align: center;
}

.detail-row {
    margin-bottom: 12px;
}

.detail-row strong {
    display: inline-block;
    width: 100px;
    font-weight: 600;
}

.detail-row .example {
    font-style: italic;
    color: #555;
}
/* === AI 检索专用样式 === */

.ai-input-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

#input-text {
    width: 100%;
    max-width: 600px;
    height: 120px;
    padding: 15px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 16px;
    font-size: 1.1rem;
    resize: vertical;
    backdrop-filter: blur(5px);
}

#input-text::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

#input-text:focus {
    outline: none;
    border-color: white;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
}

.input-controls {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 600px;
    justify-content: center;
    flex-wrap: wrap;
}

#source-dialect {
    padding: 10px 16px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    color: black;
    border-radius: 25px;
    font-size: 1rem;
    backdrop-filter: blur(5px);
}

#translate-btn {
    padding: 10px 28px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

#translate-btn:hover {
    background: #388e3c;
}

.loading, .error-message {
    text-align: center;
    margin-top: 20px;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 1rem;
}

.loading {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.error-message {
    background: rgba(244, 67, 54, 0.2);
    color: white;
    border: 1px solid #f44336;
}

.hidden {
    display: none !important;
}

.result-container {
    width: 100%;
    /* max-width: 600px; */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 20px;
    margin-top: 20px;
}

.result-container h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #ffeb3b;
}

.result-item {
    display: flex;
    margin-bottom: 18px;
    gap: 15px;
}

.dialect-label {
    font-weight: bold;
    min-width: 80px;
    padding: 6px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.2);
    text-align: center;
}

.dialect-label.northeast {
    background: linear-gradient(45deg, #d32f2f, #ff5722);
    color: white;
}

.dialect-label.wenzhou {
    background: linear-gradient(45deg, #2196f3, #03a9f4);
    color: white;
}

.result-text {
    flex: 1;
    padding: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    color: white;
}
/* === 信息卡片通用样式 === */
.info-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
  color: white;
}

.info-card h4 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #ffeb3b;
  font-size: 1.2rem;
}

/* 翻译网格 */
.translation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.translation-item {
  display: flex;
  flex-direction: column;
}

.dialect-tag {
  font-size: 0.85rem;
  font-weight: bold;
  text-align: center;
  padding: 4px 8px;
  border-radius: 6px;
  margin-bottom: 8px;
  background: rgba(255, 255, 255, 0.2);
}

.dialect-tag.mandarin { background: rgba(76, 175, 80, 0.3); }
.dialect-tag.northeast { background: linear-gradient(45deg, #d32f2f, #ff5722); color: white; }
.dialect-tag.wenzhou { background: linear-gradient(45deg, #2196f3, #03a9f4); color: white; }

.translation-text {
  flex: 1;
  padding: 10px;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  font-size: 1.1rem;
  word-break: break-word;
}

/* 标签列表 */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-list span {
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.95rem;
}

/* 例句列表 */
.example-list {
  padding-left: 20px;
  margin: 0;
}

.example-list li {
  margin-bottom: 8px;
  line-height: 1.5;
}