@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-gradient: linear-gradient(135deg, #2E3192 0%, #1BFFFF 100%);
    --secondary-gradient: linear-gradient(135deg, #F2994A 0%, #F2C94C 100%);
    --bg-color: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --accent-blue: #3b82f6;
    --accent-orange: #f59e0b;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(46, 49, 146, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(242, 153, 74, 0.05) 0px, transparent 50%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.container {
    width: 100%;
    max-width: 500px;
    z-index: 10;
}

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px;
    text-align: center;
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.brand-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.brand-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #0082c3 0%, #ff7f2a 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 800;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 130, 195, 0.3);
}

.brand-text {
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.text-blue {
    color: #0082c3;
}

.text-orange {
    color: #ff7f2a;
}

p.subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    padding-left: 4px;
}

input, select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    background: white;
}

input:focus, select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}

.btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-generate {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 49, 146, 0.3);
}

.btn-generate:hover {
    box-shadow: 0 8px 25px rgba(46, 49, 146, 0.4);
    transform: scale(1.02);
}

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

.qr-result-container {
    margin-top: 30px;
    display: none;
    animation: fadeIn 0.5s ease;
}

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

.qr-name-display {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.qr-wrapper {
    position: relative;
    display: inline-block;
    padding: 15px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    background: linear-gradient(white, white) padding-box,
                var(--secondary-gradient) border-box;
    border: 4px solid transparent;
}

#qr-image {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
}

.action-buttons {
    margin-top: 25px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-download {
    background: var(--secondary-gradient);
    color: white;
}

.btn-reset {
    background: #f1f5f9;
    color: var(--text-secondary);
}

.btn-reset:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

/* Loader */
.loader {
    display: none;
    margin: 20px auto;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
#error-msg {
    color: #ef4444;
    background: #fee2e2;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    display: none;
    border: 1px solid #fecaca;
}

/* Responsive */
@media (max-width: 480px) {
    .card {
        padding: 30px 20px;
    }
    .options-grid {
        grid-template-columns: 1fr;
    }
}
