/* =================================
   ESTILOS PARA DEMOS DE FORMULARIOS
   ================================= */

/* Layout general */
.demo-container {
    background: #1e293b;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border: 2px dashed #334155;
}

.demo-container h4 {
    color: #f1f5f9;
    margin-bottom: 1rem;
    font-weight: 600;
}

.styles-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.style-preview {
    background: #1e293b;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    color: #f1f5f9;
}

.usage-guide, 
.next-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.usage-item, 
.step-card {
    background: #1e293b;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
    border: 1px solid #334155;
    color: #f1f5f9;
}

.usage-item h3, 
.step-card h4 {
    color: #f1f5f9;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.usage-item p, 
.step-card p {
    color: #cbd5e1;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.step-card em {
    color: #94a3b8;
    font-size: 0.9rem;
    font-style: italic;
}

/* =================================
   ESTILO 1: MINIMALISTA
   ================================= */
.minimal-form {
    max-width: 500px;
    margin: 0 auto;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.minimal-form .form-group {
    margin-bottom: 30px;
}

.minimal-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #f1f5f9;
}

.minimal-form input, 
.minimal-form textarea {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #64748b;
    background: transparent;
    color: #f1f5f9;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.minimal-form input::placeholder,
.minimal-form textarea::placeholder {
    color: #94a3b8;
}

.minimal-form input:focus, 
.minimal-form textarea:focus {
    outline: none;
    border-bottom-color: #94a3b8;
}

.minimal-form button {
    background: #2c3e50;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 2px;
}

.minimal-form button:hover {
    background: #1a252f;
}

/* =================================
   ESTILO 2: MODERNO
   ================================= */
.modern-bg {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    border-radius: 20px;
}

.modern-form {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    margin: 0 auto;
}

.modern-form .form-group {
    margin-bottom: 25px;
}

.modern-form label {
    display: block;
    margin-bottom: 8px;
    color: white;
    font-weight: 500;
}

.modern-form input, 
.modern-form textarea {
    width: 100%;
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.modern-form input::placeholder, 
.modern-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.modern-form input:focus, 
.modern-form textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.8);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.modern-form button {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.modern-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

/* =================================
   ESTILO 3: INTERACTIVO
   ================================= */
.interactive-form {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
}

.interactive-form .form-group {
    position: relative;
    margin-bottom: 35px;
}

.interactive-form input, 
.interactive-form textarea {
    width: 100%;
    padding: 15px 15px 15px 0;
    border: none;
    border-bottom: 2px solid #64748b;
    background: transparent;
    color: #f1f5f9;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.interactive-form label {
    position: absolute;
    top: 15px;
    left: 0;
    color: #94a3b8;
    font-size: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Floating label effect */
.interactive-form input:focus + label,
.interactive-form textarea:focus + label,
.interactive-form input:not(:placeholder-shown) + label,
.interactive-form textarea:not(:placeholder-shown) + label {
    top: -8px;
    font-size: 12px;
    color: #6366f1;
    font-weight: bold;
}

.interactive-form input:focus, 
.interactive-form textarea:focus {
    outline: none;
    border-bottom-color: #6366f1;
    transform: scale(1.02);
}

.interactive-form input::placeholder,
.interactive-form textarea::placeholder {
    color: #94a3b8;
}

.interactive-form button {
    background: #6366f1;
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.interactive-form button:hover {
    background: #4f46e5;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.3);
}

/* =================================
   ESTILO 4: MOBILE-FIRST
   ================================= */
.mobile-form {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 15px;
}

.mobile-form .form-group {
    margin-bottom: 20px;
}

.mobile-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: bold;
    color: #2d3748;
}

.mobile-form input, 
.mobile-form textarea {
    width: 100%;
    padding: 18px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px; /* Evita zoom en iOS */
    background: white;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.mobile-form input:focus, 
.mobile-form textarea:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.mobile-form button {
    width: 100%;
    padding: 20px;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-form button:hover {
    background: #3182ce;
    transform: translateY(-1px);
}

.mobile-form button:active {
    transform: translateY(0);
}

/* =================================
   ESTILO 5: CREATIVO
   ================================= */
.creative-form {
    max-width: 400px;
    margin: 0 auto;
    padding: 30px;
    background: linear-gradient(45deg, #ff9a9e, #fecfef);
    border-radius: 25px;
    position: relative;
    overflow: hidden;
}

.creative-form::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) rotate(0deg); 
    }
    50% { 
        transform: translate(-10px, -10px) rotate(180deg); 
    }
}

.creative-form .form-group {
    position: relative;
    z-index: 2;
    margin-bottom: 20px;
}

.creative-form label {
    display: block;
    margin-bottom: 6px;
    color: #2d3748;
    font-weight: bold;
    font-size: 16px;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.creative-form input, 
.creative-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.creative-form input:focus, 
.creative-form textarea:focus {
    outline: none;
    background: white;
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.creative-form button {
    position: relative;
    z-index: 2;
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.creative-form button:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.6);
}

.creative-form button:active {
    transform: translateY(-1px) scale(1.02);
}

/* =================================
   ESTILO 6: GAMING
   ================================= */
.gaming-form {
    display: flex;
    flex-direction: column;
    align-self: center;
    font-family: inherit;
    gap: 10px;
    padding: 2em;
    padding-bottom: 0.4em;
    background-color: #171717;
    border-radius: 20px;
}

.gaming-form .form-heading {
    text-align: center;
    margin: 2em;
    color: #64ffda;
    font-size: 1.2em;
    background-color: transparent;
    align-self: center;
}

.gaming-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5em;
    border-radius: 10px;
    padding: 0.6em;
    border: none;
    outline: none;
    color: white;
    background-color: #171717;
    box-shadow: inset 2px 5px 10px rgb(5, 5, 5);
    margin-bottom: 15px;
}

.gaming-form label {
    color: #64ffda;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 5px;
}

.gaming-form input,
.gaming-form textarea {
    background: none;
    border: none;
    outline: none;
    width: 100%;
    color: #ccd6f6;
    padding: 0.5em;
    font-size: 16px;
    box-sizing: border-box;
}

.gaming-form input::placeholder,
.gaming-form textarea::placeholder {
    color: #64748b;
}

.gaming-form button {
    cursor: pointer;
    margin-bottom: 3em;
    padding: 1em;
    border-radius: 10px;
    border: none;
    outline: none;
    background-color: transparent;
    color: #64ffda;
    font-weight: bold;
    outline: 1px solid #64ffda;
    transition: all ease-in-out 0.3s;
    font-size: 16px;
}

.gaming-form button:hover {
    transition: all ease-in-out 0.3s;
    background-color: #64ffda;
    color: #000;
    cursor: pointer;
    box-shadow: inset 2px 5px 10px rgb(5, 5, 5);
}

.form-card1 {
    background-image: linear-gradient(163deg, #64ffda 0%, #64ffda 100%);
    border-radius: 22px;
    transition: all 0.3s;
    max-width: 500px;
    margin: 0 auto;
}

.form-card1:hover {
    box-shadow: 0px 0px 30px 1px rgba(100, 255, 218, 0.3);
}

.form-card2 {
    border-radius: 0;
    transition: all 0.2s;
}

.form-card2:hover {
    transform: scale(0.98);
    border-radius: 20px;
}

/* =================================
   RESPONSIVE DESIGN
   ================================= */
@media (max-width: 480px) {
    .demo-container {
        padding: 1rem;
        margin: 1rem 0;
    }
    
    .styles-overview {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .usage-guide, 
    .next-steps {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .minimal-form,
    .modern-form,
    .interactive-form,
    .mobile-form,
    .creative-form {
        max-width: 100%;
        padding: 15px;
    }
    
    .modern-bg {
        padding: 20px;
    }
    
    .interactive-form input,
    .interactive-form textarea {
        font-size: 16px; /* Evita zoom en iOS */
    }
}

@media (max-width: 768px) {
    .styles-overview {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .usage-guide, 
    .next-steps {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* =================================
   MEJORAS DE ACCESIBILIDAD
   ================================= */
.minimal-form input:focus,
.minimal-form textarea:focus,
.modern-form input:focus,
.modern-form textarea:focus,
.interactive-form input:focus,
.interactive-form textarea:focus,
.mobile-form input:focus,
.mobile-form textarea:focus,
.creative-form input:focus,
.creative-form textarea:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* Estados para lectores de pantalla */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}