:root {
    --bg-color: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --primary-color: #ff5b39;
    --primary-hover: #ff744f;
    --accent: #2563eb;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --danger: #ef4444;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.text-center { text-align: center; }
.hidden { display: none !important; }

/* Tooltip hints */
.tip {
    display: inline-block;
    cursor: help;
    font-size: 0.8rem;
    opacity: 0.6;
    vertical-align: middle;
    margin-left: 3px;
}

.tip:hover {
    opacity: 1;
}

.input-text-group { margin-bottom: 0; }

/* Blobs de fondo (Animados) */
.background-blobs {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1;
    overflow: hidden;
}
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: drift 20s infinite alternate;
}
.blob-1 {
    width: 300px; height: 300px;
    background: var(--primary-color);
    top: -10%; left: -10%;
}
.blob-2 {
    width: 400px; height: 400px;
    background: var(--accent);
    bottom: -20%; right: -10%;
    animation-delay: -5s;
}
.blob-3 {
    width: 250px; height: 250px;
    background: #ec4899;
    top: 40%; left: 60%;
    animation-delay: -10s;
}

@keyframes drift {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.glass-subpanel {
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 20px;
    margin: 20px 0;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}
h1 span {
    background: linear-gradient(135deg, var(--primary-color), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
header p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* File Upload */
.file-upload {
    margin-bottom: 30px;
}
.file-input { display: none; }
.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--glass-border);
    border-radius: 16px;
    padding: 40px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255,255,255,0.02);
}
.file-label:hover, .file-label.dragover {
    border-color: var(--primary-color);
    background: rgba(59, 130, 246, 0.1);
}
.file-label .icon {
    font-size: 3rem;
    margin-bottom: 10px;
}
.file-label small {
    color: var(--text-secondary);
    margin-top: 10px;
}

/* Inputs & Grid */
.options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 25px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
input[type="text"], input[type="tel"], input[type="number"], select {
    width: 100%;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255,255,255,0.05);
    color: white;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, box-shadow 0.3s;
}
input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
select option { background: #1e293b; color: white; }

/* Toggles */
.toggles-container {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}
.toggle-switch {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.toggle-switch input { display: none; }
.slider {
    position: relative;
    width: 50px; height: 26px;
    background: rgba(255,255,255,0.1);
    border-radius: 34px;
    margin-right: 15px;
    transition: 0.4s;
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.4s;
}
.toggle-switch input:checked + .slider { background: var(--primary-color); }
.toggle-switch input:checked + .slider:before { transform: translateX(24px); }

.priority-toggle .slider { background: rgba(255,255,255,0.05); border: 1px solid rgba(239, 68, 68, 0.3); }
.priority-toggle input:checked + .slider { background: var(--danger); box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);}

/* Botones */
button {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.3s;
}
.primary-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent));
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}
.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}
.secondary-btn {
    background: transparent;
    border: 1px solid var(--text-secondary);
    color: var(--text-primary);
    margin-top: 15px;
}

/* Price Preview */
.price-preview h3 {
    margin: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.price-preview span {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Success View */
.success-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.qr-container { padding: 30px; }
.qr-container img {
    border-radius: 12px;
    max-width: 250px;
    background: white;
    padding: 10px;
}
.pedido-id {
    font-family: monospace;
    color: var(--text-secondary);
    margin-top: 15px;
    font-size: 0.9rem;
}
.total-final {
    font-size: 1.2rem;
    margin: 20px 0;
}
.total-final strong { color: #10b981; font-size: 1.5rem; }

/* Loading */
#loading-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}
.spinner {
    width: 60px; height: 60px;
    border: 5px solid rgba(255,255,255,0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes popIn { 0% { transform: scale(0.5); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }

/* Media Queries */
@media (max-width: 600px) {
    .options-grid { grid-template-columns: 1fr; }
    .glass-panel { padding: 25px; border-radius: 20px;}
    h1 { font-size: 2rem; }
}