/* Minecraft Translator - 样式文件 */

/* 基础设置 */
.translator-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    background: rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border-radius: 5px;
    border: 1px solid var(--minecraft-secondary);
}

.translator-input, .translator-output {
    flex: 1;
    min-width: 300px;
}

/* 输入区域 */
.translator-input h3, .translator-output h3 {
    margin-bottom: 1.5rem;
    color: var(--minecraft-green);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.input-area {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 4px;
    border-left: 3px solid var(--minecraft-green);
}

#input-text {
    width: 100%;
    height: 150px;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid var(--minecraft-secondary);
    color: #E0E0E0;
    font-family: 'Noto Sans', sans-serif;
    font-size: 1.1rem;
    resize: vertical;
    line-height: 1.5;
    border-radius: 3px;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

#input-text:focus {
    border-color: var(--minecraft-green);
    outline: none;
    box-shadow: 0 0 0 2px rgba(59, 133, 38, 0.3);
}

.input-options {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.translation-mode label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--minecraft-green);
    font-weight: bold;
}

.mode-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.mode-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0.8rem;
    color: #E0E0E0;
    font-family: 'Minecraft', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 3px;
    flex-grow: 1;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.mode-btn.active {
    background: var(--minecraft-green);
    color: white;
}

.translation-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.translation-options label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #E0E0E0;
}

#translate-btn {
    width: 100%;
    padding: 0.8rem;
    font-size: 1.2rem;
    background: var(--minecraft-green);
    border: none;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#translate-btn:hover {
    background: #4CAF50;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* 按钮禁用样式 */
#translate-btn:disabled,
#translate-btn.btn-disabled {
    background: #2c632e;
    color: rgba(255, 255, 255, 0.6);
    transform: none;
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.7;
    pointer-events: none;
}

/* 输出区域 */
.translator-output {
    position: relative;
}

.loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    border-radius: 4px;
    z-index: 10;
}

.loading-indicator.hidden {
    display: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--minecraft-green);
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.output-area {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 4px;
    min-height: 200px;
    color: #E0E0E0;
    border-left: 3px solid #FFFF55;
    margin-bottom: 1rem;
    font-family: 'Noto Sans', sans-serif;
    line-height: 1.6;
}

.placeholder-text {
    color: #777;
    font-style: italic;
    text-align: center;
    padding: 2rem 0;
}

.translation-result {
    margin-bottom: 1.5rem;
}

.translation-result-item {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
}

.translation-result-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* 原文样式 - 使用浅黄色 */
.original-term {
    font-weight: bold;
    color: #FFFF55; /* 鲜明的黄色 */
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    padding: 0.5rem;
    background: rgba(255, 255, 0, 0.05);
    border-radius: 3px;
    border-left: 3px solid #FFFF55;
}

/* 译文样式 - 使用绿色 */
.translated-term {
    color: #55FF55; /* 鲜明的绿色 */
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    padding: 0.5rem;
    background: rgba(85, 255, 85, 0.05);
    border-radius: 3px;
    border-left: 3px solid #55FF55;
}

/* 解释样式 - 使用青色 */
.explanation-term {
    color: #55FFFF; /* 鲜明的青色 */
    margin-bottom: 0.5rem;
    font-size: 1rem;
    line-height: 1.5;
    padding: 0.5rem;
    background: rgba(85, 255, 255, 0.05);
    border-radius: 3px;
    border-left: 3px solid #55FFFF;
}

/* 上下文/注释样式 - 使用灰色 */
.term-context {
    font-size: 0.9rem;
    color: #AAAAAA;
    font-style: italic;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
    border-left: 3px solid #888888;
    line-height: 1.4;
}

/* Minecraft专用词汇关键词高亮 - 使用浅橙色 */
.minecraft-keyword {
    color: #FFAA00; /* 橙色 */
    font-weight: bold;
    background: rgba(255, 170, 0, 0.1);
    padding: 0 3px;
    border-radius: 3px;
    display: inline-block;
    border-bottom: 1px dotted #FFAA00;
}

/* 上下文中的注意事项高亮 */
.context-note {
    color: #FF55FF; /* 粉色 */
    font-weight: bold;
}

.term-alternatives {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dotted rgba(255, 255, 255, 0.1);
}

.term-alternatives-title {
    font-size: 0.9em;
    color: #AAA;
    margin-bottom: 0.3rem;
}

.alternative-item {
    display: inline-block;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.2rem 0.5rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 3px;
    font-size: 0.9em;
}

.translation-actions {
    display: flex;
    gap: 1rem;
}

.translation-actions.hidden {
    display: none;
}

.translation-actions button {
    flex: 1;
    padding: 0.6rem 1rem;
}

.clear-btn {
    background: #555;
}

.clear-btn:hover {
    background: #777;
}

/* 词汇库部分 */
.dictionary-section {
    background: rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--minecraft-secondary);
}

.dictionary-section h3 {
    margin-bottom: 1.5rem;
    color: var(--minecraft-green);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.dictionary-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.dict-tab {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #E0E0E0;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-radius: 3px;
}

.dict-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.dict-tab.active {
    background: var(--minecraft-green);
    color: white;
}

.dictionary-content {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem;
    border-radius: 4px;
    min-height: 200px;
    color: #E0E0E0;
    border-left: 3px solid var(--minecraft-green);
}

.dictionary-table {
    width: 100%;
    border-collapse: collapse;
}

.dictionary-table th,
.dictionary-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dictionary-table th {
    color: var(--minecraft-green);
    font-weight: bold;
}

.dictionary-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

.dictionary-loading {
    text-align: center;
    padding: 2rem;
    color: #777;
}

.dictionary-loading.hidden {
    display: none;
}

/* 说明部分 */
.instructions {
    background: rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--minecraft-secondary);
}

.instructions h3 {
    margin-bottom: 1.5rem;
    color: var(--minecraft-green);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.instructions ol {
    margin-left: 1.5rem;
    margin-bottom: 2rem;
}

.instructions li {
    margin-bottom: 0.8rem;
    color: #E0E0E0;
}

.info-box {
    background: rgba(59, 133, 38, 0.15);
    border-left: 3px solid var(--minecraft-green);
    padding: 1.2rem;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-icon {
    font-size: 1.8rem;
    line-height: 1;
    animation: float 3s infinite alternate ease-in-out;
}

.info-content h4 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--minecraft-green);
}

.info-content p {
    margin-bottom: 0.5rem;
    color: #E0E0E0;
}

.info-content p:last-child {
    margin-bottom: 0;
}

.info-content a {
    color: #FFFF55;
    text-decoration: underline;
    transition: all 0.2s ease;
}

.info-content a:hover {
    color: #FFFFAA;
}

@keyframes float {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

/* 词汇对照表部分 */
.terminology-reference {
    background: rgba(0, 0, 0, 0.1);
    padding: 2rem;
    border-radius: 5px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--minecraft-secondary);
}

.terminology-reference h3 {
    margin-bottom: 1rem;
    color: var(--minecraft-green);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.terminology-intro {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #ccc;
}

.terminology-intro a {
    color: #FFFF55;
    text-decoration: underline;
}

.terminology-intro a:hover {
    color: #FFFFAA;
}

.terminology-navigation {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 1rem;
    border-radius: 4px;
}

.terminology-nav-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #E0E0E0;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    border-radius: 3px;
}

.terminology-nav-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.terminology-nav-btn.active {
    background: var(--minecraft-green);
    color: white;
}

.terminology-content {
    margin-top: 1rem;
}

.terminology-section {
    display: none;
    animation: fade-in 0.3s ease-in-out;
}

.terminology-section.active {
    display: block;
}

.terminology-section h4 {
    color: var(--minecraft-green);
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.terminology-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
}

.terminology-table th,
.terminology-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.terminology-table th {
    color: var(--minecraft-green);
    font-weight: bold;
    background: rgba(0, 0, 0, 0.2);
}

.terminology-table tr:hover td {
    background: rgba(255, 255, 255, 0.05);
}

/* 其他样式 */
header {
    text-align: center;
    padding: 2rem 0;
    margin-bottom: 2rem;
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

header .minecraft-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--minecraft-green);
    text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.5);
    letter-spacing: 2px;
    animation: title-glow 2s infinite alternate;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.header-icon {
    height: 40px;
    width: auto;
    animation: bounce 2s infinite alternate ease-in-out;
    margin-bottom: 5px;
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-5px); }
}

header .subtitle {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 0;
}

@keyframes title-glow {
    from {
        text-shadow: 0 0 5px rgba(59, 133, 38, 0.5);
    }
    to {
        text-shadow: 0 0 15px rgba(59, 133, 38, 0.8);
    }
}

/* 错误消息样式 */
.error-message {
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border-left: 3px solid #ff6b6b;
    padding: 1rem;
    border-radius: 3px;
    margin-bottom: 1rem;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .translator-container {
        flex-direction: column;
        padding: 1rem;
    }
    
    .dictionary-tabs,
    .terminology-navigation {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .dict-tab,
    .terminology-nav-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    header .minecraft-title {
        font-size: 2rem;
    }
    
    header .subtitle {
        font-size: 1rem;
    }
    
    .header-icon {
        height: 30px;
    }
}

@media (min-width: 992px) and (max-width: 1199px) {
    .mode-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
    }
}

@media (min-width: 1200px) {
    .translator-container {
        gap: 3rem;
    }
    
    .input-area, .output-area {
        padding: 2rem;
    }
    
    #input-text {
        height: 180px;
    }
    
    .terminology-table {
        font-size: 1.1rem;
    }
}

/* 动画效果 */
.highlight-animation {
    animation: highlight 1s ease;
}

@keyframes highlight {
    0% { background-color: rgba(255, 255, 85, 0.2); }
    100% { background-color: transparent; }
} 

@media (max-width: 768px) {
    .mode-selector {
        gap: 0.3rem;
        justify-content: center;
    }

    .mode-btn {
        font-size: 0.75rem;
        padding: 0.4rem 0.5rem;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .mode-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .mode-btn {
        width: 100%;
        margin-bottom: 0.3rem;
        padding: 0.5rem;
    }
} 