/* 页面特定样式 */
body {
    max-width: 1200px;
    margin: 0 auto;
    padding: 25px 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: #34495e;
}

h1 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

@media (max-width: 767.98px) {
    body {
        padding: 15px 12px;
    }
    h1 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    .back-btn {
        font-size: 0.85rem;
        padding: 7px 14px;
    }
}

/* Base64转换器整体样式 */
.converter {
    background-color: white;
    padding: 25px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* 输入区域样式 */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: bold;
}

textarea {
    width: 100%;
    min-height: 120px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: "Microsoft YaHei", "Consolas", monospace;
    font-size: 14px;
    resize: vertical;
    box-sizing: border-box;
}

textarea:focus {
    outline: none;
    border-color: #2980b9;
}

/* 错误提示样式 */
.error-tip {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
    display: none;
}

/* 按钮组样式 */
.btn-group {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
}

button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: "Microsoft YaHei", sans-serif;
    font-size: 14px;
    transition: background-color 0.2s;
}

.convert-btn {
    background-color: #2980b9;
    color: white;
}

.convert-btn:hover {
    background-color: #1f618d;
}

.clear-btn {
    background-color: #95a5a6;
    color: white;
}

.clear-btn:hover {
    background-color: #7f8c8d;
}

/* 结果区域样式 */
.result-group {
    margin-top: 20px;
    margin-bottom: 30px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
}

.result-item span:first-child {
    color: #34495e;
    font-size: 14px;
    min-width: 120px;
}

.result-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
}

.result-item span:last-child {
    color: #2c3e50;
    font-family: "Consolas", monospace;
    font-size: 14px;
    word-break: break-all;
    text-align: right;
    max-width: 60%;
}

/* 复制按钮样式 */
.copy-btn {
    padding: 5px 10px;
    background-color: #f0f0f0;
    color: #666;
    font-size: 12px;
    white-space: nowrap;
}

.copy-btn:hover {
    background-color: #e0e0e0;
}

/* 分隔线样式 */
.divider {
    height: 1px;
    background-color: #eee;
    margin: 30px 0;
}

/* 响应式适配（手机端） */
@media (max-width: 600px) {
    .btn-group {
        flex-direction: column;
    }
    .result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    .result-item span:first-child {
        min-width: auto;
    }
    .result-content {
        width: 100%;
        justify-content: flex-start;
    }
    .result-item span:last-child {
        max-width: 100%;
        text-align: left;
    }
}

