/* ============================================
   汉字转拼音工具 - 专用样式
   ============================================ */

/* ========== 输入区域样式 ========== */
.input-section {
    margin-bottom: 2rem;
}

.input-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.input-label i {
    color: #4285f4;
}

.input-textarea {
    width: 100%;
    min-height: 200px;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    font-family: 'Microsoft YaHei', '微软雅黑', Arial, sans-serif;
}

.input-textarea:focus {
    border-color: #4285f4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.input-textarea::placeholder {
    color: #9ca3af;
}

.input-info {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.char-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.char-count i {
    color: #4285f4;
}

/* ========== 快捷示例按钮 ========== */
.example-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.example-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
    border: 1px solid #dadce0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
}

.example-btn:hover {
    background: linear-gradient(135deg, #e8eaed 0%, #dadce0 100%);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.example-btn:active {
    transform: translateY(0);
}

.example-btn i {
    color: #4285f4;
}

/* ========== 转换选项区域 ========== */
.options-section {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
}

.section-title i {
    color: #4285f4;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.option-group {
    background: linear-gradient(135deg, #f8f9fa 0%, #f1f3f4 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.option-group:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.option-group h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
}

.option-group h3 i {
    color: #4285f4;
}

/* 单选按钮组 */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.radio-label:hover {
    background: rgba(66, 133, 244, 0.05);
}

.radio-label input[type="radio"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4285f4;
}

.radio-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.radio-text strong {
    color: #333;
    font-weight: 600;
}

.radio-text small {
    color: #6b7280;
    font-size: 0.8125rem;
}

/* 复选框组 */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.checkbox-label:hover {
    background: rgba(66, 133, 244, 0.05);
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #4285f4;
}

.checkbox-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.checkbox-text strong {
    color: #333;
    font-weight: 600;
}

.checkbox-text small {
    color: #6b7280;
    font-size: 0.8125rem;
}

/* ========== 操作按钮 ========== */
.action-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #4285f4 0%, #1a73e8 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1a73e8 0%, #1557b0 100%);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #f1f3f4;
    color: #333;
    border: 1px solid #dadce0;
}

.btn-secondary:hover {
    background: #e8eaed;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-copy {
    background: linear-gradient(135deg, #34a853 0%, #0f9d58 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(52, 168, 83, 0.3);
}

.btn-copy:hover {
    background: linear-gradient(135deg, #0f9d58 0%, #0a8043 100%);
    box-shadow: 0 4px 12px rgba(52, 168, 83, 0.4);
    transform: translateY(-2px);
}

/* ========== 结果展示区 ========== */
.result-section {
    margin-top: 2rem;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 12px 12px 0 0;
    border: 1px solid #a5d6a7;
    font-weight: 600;
    color: #2e7d32;
}

.result-header i {
    font-size: 1.25rem;
}

.result-stats {
    margin-left: auto;
    font-size: 0.875rem;
    color: #558b2f;
}

.result-card {
    background: white;
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 12px 12px;
    padding: 1.5rem;
}

.result-item {
    margin-bottom: 1.5rem;
}

.result-item:last-of-type {
    margin-bottom: 2rem;
}

.result-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.result-label i {
    color: #4285f4;
}

.result-text {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    font-size: 1rem;
    line-height: 1.8;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.result-pinyin {
    font-family: 'Arial', 'Helvetica', 'Microsoft YaHei', sans-serif;
    font-size: 1.2rem;
    line-height: 2;
    color: #1a73e8;
    font-weight: 500;
}

.result-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    padding-top: 1rem;
}

/* ========== 复制提示 ========== */
.copy-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
}

.copy-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.copy-toast i {
    font-size: 1.25rem;
    color: #34a853;
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .options-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .result-pinyin {
        font-size: 1rem;
    }

    .example-buttons {
        gap: 0.5rem;
    }

    .example-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn {
        width: 100%;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .result-stats {
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .input-textarea {
        min-height: 150px;
        font-size: 14px;
    }

    .option-group {
        padding: 1rem;
    }

    .radio-label,
    .checkbox-label {
        padding: 0.5rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }

    .result-text {
        font-size: 0.9375rem;
    }

    .result-pinyin {
        font-size: 0.9375rem;
    }
}
