/* --- VARIABLES --- */
:root { 
    --neon: #39ff14; 
    --bg: #0a0a0a; 
    --card: #141414; 
    --text-muted: #888;
    --border: #333;
}

* { box-sizing: border-box; font-family: 'Montserrat', sans-serif; margin: 0; padding: 0; }
body { background: var(--bg); color: white; padding-bottom: 50px; }

/* --- NAVBAR --- */
nav { 
    background: black; padding: 15px 20px; 
    border-bottom: 1px solid var(--border); 
    display: flex; justify-content: space-between; align-items: center; 
    position: sticky; top: 0; z-index: 100; 
}
.brand { font-weight: 900; color: white; font-size: 1.1rem; letter-spacing: 1px; }
.brand span { color: var(--neon); }
.btn-logout { 
    font-size: 0.8rem; color: var(--text-muted); text-decoration: none; 
    border: 1px solid var(--border); padding: 5px 10px; border-radius: 4px; 
    transition: 0.3s;
}
.btn-logout:hover { color: var(--neon); border-color: var(--neon); }

/* --- LAYOUT PRINCIPAL --- */
.container { 
    max-width: 1200px; 
    margin: 20px auto; 
    padding: 0 15px; 
    display: grid; 
    grid-template-columns: 1fr 1.5fr; /* PC: Izquierda chica, Derecha grande */
    gap: 20px; 
}
.full-width { grid-column: 1 / -1; }

/* --- TARJETAS --- */
.card { 
    background: var(--card); padding: 20px; border-radius: 8px; 
    border: 1px solid #222; margin-bottom: 20px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.card h3 { 
    color: white; font-size: 1rem; font-weight: 800; 
    border-bottom: 2px solid var(--neon); padding-bottom: 8px; 
    margin-bottom: 20px; display: inline-block; text-transform: uppercase; 
}

/* --- FORMULARIOS --- */
label { 
    font-size: 0.75rem; color: var(--text-muted); font-weight: 700; 
    display: block; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 0.5px;
}
input[type="text"], input[type="number"], textarea, select, input[type="file"], input[type="password"] { 
    width: 100%; padding: 12px; margin-bottom: 15px; 
    background: #050505; border: 1px solid var(--border); color: white; 
    border-radius: 4px; font-size: 0.9rem; 
}
input:focus, textarea:focus, select:focus { border-color: var(--neon); outline: none; }
textarea { resize: vertical; height: 80px; }

/* Grid interno para Título y Fecha en la misma línea */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

button { 
    width: 100%; padding: 14px; background: var(--neon); color: black; 
    font-weight: 900; border: none; cursor: pointer; 
    text-transform: uppercase; font-size: 0.9rem; transition: 0.3s; border-radius: 4px;
}
button:hover { background: white; box-shadow: 0 0 15px rgba(57, 255, 20, 0.4); }

/* --- ZONA DE ARRASTRE (Drag & Drop) --- */
.drag-container {
    width: 100%;
    height: 300px; /* Altura en PC */
    background-color: #000;
    border: 2px dashed #444;
    position: relative;
    overflow: hidden;
    cursor: grab;
    margin-bottom: 15px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none; /* CRUCIAL para que funcione bien el dedo en el celular */
}
.drag-container:active { cursor: grabbing; border-color: var(--neon); }

.drag-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%; 
    pointer-events: none; 
    user-select: none;
}

.drag-instruction {
    position: absolute; bottom: 15px; left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8); color: white;
    padding: 6px 12px; border-radius: 20px;
    font-size: 0.75rem; pointer-events: none;
    border: 1px solid #555;
    white-space: nowrap;
}

/* --- LISTADO EVENTOS --- */
.event-item { 
    display: flex; align-items: center; justify-content: space-between;
    background: black; padding: 12px; margin-bottom: 8px; 
    border: 1px solid #222; border-radius: 6px;
}
.event-item img { 
    width: 50px; height: 50px; object-fit: cover; margin-right: 15px; border-radius: 4px;
}
.event-info { flex-grow: 1; overflow: hidden; }
.event-title { font-weight: bold; font-size: 0.9rem; display: block; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.event-date { color: #777; font-size: 0.75rem; }

.actions { display: flex; gap: 15px; align-items: center; }
.actions a { font-size: 1.1rem; padding: 5px; }

/* --- EXTRAS --- */
.preview-img { width: 100%; height: auto; max-height: 100px; object-fit: contain; background: #000; padding: 10px; border: 1px solid #333; margin-bottom: 10px; }
.sponsor-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.sponsor-item { position: relative; background: black; padding: 5px; border: 1px solid #333; }
.sponsor-item img { height: 40px; width: auto; display: block; }
.sponsor-del { position: absolute; top: -5px; right: -5px; background: red; color: white; border-radius: 50%; width: 18px; height: 18px; text-align: center; line-height: 18px; font-size: 12px; text-decoration: none; font-weight: bold; }
.alert { background: rgba(57, 255, 20, 0.15); color: var(--neon); padding: 15px; text-align: center; margin-bottom: 20px; border: 1px solid var(--neon); border-radius: 4px; }

/* --- RESPONSIVE (CELULAR) --- */
@media(max-width: 768px) { 
    /* 1. Convertir grid principal a 1 columna */
    .container { grid-template-columns: 1fr; padding: 0 10px; } 
    
    /* 2. Título y Fecha uno debajo del otro para que entren bien */
    .form-row { grid-template-columns: 1fr; gap: 0; }
    
    /* 3. Ajustar altura del recuadro de arrastre en celular */
    .drag-container { height: 250px; }
    
    /* 4. Botones más grandes para el dedo */
    button { padding: 16px; font-size: 1rem; }
    
    /* 5. Navbar */
    .brand { font-size: 1rem; }
    
    /* 6. Lista de eventos: que no se rompa si el titulo es largo */
    .event-item { padding: 10px; }
    .actions { gap: 10px; }
}

/* =========================================
   LOGIN PAGE STYLES (NUEVO)
   ========================================= */
.login-body {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: radial-gradient(circle at 50% 0%, #1a1a1a, #000);
    margin: 0;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
    background: var(--card);
    border: 1px solid #333;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: fadeIn 0.5s ease-out;
}

.login-logo {
    font-size: 2rem;
    font-weight: 900;
    font-style: italic;
    margin-bottom: 10px;
    color: white;
    letter-spacing: -1px;
}
.login-logo span { color: var(--neon); }

.login-subtitle {
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.input-group input {
    padding-left: 45px; /* Espacio para el ícono */
    margin-bottom: 0;
}

.error-msg {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid #ff4444;
    color: #ff4444;
    padding: 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login {
    width: 100%;
    padding: 15px;
    font-size: 1rem;
    margin-top: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}