/* QR Generator — standalone fullscreen app */

#qr-generator-app {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    box-sizing: border-box;
    margin-top: 0 !important;
}

/* Main glass panel */
.qr-panel {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--primary-border);
    border-radius: 20px;
    padding: 2rem 2.5rem;
    width: 100%;
    max-width: 860px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.qr-back {
    display: inline-flex;
    align-items: center;
    color: var(--text-grey, #aaa);
    border: 1px solid var(--primary-border);
    border-radius: 999px;
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    background: rgba(162, 76, 255, 0.08);
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.qr-back:hover {
    color: var(--text-color);
    border-color: var(--primary);
    background: rgba(162, 76, 255, 0.14);
}

.qr-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 2rem;
}

/* Two-column layout */
.qr-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* ── Controls (left) ── */
.qr-controls {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-color);
    opacity: 0.85;
}

.qr-input-field {
    background: var(--input-bg, rgba(255, 255, 255, 0.08));
    border: 1px solid var(--primary-border);
    color: var(--text-color);
    padding: 0.65rem 0.9rem;
    border-radius: 10px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    box-sizing: border-box;
}

.qr-input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(162, 76, 255, 0.2);
}

/* Color row */
.color-row {
    flex-direction: row;
    gap: 1rem;
}

.color-item {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1;
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.color-picker {
    width: 42px;
    height: 42px;
    padding: 3px;
    border: 1px solid var(--primary-border);
    border-radius: 8px;
    background: var(--input-bg, rgba(255, 255, 255, 0.08));
    cursor: pointer;
    flex-shrink: 0;
}

.color-picker::-webkit-color-swatch-wrapper { padding: 0; border-radius: 5px; }
.color-picker::-webkit-color-swatch { border: none; border-radius: 5px; }
.color-picker::-moz-color-swatch { border: none; border-radius: 5px; }

.hex-display {
    font-size: 0.8rem;
    font-family: monospace;
    color: var(--text-grey, #aaa);
    letter-spacing: 0.03em;
}

/* File input */
.qr-file-input {
    background: var(--input-bg, rgba(255, 255, 255, 0.08));
    border: 1px solid var(--primary-border);
    color: var(--text-color);
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    font-size: 0.875rem;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.btn-remove {
    align-self: flex-start;
    background: transparent;
    border: 1px solid var(--danger, #e55);
    color: var(--danger, #e55);
    border-radius: 8px;
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.btn-remove:hover {
    background: var(--danger, #e55);
    color: #fff;
}

/* ── Preview (right) ── */
.qr-preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.qr-preview-box {
    background: #fff;
    border-radius: 14px;
    padding: 1rem;
    min-width: 256px;
    min-height: 256px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    position: relative;
}

.qr-placeholder {
    font-size: 0.85rem;
    color: #aaa;
    font-style: italic;
    text-align: center;
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 3rem 2rem;
}

#qr-container {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#qr-container.visible {
    opacity: 1;
}

/* Download area */
.download-area {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    justify-content: center;
}

.download-area.hidden {
    display: none;
}

.resolution-select {
    background: var(--card-bg, #1a1a2e);
    border: 1px solid var(--primary-border);
    color: var(--text-color, #fff);
    border-radius: 8px;
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
    cursor: pointer;
    outline: none;
}

.resolution-select option {
    background: var(--card-bg, #1a1a2e);
    color: var(--text-color, #fff);
}

.btn-download {
    background: var(--primary);
    border: none;
    color: #fff;
    border-radius: 8px;
    padding: 0.45rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-download:hover {
    background: var(--primary-hover, #8a2be2);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .qr-panel {
        padding: 1.5rem 1.25rem;
    }

    .qr-layout {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }

    /* Preview on top, controls below */
    .qr-preview-area {
        order: -1;
    }

    .color-row {
        flex-direction: row;
    }
}
