:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient: linear-gradient(135deg, #0f172a, #1e1b4b, #2e1065);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
}

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

body {
    font-family: 'Cairo', sans-serif;
    background: var(--bg-gradient);
    background-size: 200% 200%;
    animation: gradientBG 15s ease infinite;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-primary);
    padding: 20px;
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    width: 100%;
    max-width: 500px;
    perspective: 1000px;
}

.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.6);
}

h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    text-align: center;
    background: linear-gradient(to right, #c084fc, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

input[type="text"] {
    width: 100%;
    padding: 1rem 1.2rem;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    transition: all 0.3s;
}

input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
    background: rgba(0, 0, 0, 0.3);
}

.color-input-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.color-input-group label {
    margin-bottom: 0;
}

input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 60px;
    height: 40px;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch {
    border-radius: 8px;
    border: 2px solid var(--glass-border);
}

input[type="color"]::-moz-color-swatch {
    border-radius: 8px;
    border: 2px solid var(--glass-border);
}

input[type="file"] {
    display: none;
}

.file-name {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

label[for="qr-logo"] {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--text-secondary);
    padding: 1rem;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: normal;
}

label[for="qr-logo"]:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #818cf8;
    color: #818cf8;
}

button {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    border: none;
    font-size: 1.1rem;
    font-weight: 800;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.primary-btn {
    background: var(--primary-color);
    color: white;
    margin-top: 1rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.primary-btn:hover {
    background: var(--primary-hover);
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.primary-btn:active {
    transform: scale(0.98);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid var(--glass-border);
    margin-top: 1rem;
}

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

.qr-result-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#qr-canvas {
    background: white;
    padding: 15px;
    border-radius: 16px;
    display: none;
    animation: fadeIn 0.5s ease-out;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

#qr-canvas svg, #qr-canvas canvas {
    border-radius: 8px;
    display: block;
    width: 100%;
    max-width: 300px;
    height: auto;
}

.hidden {
    display: none !important;
}

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