* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
    background: linear-gradient(145deg, #f0f4fa 0%, #e6ecf4 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

/* 主卡片容器 */
.qr-card {
    max-width: 1000px;
    width: 100%;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(0px);
    border-radius: 48px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.12), 0 8px 24px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: all 0.2s ease;
}

/* 头部 */
.header {
    background: #1e2a3e;
    padding: 24px 32px;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.header h1 {
    font-size: 1.9rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.header h1:before {
    content: "✨";
    font-size: 2rem;
}
.header p {
    opacity: 0.8;
    font-size: 0.95rem;
}

/* 返回首页按钮 */
.btn-home {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}
.btn-home:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 双栏布局 */
.content {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    padding: 32px;
}

/* 左侧控制区 */
.controls {
    flex: 1.2;
    min-width: 260px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* 右侧预览区 */
.preview-area {
    flex: 1;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

/* 输入组通用样式 */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.input-group label {
    font-weight: 600;
    color: #1e2a3e;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.input-group label i {
    font-style: normal;
    font-weight: normal;
    font-size: 1.1rem;
}

textarea, input[type="text"] {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 12px 18px;
    font-size: 0.95rem;
    transition: all 0.2s;
    resize: vertical;
    font-family: monospace;
}
textarea:focus, input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.2);
    background: white;
}

/* 双色选择器行 */
.color-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.color-picker-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f1f5f9;
    padding: 8px 16px;
    border-radius: 40px;
}
.color-picker-wrapper span {
    font-weight: 500;
    font-size: 0.85rem;
}
input[type="color"] {
    width: 48px;
    height: 42px;
    border: 2px solid white;
    border-radius: 16px;
    cursor: pointer;
    background: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 上传区域 */
.upload-zone {
    background: #f1f5f9;
    border-radius: 28px;
    padding: 16px;
    border: 1px dashed #94a3b8;
    transition: 0.2s;
}
.logo-preview {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.logo-thumb {
    width: 60px;
    height: 60px;
    background: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    overflow: hidden;
    background: #fff;
}
.logo-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.btn-clear-logo {
    background: #ef4444;
    border: none;
    color: white;
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: 0.2s;
}
.btn-clear-logo:hover {
    background: #dc2626;
    transform: scale(0.96);
}
.file-label {
    background: #3b82f6;
    color: white;
    padding: 10px 18px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
    border: none;
}
.file-label:hover {
    background: #2563eb;
    transform: translateY(-1px);
}
input[type="file"] {
    display: none;
}

/* 按钮组 */
.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}
.btn-download {
    background: #0f172a;
    color: white;
    border: none;
    padding: 12px 0;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex: 1;
}
.btn-download:hover {
    background: #1e293b;
    transform: translateY(-2px);
}

/* 二维码canvas容器 */
.qr-canvas-wrapper {
    background: white;
    border-radius: 32px;
    padding: 20px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    display: inline-block;
}
canvas {
    display: block;
    margin: 0 auto;
    border-radius: 16px;
    width: 100%;
    height: auto;
    background: white;
}
.info-tip {
    font-size: 0.75rem;
    color: #475569;
    text-align: center;
    margin-top: 12px;
}

hr {
    margin: 8px 0;
    border: none;
    border-top: 1px solid #e2e8f0;
}

@media (max-width: 720px) {
    .content {
        flex-direction: column;
    }
    .header {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
    .header h1 {
        font-size: 1.5rem;
    }
    .btn-home {
        width: 100%;
        justify-content: center;
    }
}
