/* PALETA DE COLORES */
:root {
    --primary: #0062ff;
    --secondary: #00d2ff;
    --purple: #9900ff; 
    --text-dark: #1e293b;
}

body {
    margin: 0;
    padding: 40px 20px;
    font-family: 'Inter', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-dark);
    overflow-x: hidden;
    background-color: #f1f5f9;
    background-image: radial-gradient(circle at 2px 2px, rgba(0, 98, 255, 0.05) 1px, transparent 0);
    background-size: 32px 32px;
    position: relative;
}

/* GRADIENTES DE FONDO FIJOS */
body::before, body::after {
    content: "";
    position: fixed;
    width: 600px;
    height: 600px;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.3;
    border-radius: 50%;
}
body::before { background: var(--primary); top: -200px; left: -200px; }
body::after { background: var(--purple); bottom: -200px; right: -200px; }

.container {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 24px;
    border: 5px solid rgba(153, 0, 255, 0.5);
    box-shadow: 0 15px 40px rgba(153, 0, 255, 0.15);
    width: 100%;
    max-width: 480px;
    position: relative;
    z-index: 10;
}

h2 {
    text-align: center;
    margin: 0 0 10px 0;
    font-size: 28px;
    background: linear-gradient(90deg, var(--primary), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

.form-group { margin-bottom: 20px; }
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    text-transform: uppercase;
}
input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.2s ease;
    box-sizing: border-box;
}
input:focus {
    outline: none;
    border-color: var(--purple);
    box-shadow: 0 0 0 4px rgba(153, 0, 255, 0.1);
}

.botones-container { display: flex; gap: 12px; margin-top: 30px; }
button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}
#previewBtn { background-color: #334155; }
#downloadBtn { background: linear-gradient(135deg, var(--primary), var(--purple)); }
button:hover { transform: translateY(-2px); filter: brightness(1.1); }

#canvasContainer {
    margin-top: 60px;
    text-align: center;
    width: 95%;
    max-width: 1100px; 
}

#previewTitle {
    display: inline-block;
    color: var(--purple);
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 25px;
}

canvas {
    width: 100%;
    height: auto;
    border-radius: 20px;
    border: 10px solid white; 
    box-shadow: 0 0 50px rgba(153, 0, 255, 0.4); 
    display: none;
    animation: zoomElastic 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomElastic {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* --- BURBUJAS --- */
.bubbles { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; overflow: hidden; }
.bubble {
    position: absolute;
    bottom: -100px;
    background: linear-gradient(135deg, rgba(153, 0, 255, 0.3), rgba(0, 98, 255, 0.3));
    border-radius: 50%;
    opacity: 0;
    animation: rise 10s infinite ease-in;
}

@keyframes rise {
    0% { bottom: -100px; transform: scale(0.5); opacity: 0; }
    20% { opacity: 0.6; transform: scale(1.2); }
    100% { bottom: 110vh; transform: scale(0.2); opacity: 0; }
}

.bubble:nth-child(1) { left: 10%; width: 80px; height: 80px; animation-delay: 0s; }
.bubble:nth-child(2) { left: 25%; width: 150px; height: 150px; animation-delay: 2s; animation-duration: 12s; }
.bubble:nth-child(3) { left: 45%; width: 50px; height: 50px; animation-delay: 4s; }
.bubble:nth-child(4) { left: 65%; width: 120px; height: 120px; animation-delay: 1s; }
.bubble:nth-child(5) { left: 80%; width: 90px; height: 90px; animation-delay: 6s; }