@charset "utf-8";
:root {
    --primary-color: #4361ee;
    --secondary-color: #3f37c9;
    --accent-color: #4cc9f0;
    --light-bg: #f8f9fa;
    --dark-text: #212529;
    --gray-text: #6c757d;
    --border-radius: 12px;
    --box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

/* 基础样式 */
.qr-decoder-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.qr-decoder-container {
    font-family: 'Segoe UI', system-ui, sans-serif;
    max-width: 900px;
    margin: 0 auto;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
}

.panel-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 30px 25px;
    position: relative;
}

.panel-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.panel-header h1 i {
    font-size: 2rem;
}

.description {
    margin: 15px 0 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
}

.panel-body {
    padding: 30px;
}

/* 选项卡样式 */
.panel-body ul li{
    margin: 0 !important;
}

.nav-tabs {
    display: flex;
    list-style: none;
    border-bottom: none;
    border: 1px solid #e9ecef;
    background: var(--light-bg);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    overflow: hidden;
}

.io-black-mode .nav-tabs {
    border: none;
    background: rgba(10, 10, 10, .4);
}

.nav-item {
    flex: 1;
    text-align: center;
}

.nav-link {
    padding: 16px 20px;
    border: none !important;
    color: var(--gray-text);
    font-weight: 600;
    font-size: 16px;
    transition: var(--transition);
    position: relative;
    background: transparent;
    cursor: pointer;
}

.nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover {
    color: var(--primary-color);
    background: rgba(67, 97, 238, 0.05);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color) !important;
}

.io-black-mode .nav-tabs .nav-link.active {
    background: #313435;
}

.nav-link.active:after {
    width: 100%;
}

.tab-content {
    border: 1px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    padding: 25px;
    min-height: 200px;
    background: white;
}

.io-black-mode .tab-content {
    border: none;
    background: #313435;
}

/* 表单元素样式 */
.form-label {
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 15px;
    display: block;
}

.form-label span {
    font-size: 13px;
    font-weight: 500;
    color: #dc3545;
}

.form-control {
    padding: 4px 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
    margin-bottom: 10px;
    width: 99%;
    background: #f8fafc;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(76, 201, 240, 0.2);
    outline: none;
    background: white;
}

/* 按钮样式 */
.btn {
    padding: 14px 28px;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #3857e0, #3830b5);
    box-shadow: 0 6px 12px rgba(67, 97, 238, 0.25);
}

.btn-success {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #29b765, #219653);
    box-shadow: 0 6px 12px rgba(46, 204, 113, 0.25);
}

.btn-outline-secondary {
    background: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background: #f8f9fa;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: linear-gradient(135deg, #e43725, #b83224);
    box-shadow: 0 6px 12px rgba(231, 76, 60, 0.25);
}

/* 结果区域样式 */
.result-area {
    margin: 30px 0 60px 0;
    padding-top: 30px;
    border-top: 1px solid #e9ecef;
}

.result-area h5 {
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-area h5:before {
    content: "";
    display: block;
    width: 5px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 10px;
}

.result-container {
    border-radius: var(--border-radius);
	border: 1px solid #e9ecef;
}

.io-black-mode .result-container {
	border: none;
    background: #313435;
}

#decodedResult {
    padding: 25px;
    font-size: 16px;
    line-height: 1.6;
}

/* 上传预览 */
.upload-preview {
    margin: 20px 0;
    text-align: center;
}

.upload-preview img {
    max-width: 100%;
    max-height: 256px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* 响应式调整 */
@media (max-width: 768px) {
    .panel-body {
        padding: 20px;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}