/* --- QR Generator Wrapper --- */
#qr-wrapper {
    font-family: 'Press Start 2P', monospace;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background-color: #111827;
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border: 2px solid #374151;
    color: white;
}

/* --- Preview Area --- */
.qr-preview-container {
    width: 100%;
    background-color: #000;
    border: 4px solid #333;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    min-height: 300px;
    position: relative;
    /* Subtle grid background */
    background-image: radial-gradient(#333 1px, transparent 1px);
    background-size: 20px 20px;
}

#qr-code {
    padding: 15px;
    background: white; /* Default background for the code itself */
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    transition: all 0.3s ease;
}

#qr-code img, #qr-code canvas {
    display: block; /* Remove spacing issues */
}

/* --- Controls Grid --- */
.qr-controls {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    width: 100%;
}

@media (min-width: 768px) {
    .qr-controls {
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }
}

/* --- Input Groups --- */
.qr-group {
    background-color: #1f2937;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #374151;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.qr-label {
    font-size: 0.7rem;
    color: #9ca3af;
    text-transform: uppercase;
    margin-bottom: 5px;
}

/* Inputs */
.qr-input {
    background-color: #000;
    border: 2px solid #374151;
    color: #fff;
    padding: 12px;
    font-family: 'Press Start 2P', monospace, sans-serif;
    font-size: 0.9rem;
    border-radius: 4px;
    outline: none;
    width: 100%;
}

.qr-input:focus {
    border-color: #00FFFF;
    box-shadow: 0 0 8px rgba(0, 255, 255, 0.3);
}

.qr-select {
    background-color: #000;
    border: 2px solid #374151;
    color: #fff;
    padding: 10px;
    font-family: 'Press Start 2P', monospace, sans-serif;
    font-size: 0.9rem;
    border-radius: 4px;
    width: 100%;
    cursor: pointer;
}

/* Color Pickers */
.qr-color-row {
    display: flex;
    gap: 10px;
}

.qr-color-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #000;
    border: 1px solid #374151;
    padding: 5px 10px;
    border-radius: 4px;
}

.qr-color-input {
    width: 24px;
    height: 24px;
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
}

/* --- Actions --- */
.qr-btn-download {
    width: 100%;
    margin-top: 20px;
    padding: 15px;
    background-color: #10b981; /* Green */
    color: #064e3b;
    border: none;
    border-bottom: 4px solid #059669;
    font-family: inherit;
    font-size: 0.8rem;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.1s;
}

.qr-btn-download:hover {
    background-color: #34d399;
}

.qr-btn-download:active {
    transform: translateY(4px);
    border-bottom: none;
    margin-top: 24px; /* Offset margin */
}

/* Mobile Responsiveness */
@media (max-width: 480px) {
    #qr-wrapper { padding: 15px; }
    .qr-preview-container { padding: 15px; min-height: 250px; }
    .qr-controls { grid-template-columns: 1fr; }
}