/* ==========================================================================
   PALETA DE COLORES Y REGLAS GENERALES (MODO OSCURO PURO)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #1a1a1a;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* NAVBAR PRINCIPAL (Expandido al 100% de lado a lado) */
.navbar {
    background-color: #121212;
    padding: 20px 40px;
    width: 100%;
    display: flex;
    align-items: center;
}

.brand-logo {
    background-color: #ffcc00;
    color: #000000;
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 8px 16px;
    border-radius: 4px;
    letter-spacing: 0.5px;
}

/* CONTENEDOR PRINCIPAL (Centrado y controlado) */
.main-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* SISTEMA DE PANTALLAS CON ANIMACIÓN FADE-IN */
.screen {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    width: 100%;
}

.screen.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   PANTALLA 1: INICIO (SPLIT LAYOUT SIMÉTRICO)
   ========================================================================== */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    margin-top: 50px;
    align-items: stretch;
}

/* PANEL IZQUIERDO: PRIVACIDAD Y DONACIÓN LIMPIO */
.left-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Separa los bloques arriba y abajo */
}

.privacy-box {
    background-color: #8b2500; /* Rojo/Ladrillo idéntico */
    color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    font-weight: 700;
    text-align: center;
    line-height: 1.5;
    font-size: 1.05rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.donation-pitch {
    background-color: transparent; /* Quitamos el recuadro gris molesto */
    margin-top: auto; /* Fuerza el anclaje abajo */
}

.donation-pitch p {
    color: #888888;
    font-size: 0.9rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

/* PANEL DERECHO: ZONA DE CARGA */
.right-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tool-title {
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: 1px;
    margin-bottom: 20px;
    text-align: center;
}

.drop-zone {
    border: 2px dashed #333333;
    background-color: #121212;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    min-height: 260px;
    transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
}

.drop-zone.dragover {
    border-color: #ffcc00;
    background-color: #151515;
    transform: scale(1.02);
}

.drag-text {
    color: #555555;
    margin-top: 15px;
    font-size: 0.9rem;
}

/* BOTONES ESTILIZADOS */
.btn-yellow {
    background-color: #ffcc00;
    color: #000000;
    border: none;
    padding: 14px 28px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    text-decoration: none;
    font-size: 0.85rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
    display: inline-block;
    letter-spacing: 0.5px;
}

.btn-yellow:hover {
    background-color: #e6b800;
    transform: translateY(-2px);
}

.text-center {
    text-align: center;
    width: 100%;
}

/* ==========================================================================
   PANTALLA 2: PANTALLA DE CARGA (SPINNER Y DATOS CURIOSOS)
   ========================================================================== */
.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    text-align: center;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #121212;
    border-top: 5px solid #ffcc00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 25px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-content h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    font-weight: 700;
}

.did-you-know-box {
    background-color: #121212;
    border-left: 4px solid #ffcc00;
    padding: 25px;
    border-radius: 0 8px 8px 0;
    max-width: 650px;
    text-align: left;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.did-you-know-box h3 {
    color: #ffcc00;
    font-size: 1.1rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.did-you-know-box p {
    color: #aaaaaa;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ==========================================================================
   PANTALLA 3: RESULTADOS (REJILLA DE VISTA PREVIA)
   ========================================================================== */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #222;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.btn-success {
    background-color: #2ea44f;
    color: white;
    border: none;
    padding: 12px 26px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-success:hover {
    background-color: #2c974b;
    transform: translateY(-2px);
}

.grid-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
    background-color: #121212;
    padding: 25px;
    border-radius: 8px;
    min-height: 220px;
    border: 1px solid #222;
}

.preview-card {
    position: relative;
    background-color: #1a1a1a;
    border-radius: 6px;
    padding: 8px;
    border: 1px solid #222;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.preview-card img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 4px;
    background-color: #0b0b0b;
}

.preview-card .file-name {
    font-size: 0.75rem;
    color: #777777;
    margin-top: 8px;
    text-align: center;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-delete-img {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: #ea4335;
    color: white;
    border: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.65rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    transition: background-color 0.2s ease;
}

.btn-delete-img:hover {
    background-color: #d3382c;
}

.results-footer-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    border-top: 1px solid #222;
    padding-top: 25px;
}

.btn-secondary {
    background-color: #121212;
    color: #888888;
    border: 1px solid #222;
    padding: 12px 22px;
    font-weight: 600;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover {
    background-color: #222;
    color: #fff;
}

.clickable-label {
    display: inline-block;
}

/* CONTENEDOR ANUNCIOS ESTÁTICO INFERIOR COMPLETAMENTE ALINEADO */
.ad-space-banner, .ad-space-large {
    margin-top: 40px;
    width: 100%;
    min-height: 100px;
    background-color: #121212;
    border-radius: 6px;
    border: 1px solid #222;
    display: flex;
    justify-content: center;
    align-items: center;
}