/* 翻译页面样式 */
.translate-container {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* PC端优化 */
@media (min-width: 1024px) {
    .translate-container {
        max-width: 1400px;
        padding: 40px;
    }

    .translate-content {
        gap: 30px;
    }

    .source-textarea,
    .target-textarea {
        height: 250px;
        font-size: 16px;
        padding: 15px;
    }

    .translate-button {
        padding: 18px 30px;
        font-size: 18px;
    }

    .token-input,
    .lang-select {
        font-size: 16px;
        padding: 12px;
    }
}

.header {
    text-align: center;
    margin-bottom: 30px;
    width: 100%;
    max-width: 100%;
}

.header h1 {
    font-size: 2.8rem;
    background: linear-gradient(90deg, #3498db, #8e44ad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 15px;
    font-weight: bold;
}

.header p {
    font-size: 1.2rem;
    color: #555;
    margin: 0;
    line-height: 1.7;
}

.translate-form {
    margin-top: 20px;
    width: 100%;
    max-width: 100%;
}

.token-section {
    margin-bottom: 20px;
}

.token-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.token-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
}

.language-section {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.language-select {
    flex: 1;
}

.language-select label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.lang-select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    outline: none;
    background-color: #fff;
}

.language-swap {
    margin-top: 20px;
}

.swap-button {
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: #666;
    transition: all 0.3s;
}

.swap-button:hover {
    background-color: #e0e0e0;
    color: #333;
}

.translate-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: start;
}

.input-section,
.output-section {
    display: flex;
    flex-direction: column;
}

.input-section label,
.output-section label {
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.source-textarea,
.target-textarea {
    width: 100%;
    height: 200px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    outline: none;
    font-family: inherit;
}

.target-textarea {
    background-color: #f9f9f9;
}

.text-info {
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    text-align: right;
}

.translate-action {
    display: flex;
    align-items: center;
    justify-content: center;
}

.translate-button {
    padding: 15px 25px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s;
    white-space: nowrap;
}

.translate-button:hover {
    background-color: #ff5252;
}

.translate-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.result-actions {
    margin-top: 10px;
    display: flex;
    gap: 10px;
}

.action-button {
    padding: 8px 15px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    transition: all 0.3s;
}

.action-button:hover {
    background-color: #e0e0e0;
    color: #333;
}

/* 375x667屏幕优化 */
@media (max-width: 414px) {
    .translate-container {
        margin: 10px;
        padding: 15px;
    }

    .header h1 {
        font-size: 20px;
    }

    .header p {
        font-size: 14px;
    }

    .language-section {
        flex-direction: column;
        gap: 10px;
    }

    .language-swap {
        margin: 0;
        align-self: center;
    }

    .swap-button {
        transform: rotate(90deg);
    }

    .translate-content {
        display: block;
    }

    .input-section {
        margin-bottom: 15px;
    }

    .translate-action {
        margin-bottom: 15px;
        text-align: center;
    }

    .translate-button {
        width: 100%;
        padding: 12px 20px;
        font-size: 16px;
    }

    .source-textarea,
    .target-textarea {
        height: 120px;
        font-size: 14px;
    }

    .token-input,
    .lang-select {
        font-size: 16px;
        padding: 12px;
    }

    .result-actions {
        justify-content: center;
    }

    .action-button {
        flex: 1;
        max-width: 120px;
    }
}

/* 移动端和平板优化 */
@media (max-width: 768px) {
    .translate-container {
        margin: 15px;
        padding: 20px;
    }

    .language-section {
        flex-direction: column;
        gap: 10px;
    }

    .language-select {
        width: 100%;
    }

    .language-swap {
        margin: 0;
        align-self: center;
    }

    .swap-button {
        transform: rotate(90deg);
    }

    .translate-content {
        display: block;
    }

    .input-section {
        margin-bottom: 20px;
    }

    .translate-action {
        margin-bottom: 20px;
        text-align: center;
    }

    .translate-button {
        width: 100%;
        padding: 14px 20px;
        font-size: 16px;
        border-radius: 8px;
    }

    .source-textarea,
    .target-textarea {
        height: 150px;
        font-size: 15px;
    }

    .token-input,
    .lang-select {
        font-size: 16px;
        padding: 12px;
        width: 100%;
        box-sizing: border-box;
    }

    .result-actions {
        justify-content: center;
        gap: 15px;
    }

    .action-button {
        flex: 1;
        max-width: 120px;
        padding: 10px 15px;
    }
}

/* PC端大屏幕优化 - 放在最后确保优先级 */
@media (min-width: 1024px) {
    .translate-container {
        width: 100% !important;
        max-width: 1000px !important;
        padding: 40px !important;
        margin: 0 auto !important;
    }

    .header {
        text-align: center !important;
        margin-bottom: 40px !important;
    }

    .header h1 {
        font-size: 2.8rem !important;
        background: linear-gradient(90deg, #3498db, #8e44ad) !important;
        -webkit-background-clip: text !important;
        background-clip: text !important;
        color: transparent !important;
        margin-bottom: 15px !important;
        font-weight: bold !important;
    }

    .header p {
        font-size: 1.2rem !important;
        color: #555 !important;
        margin: 0 !important;
        line-height: 1.7 !important;
    }

    .translate-content {
        gap: 30px !important;
    }

    .source-textarea,
    .target-textarea {
        height: 280px !important;
        font-size: 16px !important;
        padding: 15px !important;
    }

    .translate-button {
        padding: 20px 35px !important;
        font-size: 18px !important;
    }

    .token-input,
    .lang-select {
        font-size: 16px !important;
        padding: 12px !important;
    }
}