.qr-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem 4rem 1.5rem;
}

.mode-toggle-pill {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    border-radius: 999px;
    padding: 4px;
}

.pill-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 6px 16px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s;
}

.pill-btn.active {
    background: var(--cyan);
    color: var(--bg-dark);
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.view-panel {
    display: none;
}

.view-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Studio Layout */
.studio-layout {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 32px;
}

@media (max-width: 850px) {
    .studio-layout {
        grid-template-columns: 1fr;
    }
}

.controls-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(14px);
}

.type-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.type-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 8px 14px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.type-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.type-pill.active {
    background: rgba(0, 229, 255, 0.15);
    border-color: var(--cyan);
    color: var(--cyan);
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.field-group label {
    font-size: 0.9rem;
    font-weight: 600;
}

.text-input {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 12px 14px;
    color: white;
    font-family: inherit;
    font-size: 0.95rem;
}

.text-input:focus {
    outline: none;
    border-color: var(--cyan);
}

.styling-group {
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.styling-group label {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}

.color-pickers {
    display: flex;
    gap: 20px;
}

.color-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.color-item input[type="color"] {
    appearance: none;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

/* Preview Side */
.preview-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.qr-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-canvas-wrap {
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-canvas-wrap img, .qr-canvas-wrap canvas {
    max-width: 100%;
    max-height: 100%;
}

.preview-hint {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 12px;
}

.download-actions {
    display: flex;
    gap: 12px;
}

/* Scanner Layout */
.scanner-layout {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.scanner-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 24px;
    backdrop-filter: blur(14px);
    text-align: center;
}

.scan-upload-zone {
    border: 2px dashed rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 3rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.scan-upload-zone svg {
    color: var(--cyan);
}

.scan-upload-zone p {
    font-size: 0.9rem;
}

.scanner-buttons {
    display: flex;
    gap: 12px;
    margin-top: 12px;
}

.result-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--cyan);
    border-radius: 16px;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.result-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--cyan);
}

.result-display {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    padding: 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    word-break: break-all;
    margin-bottom: 16px;
}

.result-actions {
    display: flex;
    gap: 12px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--cyan);
    color: var(--bg-dark);
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(0, 229, 255, 0.4);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 650px) {
    .qr-container {
        padding: 0 1rem 3rem 1rem;
    }
    .section-header h1 {
        font-size: clamp(2rem, 7vw, 3rem);
    }
    .scanner-buttons, .result-actions, .download-actions {
        flex-direction: column;
        width: 100%;
    }
    .scanner-buttons .btn, .result-actions .btn, .download-actions .btn {
        width: 100%;
    }
    .type-pills {
        gap: 6px;
    }
    .type-pill {
        flex: 1 1 calc(33% - 6px);
        text-align: center;
        padding: 8px 6px;
        font-size: 0.8rem;
    }
    .color-pickers {
        flex-direction: column;
        gap: 10px;
    }
}

