/* styles.css - Estilos modernos para el Generador de QR */

/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    line-height: 1.6;
}

/* Contenedor principal */
.container {
    max-width: 600px;
    margin: 0 auto;
    animation: slideInUp 0.6s ease-out;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.title {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #fff, #f8f9fa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    font-weight: 300;
}

/* Card principal */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

/* Grupos de inputs */
.input-group {
    margin-bottom: 25px;
}

.label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 0.95em;
}

.input-field {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-field:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.input-field::placeholder {
    color: #adb5bd;
    font-style: italic;
}

/* Controles en fila */
.controls-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.control-group {
    display: flex;
    flex-direction: column;
}

.select-field {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 16px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.select-field:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Botones */
.btn {
    width: 100%;
    padding: 18px 30px;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.6);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
    box-shadow: 0 10px 30px rgba(86, 171, 47, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(86, 171, 47, 0.6);
}

/* Contenedor del QR */
.qr-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    margin: 30px 0;
    padding: 20px;
    border-radius: 16px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef);
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.qr-container.generating {
    background: linear-gradient(45deg, #fff3cd, #ffeaa7);
    border-color: #f39c12;
    animation: pulse 1.5s infinite;
}

.qr-container.generated {
    background: linear-gradient(45deg, #d4edda, #c3e6cb);
    border-color: #28a745;
    border-style: solid;
    transform: scale(1.02);
}

.qr-container img,
.qr-container canvas {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Tip */
.tip {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
    padding: 15px 20px;
    border-radius: 0 12px 12px 0;
    margin: 25px 0;
    font-size: 14px;
    color: #1565c0;
    box-shadow: 0 5px 15px rgba(33, 150, 243, 0.1);
}

/* Footer */
.footer {
    text-align: center;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    z-index: 1000;
    max-width: 350px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideInRight 0.3s ease;
}

.notification.success {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
}

.notification.warning {
    background: linear-gradient(135deg, #f39c12 0%, #f1c40f 100%);
}

.notification.error {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.notification.fade-out {
    animation: slideOutRight 0.3s ease forwards;
}

/* Animaciones */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    to {
        opacity: 0;
        transform: translateX(100px);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(243, 156, 18, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(243, 156, 18, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(243, 156, 18, 0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .card {
        padding: 25px;
        border-radius: 16px;
    }
    
    .title {
        font-size: 2em;
    }
    
    .controls-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .btn {
        font-size: 16px;
        padding: 15px 25px;
    }
    
    .notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 1.8em;
    }
    
    .subtitle {
        font-size: 1em;
    }
    
    .card {
        padding: 20px;
    }
    
    .input-field,
    .select-field {
        font-size: 14px;
        padding: 12px 15px;
    }
}

/* Modo oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    .card {
        background: rgba(30, 32, 37, 0.95);
        color: #e9ecef;
    }
    
    .label {
        color: #e9ecef;
    }
    
    .input-field,
    .select-field {
        background: rgba(40, 44, 52, 0.8);
        border-color: #495057;
        color: #e9ecef;
    }
    
    .input-field::placeholder {
        color: #6c757d;
    }
    
    .qr-container {
        background: linear-gradient(45deg, #495057, #6c757d);
        border-color: #adb5bd;
    }
}