:root {
    --bg-color: #050505;
    --card-bg: rgba(255, 255, 255, 0.05);
    --card-border: rgba(255, 255, 255, 0.1);
    --accent-primary: #3b82f6;
    --accent-secondary: #8b5cf6;
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --glass-bg: rgba(15, 15, 15, 0.7);
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --panel-bg: rgba(255, 255, 255, 0.03);
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

.bg-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.blob {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--accent-primary), transparent 70%);
    filter: blur(150px);
    opacity: 0.1;
    border-radius: 50%;
}

.blob-1 { top: -300px; right: -200px; }
.blob-2 { bottom: -300px; left: -200px; background: radial-gradient(circle, var(--accent-secondary), transparent 70%); }

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

.breadcrumb {
    margin-bottom: 2rem;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: var(--accent-primary);
}

header {
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.badge {
    font-size: 0.8rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.qr-builder {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .qr-builder {
        grid-template-columns: 1fr;
    }
}

.controls-panel {
    background: var(--panel-bg);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 2rem;
    backdrop-filter: blur(20px);
}

.control-group {
    margin-bottom: 2rem;
}

.control-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.control-group input[type="text"] {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    padding: 1rem;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    outline: none;
    transition: all 0.3s ease;
}

.control-group input[type="text"]:focus {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.08);
}

.tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 2rem;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.75rem 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    transition: color 0.3s ease;
}

.tab-btn.active {
    color: var(--accent-primary);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

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

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
}

.option-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    color: var(--text-secondary);
    padding: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.option-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.option-btn.active {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.upload-area {
    border: 2px dashed var(--card-border);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.upload-area:hover {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.05);
}

.upload-placeholder i {
    font-size: 2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.upload-placeholder p {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.upload-placeholder span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.preview-logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.preview-logo-container img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.remove-logo {
    background: #ef4444;
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 10px;
    right: 10px;
}

.hidden { display: none; }

.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.75rem;
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

input[type="color"] {
    -webkit-appearance: none;
    appearance: none;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: none;
}

input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 8px; }

.color-value {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.preview-panel {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.qr-container-wrapper {
    background: white;
    padding: 2rem;
    border-radius: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), 0 0 0 10px rgba(255, 255, 255, 0.05);
    position: relative;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.qr-container-wrapper:hover {
    transform: scale(1.02);
}

#qr-canvas canvas {
    max-width: 100%;
    height: auto !important;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.btn-primary, .btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(59, 130, 246, 0.3);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--card-border);
}

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

.main-footer {
    text-align: center;
    padding: 4rem 0;
    margin-top: 4rem;
    border-top: 1px solid var(--card-border);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.brand {
    color: white;
    font-weight: 600;
}

input[type="range"] {
    width: 100%;
    accent-color: var(--accent-primary);
}
