/* des-encrypt.css - DES/3DES 加密解密工具专用样式 */

/* ========== 输入区域样式 ========== */
.input-section {
    margin-bottom: 30px;
}

.input-label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

.input-label i {
    margin-right: 8px;
    color: #667eea;
}

.text-area {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Courier New', Consolas, monospace;
    resize: vertical;
    transition: border-color 0.3s, box-shadow 0.3s;
    box-sizing: border-box;
}

.text-area:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.char-count {
    text-align: right;
    margin-top: 8px;
    color: #666;
    font-size: 13px;
}

.char-count span {
    font-weight: 600;
    color: #667eea;
}

/* ========== 参数配置区域 ========== */
.params-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #f0f2f5 100%);
    padding: 30px;
    border-radius: 16px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.params-section h3 {
    margin-top: 0;
    margin-bottom: 25px;
    color: #333;
    font-size: 18px;
    font-weight: 700;
}

.params-section h3 i {
    margin-right: 10px;
    color: #667eea;
}

.param-group {
    margin-bottom: 25px;
}

.param-group:last-child {
    margin-bottom: 0;
}

.param-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #444;
    font-size: 14px;
}

/* ========== 单选按钮组 ========== */
.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.radio-item input[type="radio"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.radio-item span {
    font-size: 14px;
    color: #555;
}

/* ========== 下拉选择框 ========== */
.select-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.select-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ========== 密钥输入区域 ========== */
.key-input-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.text-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.text-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.format-select {
    width: 120px;
    padding: 12px 10px;
    border: 2px solid #e1e4e8;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.3s;
}

.format-select:focus {
    outline: none;
    border-color: #667eea;
}

.btn-small {
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.3s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-small:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-small:active {
    transform: translateY(0);
}

.key-hint {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

.key-hint i {
    margin-right: 5px;
    color: #667eea;
}

.key-hint span {
    font-weight: 600;
    color: #444;
}

/* ========== 操作按钮 ========== */
.action-buttons {
    display: flex;
    gap: 15px;
    margin: 35px 0;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    padding: 16px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 16px 40px;
    background: #f5f5f5;
    color: #666;
    border: 2px solid #e1e4e8;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-secondary:hover {
    background: #e8e8e8;
    border-color: #ccc;
    transform: translateY(-2px);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* ========== 结果区域 ========== */
.result-area {
    margin: 35px 0;
    padding: 30px;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
    border-radius: 16px;
    border: 2px solid #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.1);
    animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-header {
    margin-bottom: 20px;
}

.result-header h3 {
    margin: 0;
    color: #667eea;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-area .text-area {
    background: white;
    border-color: #667eea;
    margin-bottom: 15px;
}

.btn-copy {
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-copy:hover {
    background: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-copy:active {
    transform: translateY(0);
}

/* ========== 响应式设计 ========== */
@media (max-width: 768px) {
    .params-section {
        padding: 20px;
    }

    .params-section h3 {
        font-size: 16px;
    }

    .key-input-wrapper {
        flex-direction: column;
    }

    .text-input,
    .format-select,
    .btn-small {
        width: 100%;
    }

    .action-buttons {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .result-area {
        padding: 20px;
    }

    .btn-copy {
        width: 100%;
        justify-content: center;
    }

    .radio-group {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .params-section {
        padding: 15px;
    }

    .text-area {
        font-size: 13px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 14px 30px;
        font-size: 15px;
    }
}

/* ========== Toast 提示消息 ========== */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #667eea;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-size: 15px;
    font-weight: 600;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast-success {
    background: #4CAF50;
}

.toast-error {
    background: #f44336;
}

.toast-info {
    background: #2196F3;
}

@media (max-width: 768px) {
    .toast {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        top: 10px;
        max-width: 90%;
    }

    @keyframes slideIn {
        from {
            transform: translate(-50%, -20px);
            opacity: 0;
        }
        to {
            transform: translate(-50%, 0);
            opacity: 1;
        }
    }
}
