/* --- Reseteo básico y variables --- */
:root {
    /* Paleta FireAlert: Rojos intensos, Naranjas y Gris Oscuro */
    --primary-color: #e52d27;  /* Rojo fuego clásico */
    --primary-gradient: linear-gradient(to right, #b31217, #e52d27);
    --secondary-color: #d35400; /* Naranja oscuro */
    
    --success-color: #27ae60; /* Verde seguridad */
    --danger-color: #c0392b;  /* Rojo peligro */
    
    /* Modo Claro */
    --body-bg: #f4f6f7;
    --bg-gradient-1: rgba(229, 45, 39, 0.06); 
    --bg-gradient-2: rgba(211, 84, 0, 0.05);  
    
    --container-bg: rgba(255, 255, 255, 0.9);
    --container-border: rgba(255, 255, 255, 0.8);
    --container-shadow: rgba(179, 18, 23, 0.1); /* Sombra rojiza sutil */
    
    --text-color: #2c3e50;
    --text-color-light: #7f8c8d;
    --text-color-faded: #bdc3c7;
    
    --time-block-bg: #ffffff;
    --time-block-border: #ecf0f1;
    
    /* Botones */
    --secondary-button-text: var(--primary-color);
    --secondary-button-border: var(--primary-color);

    /* Mockup */
    --mockup-body-bg: #2c3e50; 
    --mockup-header-bg: #c0392b; 
    --mockup-screen-bg: #ecf0f1;
}

/* Modo Oscuro */
html[data-theme='dark'] {
    --body-bg: #121212;
    --bg-gradient-1: rgba(229, 45, 39, 0.15);
    --bg-gradient-2: rgba(0, 0, 0, 0.9);
    
    --container-bg: rgba(30, 30, 30, 0.8);
    --container-border: rgba(255, 255, 255, 0.1);
    --container-shadow: rgba(0, 0, 0, 0.6);

    --text-color: #ecf0f1;
    --text-color-light: #95a5a6;
    --text-color-faded: #7f8c8d;
    
    --time-block-bg: rgba(50, 50, 50, 0.7);
    --time-block-border: rgba(255, 255, 255, 0.05);

    --secondary-button-text: #e74c3c;
    --secondary-button-border: #e74c3c;
    
    --mockup-screen-bg: #222;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem 0;
    overflow-x: hidden;
    background-color: var(--body-bg);
    background-image: 
        radial-gradient(circle at 15% 25%, var(--bg-gradient-1) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, var(--bg-gradient-2) 0%, transparent 45%);
    background-size: 140% 140%;
    animation: fire-glow 10s ease-in-out infinite alternate;
    transition: background-color 0.4s ease;
}

@keyframes fire-glow {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}

.container {
    max-width: 1200px;
    width: 90%;
    margin: auto;
    border-radius: 20px;
    padding: 3rem;
    position: relative;
    background: var(--container-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--container-border);
    box-shadow: 0 25px 50px var(--container-shadow);
    transition: all 0.4s ease;
}

/* Theme Toggle */
.theme-toggle {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: var(--time-block-bg);
    border: 1px solid var(--time-block-border);
    color: var(--text-color);
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    transition: 0.3s;
    z-index: 100;
}
.theme-toggle:hover {
    color: var(--primary-color);
    transform: rotate(15deg) scale(1.1);
}
.theme-toggle .fa-moon { display: block; }
.theme-toggle .fa-sun { display: none; }
html[data-theme='dark'] .theme-toggle .fa-moon { display: none; }
html[data-theme='dark'] .theme-toggle .fa-sun { display: block; }

/* Header & Logo */
header { text-align: center; margin-bottom: 3.5rem; }
.logo {
    font-size: 2.8rem;
    font-weight: 900;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 15px;
    letter-spacing: -1px;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.logo-icon {
    font-size: 2.2rem;
    color: #e52d27; /* Fallback */
    -webkit-text-fill-color: #e52d27;
}

/* Hero Section */
.hero { text-align: center; margin-bottom: 4rem; }
.hero h2 {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-color);
}
.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-color-light);
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
#hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 3.5rem;
}
.secondary-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-button {
    text-decoration: none;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    font-size: 1.05rem;
}

.download-button {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 8px 20px rgba(229, 45, 39, 0.25);
}
.download-button:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(229, 45, 39, 0.35);
}

.cta-button.secondary-button {
    border: 2px solid var(--secondary-button-border);
    color: var(--secondary-button-text);
    background: transparent;
}
.cta-button.secondary-button:hover {
    background: rgba(229, 45, 39, 0.05);
    transform: translateY(-2px);
}

.github-button {
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
html[data-theme='dark'] .github-button { background: #2c3e50; color: white; border-color: #34495e; }
.github-button:hover { transform: translateY(-2px); }

/* Counter */
.presentation-counter {
    border-top: 1px solid var(--text-color-faded);
    padding-top: 2rem;
    margin: 0 auto;
    max-width: 550px;
    opacity: 0.9;
}
.counter-label { font-size: 0.9rem; font-weight: 700; color: var(--text-color-light); margin-bottom: 1.2rem; text-transform: uppercase; letter-spacing: 1.5px; }
#countdown { display: flex; justify-content: center; gap: 1rem; }
.time-block {
    background: var(--time-block-bg);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--time-block-border);
    min-width: 75px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.time-block span:first-child { display: block; font-size: 1.6rem; font-weight: 800; color: var(--primary-color); line-height: 1; margin-bottom: 5px; }
.time-block .label { font-size: 0.7rem; text-transform: uppercase; font-weight: 600; color: var(--text-color-light); }

/* Features & Mockup */
.content-split {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin: 5rem 0 2rem;
}
.features { flex: 1; }
.features h3 { font-size: 2.2rem; margin-bottom: 2.5rem; color: var(--text-color); font-weight: 800; }
.features ul { list-style: none; }
.features li { display: flex; gap: 1.5rem; margin-bottom: 2.5rem; align-items: flex-start; }
.features .icon {
    background: rgba(229, 45, 39, 0.1);
    color: var(--primary-color);
    width: 60px; height: 60px;
    border-radius: 16px;
    display: grid; place-items: center;
    font-size: 1.4rem;
    flex-shrink: 0;
    transition: transform 0.3s;
}
.features li:hover .icon { transform: scale(1.1) rotate(5deg); }
.features strong { display: block; font-size: 1.2rem; color: var(--text-color); margin-bottom: 0.4rem; }
.features div { color: var(--text-color-light); font-size: 1.05rem; }


/* --- MOCKUP APP FireAlert --- */
.phone-preview { flex: 1; display: flex; justify-content: center; perspective: 1200px; }
.phone-mockup {
    width: 320px; height: 640px;
    background: var(--mockup-body-bg);
    border-radius: 45px;
    padding: 12px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.25), inset 0 0 20px rgba(0,0,0,0.5);
    transform: rotateY(-12deg) rotateX(8deg);
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.phone-mockup:hover { transform: rotateY(0) rotateX(0) translateY(-10px); }

.phone-screen {
    background: var(--mockup-screen-bg);
    width: 100%; height: 100%;
    border-radius: 35px;
    overflow: hidden;
    position: relative;
    display: flex; flex-direction: column;
}

.mock-header {
    background: linear-gradient(135deg, #cb2d3e, #ef473a); /* Rojo degradado */
    padding: 35px 25px 20px;
    color: white;
    display: flex; justify-content: space-between; align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.mock-header h4 { font-size: 1.3rem; font-weight: 700; }

.mock-body {
    flex: 1;
    padding: 25px;
    display: flex; flex-direction: column;
    gap: 2.5rem;
    overflow-y: auto;
}

/* Status Ring */
.status-container { text-align: center; margin-top: 1rem; }
.status-ring {
    width: 130px; height: 130px;
    border-radius: 50%;
    background: white;
    margin: 0 auto 1.2rem;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    position: relative;
}
.status-ring::before {
    content: '';
    position: absolute; width: 100%; height: 100%;
    border-radius: 50%;
    border: 4px solid var(--success-color);
    animation: pulse-ring 2s infinite;
}
.status-icon { font-size: 3.5rem; color: var(--success-color); }
.status-text { font-size: 1.5rem; font-weight: 800; color: var(--text-color); margin-bottom: 0.3rem; }
.status-sub { font-size: 0.95rem; color: var(--text-color-light); }

/* Logs */
.log-list { background: white; border-radius: 16px; padding: 20px; box-shadow: 0 8px 20px rgba(0,0,0,0.03); }
html[data-theme='dark'] .log-list { background: #2c3e50; }

.list-title { font-size: 0.8rem; font-weight: 700; color: var(--text-color-faded); margin-bottom: 15px; text-transform: uppercase; letter-spacing: 1px; }

.log-item { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px solid rgba(0,0,0,0.05); }
.log-item:last-child { border: none; margin: 0; padding: 0; }

.log-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 1rem; flex-shrink: 0; }
.log-item.safe .log-icon { background: rgba(39, 174, 96, 0.15); color: var(--success-color); }
.log-item.alert .log-icon { background: rgba(192, 57, 43, 0.15); color: var(--danger-color); }

.log-info { display: flex; flex-direction: column; }
.log-msg { font-weight: 700; font-size: 0.95rem; color: var(--text-color); margin-bottom: 3px; }
.log-item.alert .log-msg { color: var(--danger-color); }
.log-time { font-size: 0.8rem; color: var(--text-color-light); }

/* FAB */
.mock-fab {
    position: absolute; bottom: 25px; right: 25px;
    width: 56px; height: 56px;
    background: #ef473a;
    border-radius: 18px;
    color: white;
    display: grid; place-items: center;
    box-shadow: 0 10px 25px rgba(239, 71, 58, 0.4);
    font-size: 1.4rem;
    transition: transform 0.2s;
}
.mock-fab:hover { transform: scale(1.1); }

/* Footer */
footer { text-align: center; margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--text-color-faded); opacity: 0.7; font-size: 0.95rem; }

/* Animación Pulse */
@keyframes pulse-ring {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(39, 174, 96, 0.4); }
    70% { transform: scale(1.08); box-shadow: 0 0 0 15px rgba(39, 174, 96, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(39, 174, 96, 0); }
}

/* Responsive */
@media (max-width: 992px) {
    .content-split { flex-direction: column-reverse; gap: 4rem; }
    .hero h2 { font-size: 2.4rem; }
    .container { padding: 2rem; width: 95%; }
}