/* styles.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&display=swap');

body { 
    background-color: #0f172a; 
    font-family: 'Inter', sans-serif; 
    height: 100vh; 
    display: flex; 
    flex-direction: column; 
    color: #e2e8f0; 
    margin: 0;
}

/* Scrollbar oscura */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #1e293b; }
::-webkit-scrollbar-thumb { background: #475569; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #64748b; }

.glass-panel {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
}

.auth-btn {
    font-size: 0.75rem; font-weight: bold; padding: 6px 16px; border-radius: 999px;
    border: 1px solid transparent; transition: all 0.3s; cursor: pointer; letter-spacing: 0.5px;
}
.auth-off { background: rgba(234, 179, 8, 0.1); color: #facc15; border-color: rgba(234, 179, 8, 0.2); }
.auth-off:hover { background: rgba(234, 179, 8, 0.2); }
.auth-on { background: rgba(74, 222, 128, 0.1); color: #4ade80; border-color: rgba(74, 222, 128, 0.2); }

.canvas-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: radial-gradient(#334155 1px, transparent 1px);
    background-size: 20px 20px;
    overflow: hidden;
    position: relative;
}

.generated-media {
    max-width: 95%;
    max-height: 80vh;
    border-radius: 8px;
    box-shadow: 0 20px 50px -12px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    background: #000;
}

.loader {
    width: 48px; height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: #3b82f6; /* Cambiado a azul para Grok */
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}
@keyframes rotation { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Controles */
.control-input {
    background: #0f172a; border: 1px solid #334155; color: white;
    padding: 10px; border-radius: 6px; width: 100%; outline: none;
    transition: border-color 0.2s;
}
.control-input:focus { border-color: #3b82f6; }

.ratio-btn {
    background: #1e293b; border: 1px solid #334155; color: #94a3b8;
    padding: 8px; border-radius: 6px; cursor: pointer; flex: 1; text-align: center; font-size: 0.8rem;
}
.ratio-btn.active { background: #1e3a8a; color: #93c5fd; border-color: #3b82f6; }

/* Select personalizado para modelos */
select.control-input option {
    background-color: #0f172a;
    color: white;
    padding: 10px;
}

/* Slider Custom */
input[type=range] {
    -webkit-appearance: none; width: 100%; background: transparent;
}
input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none; height: 16px; width: 16px; border-radius: 50%;
    background: #3b82f6; cursor: pointer; margin-top: -6px; box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}
input[type=range]::-webkit-slider-runnable-track {
    width: 100%; height: 4px; cursor: pointer; background: #334155; border-radius: 2px;
}

/* Upload Area */
.upload-area {
    border: 2px dashed #334155; border-radius: 8px; padding: 12px;
    text-align: center; transition: all 0.2s; cursor: pointer; position: relative;
}
.upload-area:hover { border-color: #3b82f6; background: rgba(59, 130, 246, 0.05); }
.upload-preview {
    width: 100%; height: 80px; object-fit: cover; border-radius: 4px; display: none;
}