:root {
    --bg-dark: #0f0f11;
    --panel-bg: #18181b;
    --border-color: #27272a;
    --text-main: #e4e4e7;
    --text-muted: #a1a1aa;
    --input-bg: #09090b;
    --primary: #27272a;
    --primary-hover: #3f3f46;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Main App Container */
.glass-panel {
    background: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 3rem;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-main);
    letter-spacing: 0.02em;
}

header p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.app-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Form Controls */
.controls {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 15px;
}

.controls::-webkit-scrollbar {
    width: 6px;
}
.controls::-webkit-scrollbar-track {
    background: var(--bg-dark);
    border-radius: 3px;
}
.controls::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}
.controls::-webkit-scrollbar-thumb:hover {
    background: #3f3f46;
}

.controls h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: -0.5rem;
    font-weight: 600;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
}

input[type="text"], select {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border-radius: 6px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: inherit;
    font-size: 0.85rem;
    transition: border-color 0.2s;
    outline: none;
}

input[type="text"]:focus, select:focus {
    border-color: #52525b;
}

select {
    appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a1a1aa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.8rem center;
    background-size: 1em;
}

input[type="color"] {
    -webkit-appearance: none;
    border: none;
    width: 100%;
    height: 38px;
    border-radius: 6px;
    cursor: pointer;
    background: var(--input-bg);
    padding: 2px;
    border: 1px solid var(--border-color);
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

/* Range Slider */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    padding: 0.5rem 0;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 14px;
    width: 14px;
    border-radius: 50%;
    background: #a1a1aa;
    cursor: pointer;
    margin-top: -5px;
}
input[type="range"]::-webkit-slider-thumb:hover {
    background: #e4e4e7;
}
input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    cursor: pointer;
    background: var(--border-color);
    border-radius: 2px;
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
    width: 100%;
    background: var(--input-bg);
    border: 1px dashed var(--border-color);
    border-radius: 6px;
    padding: 0.6rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s;
}

.file-upload-wrapper:hover {
    border-color: #52525b;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

#logoFileName {
    color: var(--text-muted);
    font-size: 0.8rem;
    pointer-events: none;
}

/* Button */
.primary-btn {
    background: var(--primary);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 0.5rem;
}

.primary-btn:hover {
    background: var(--primary-hover);
}

/* Preview Area */
.preview-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--input-bg);
    border-radius: 8px;
    padding: 2rem;
    border: 1px solid var(--border-color);
}

.qr-container {
    background: white;
    padding: 12px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.preview-label {
    margin-top: 1.5rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Responsive */
@media (max-width: 768px) {
    .app-layout {
        grid-template-columns: 1fr;
    }
    .glass-panel {
        padding: 1.5rem;
        margin: 1rem;
        width: calc(100% - 2rem);
    }
}
