@charset "utf-8";
:root {
    --primary: #f1404b;
    --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-generator-container * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

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

.panel-body {
    padding: 30px;
}

#charCount {
    transition: color 0.3s ease;
}

/* 选项卡样式 */
.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);
    transition: var(--transition);
    transform: translateX(-50%);
}

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

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

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

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

.tab-content {
    border: 1px solid #e9ecef;
    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;
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-range {
    width: 100%;
    height: 8px;
    margin-bottom: 25px;
    -webkit-appearance: none;
    appearance: none;
    background: #e2e8f0;
    border-radius: 4px;
    outline: none;
}

.form-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(67, 97, 238, 0.3);
}

.form-range::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--gray-text);
    margin-top: -15px;
}

.range-value {
    font-weight: 600;
    color: var(--primary);
    font-size: 15px;
}

/* 颜色选择器 */
.color-picker {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.color-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-label {
    font-size: 14px;
    color: var(--gray-text);
    white-space: nowrap;
}

input[type="color"] {
    width: 40px;
    height: 40px;
    border: none;
    cursor: pointer;
    padding: 2px;
    background: white;
}

.io-black-mode input[type="color"]{
	background: #2c2e2f;
}

input[type="color"]:hover {
    transform: scale(1.1);
}

/* 按钮样式 */
.generate-buttons {
    display: flex;
    gap: 15px;
}

.btn {
	width: 100%;
    padding: 14px 28px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

.btn-success {
    background-color: var(--primary);
    color: #fff;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-1px);
    background-color: var(--primary);
}

.btn-setup {
    background: var(--text-white-rgb);
    color: var(--gray-text);
    border-radius: 8px !important;
}

.btn-setup:hover:not(:disabled) {
    color: var(--gray-text);
    background-color: #fff;
    transform: translateY(-1px);
}

#downloadBtn {
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(46, 204, 113, 0.2);
}

#downloadBtn:hover{
	color: #fff;
}

.size-option {
    flex: 1;
    min-width: 100px;
    text-align: center;
    padding: 8px 5px;
    border-radius: 6px;
}

.size-option.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

#generateBtn {
    font-size: 18px;
    font-weight: 600;
	border-radius: 8px;
    box-shadow: 0 4px 15px rgba(245, 64, 75, 0.3);
}

#generateBtn:hover {
	color: #fff;
}

.btn-lg {
    padding: 14px 32px;
    font-size: 18px;
}

/* 预览区域 */
.preview-area {
    margin-top: 30px;
    padding-top: 30px;
}

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

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

.preview-container {
    text-align: center;
}

#qrCodePreview {
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    background: var(--text-white-rgb);
}

#qrCodePreview canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

#defaultQRImage {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

/* 成功提示 */
.success-message {
    color: #27ae60;
    font-weight: 500;
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 图片库样式 */
.image-gallery {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 20px;
}

.io-black-mode .image-gallery{
	background: #2c2e2f;
}

.gallery-title {
    font-size: 0.9rem;
    color: var(--gray-text);
    margin-bottom: 15px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.image-thumbnail {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    transition: var(--transition);
    border: 1px solid #e2e8f0;
}

.image-thumbnail:hover {
	z-index: 2;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.image-thumbnail img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.image-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
}

.image-actions .btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
}

.image-actions .btn:hover {
    opacity: 1;
}

.image-date {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    font-size: 0.7rem;
    padding: 3px 5px;
    text-align: center;
}

/* 当前选择的图片 */
.current-image {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: var(--border-radius);
}

.current-image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.current-image-info {
    flex: 1;
}

.clear-image {
    margin-top: 5px;
}

/* 解码按钮样式 */
.decode-link {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.decode-link:hover {
    color: #28a745;
}

.io-black-mode .decode-link {
    background: rgba(49,52,53,0.9);
    color: var(--accent-color);
}

.io-black-mode .decode-link:hover {
    background: #313435;
}

/* 加载动画样式 */
.image-gallery-loading, .uploading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading-spinner, .uploading-spinner {
    text-align: center;
}

.spinner-circle {
    width: 50px;
    height: 50px;
    margin: 0 auto 15px;
    border: 5px solid rgba(0,0,0,0.1);
    border-radius: 50%;
    border-top-color: #4361ee;
    animation: spin 1s linear infinite;
}

.spinner-text {
    color: #666;
    font-size: 14px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 图片网格布局 */
.image-gallery-grid {
    max-height: 270px;
    overflow-y: auto;
    padding: 10px;
    margin-bottom: 20px;
}

/* 删除动画 */
.image-thumbnail.deleting {
    opacity: 0.5;
    pointer-events: none;
}

/* 空状态和提示信息样式 */
.alert-info {
    background-color: #f0f9ff;
    border-color: #b6e0fe;
    color: #0c5460;
	text-align: center;
	padding: 10px 0;
}

.alert i.bi {
    margin-right: 8px;
    font-size: 1.1em;
}

/* 加载更多按钮样式 */
#loadMoreImages:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.2);
}

/* 没有更多提示 */
.text-muted {
    color: #6c757d;
    font-size: 0.9em;
    padding: 10px 0;
}

/* 名片表单样式 */
.card-form {
    padding: 20px;
}

/* 名片预览样式 */
.card-preview {
    background: white;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-top: 25px;
}

.vcard {
    font-family: 'Segoe UI', 'Helvetica Neue', sans-serif;
}

.vcard-header {
    color: #fff;
    display: flex;
    align-items: center;
    padding: 25px 25px 15px;
    background: rgba(0, 0, 0, 0.2)
}

.avatar-placeholder {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.avatar-placeholder:before {
	color: #ccc;
	font-size: 2rem;
}

.vcard-title h4 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.3;
}

.vcard-title p {
	color: #fff;
    font-size: 0.95rem;
    opacity: 0.9;
    margin: 5px 0 0;
}

.vcard-body {
    padding: 20px 35px;
}

.vcard-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.vcard-row .io-icon {
    margin-top: 2px;
    margin-right: 5px;
}

.vcard-row span {
    line-height: 1.5;
    color: #4a5568;
}

/* 功能介绍 */
.qr-introduction {
    margin-top: 30px;
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.io-black-mode .qr-introduction {
    background: #313435;
}

.qr-introduction .intro-item {
    display: none;
}

.qr-introduction .intro-item.active {
    display: block;
}

.qr-introduction h5 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e0e0e0;
    display: flex;
    align-items: center;
}

.qr-introduction h5 i {
    font-size: 1.2rem;
}

.qr-introduction p {
	color: #6c757d;
    line-height: 1.6;
    font-size: 0.9rem;
}

.qr-introduction ul {
    padding-left: 20px;
    margin: 15px 0;
}

.qr-introduction li {
    margin-bottom: 8px;
}

.usage-steps {
    counter-reset: step-counter;
    list-style-type: none;
    padding-left: 5px;
    margin: 0;
}

.usage-steps li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 12px !important;
    line-height: 1.5;
    color: #555;
    counter-increment: step-counter;
}

.usage-steps li:before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    background-color: #f0f7ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: #4a90e2;
}

.io-black-mode .usage-steps li{
	color: #6c757d;
}

.io-black-mode .usage-steps li:before{
	background: #2c2e2f;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .panel-body {
        padding: 20px;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .d-flex.justify-content-between {
        flex-direction: column;
        gap: 20px;
    }
    
    .color-picker {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .generate-buttons {
        width: 100%;
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .control-options .row {
        flex-direction: column;
    }
    
    .preview-container {
        padding: 20px;
    }
	
    .qr-introduction {
        padding: 20px;
    }
}