/* ============================================
   FAKEGHOST CHILE - ESTILOS PRINCIPALES
   Temática paranormal con animaciones
   ============================================ */

/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
    /* Colores principales - Fondo blanco como pediste */
    --color-primary: #1a1a2e;
    --color-secondary: #16213e;
    --color-accent: #e94560;
    --color-accent-dark: #c41e3a;
    --color-success: #00d9ff;
    --color-warning: #ff6b35;
    
    /* Fondo blanco */
    --color-bg: #ffffff;
    --color-bg-secondary: #f8f9fa;
    --color-bg-card: #ffffff;
    
    /* Textos sobre fondo blanco */
    --color-text: #1a1a2e;
    --color-text-muted: #6c757d;
    --color-text-light: #495057;
    
    /* Sombras paranormales */
    --shadow-sm: 0 2px 4px rgba(233, 69, 96, 0.1);
    --shadow-md: 0 4px 6px rgba(233, 69, 96, 0.15);
    --shadow-lg: 0 10px 25px rgba(233, 69, 96, 0.2);
    --shadow-glow: 0 0 20px rgba(233, 69, 96, 0.3);
    
    /* Tipografías */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Creepster', cursive;
    --font-horror: 'Nosifer', cursive;
    
    /* Transiciones */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ============================================
   RESET Y BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   EFECTO DE NIEBLA PARANORMAL
   ============================================ */
.fog-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.fog {
    position: absolute;
    width: 200%;
    height: 100%;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(233, 69, 96, 0.03) 25%,
        rgba(233, 69, 96, 0.05) 50%,
        rgba(233, 69, 96, 0.03) 75%,
        transparent 100%
    );
    animation: fogMove 30s linear infinite;
}

.fog-1 {
    top: 0;
    animation-duration: 25s;
}

.fog-2 {
    top: 20%;
    animation-duration: 35s;
    animation-delay: -10s;
}

.fog-3 {
    top: 40%;
    animation-duration: 30s;
    animation-delay: -5s;
}

@keyframes fogMove {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0%);
    }
}

/* ============================================
   NAVEGACIÓN
   ============================================ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(233, 69, 96, 0.1);
    padding: 1rem 0;
    z-index: 1000;
    transition: var(--transition-normal);
}

.navbar.scrolled {
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.98);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-ghost {
    font-size: 2rem;
    animation: float 3s ease-in-out infinite;
}

.logo-text {
    font-family: var(--font-display);
    color: var(--color-primary);
    letter-spacing: 1px;
}

.logo-chile {
    color: var(--color-accent);
    font-size: 0.9rem;
    font-weight: 600;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--color-text);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition-normal);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-accent);
    background: rgba(233, 69, 96, 0.05);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition-normal);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-login {
    border: 2px solid var(--color-accent);
    border-radius: 8px;
}

.nav-register {
    background: var(--color-accent);
    color: white;
    border-radius: 8px;
}

.nav-register:hover {
    background: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 3px;
    transition: var(--transition-fast);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 4rem;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 1) 0%,
        rgba(248, 249, 250, 1) 50%,
        rgba(233, 69, 96, 0.05) 100%
    );
    overflow: hidden;
    z-index: 2;
}

.hero-content {
    max-width: 800px;
    text-align: center;
    position: relative;
    z-index: 3;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--color-primary);
    margin-bottom: 1rem;
    line-height: 1.1;
    position: relative;
}

/* Efecto Glitch */
.glitch {
    position: relative;
    animation: glitch-skew 3s infinite;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--color-accent);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--color-success);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
    }
    20% {
        clip: rect(85px, 9999px, 47px, 0);
    }
    40% {
        clip: rect(59px, 9999px, 78px, 0);
    }
    60% {
        clip: rect(12px, 9999px, 65px, 0);
    }
    80% {
        clip: rect(73px, 9999px, 29px, 0);
    }
    100% {
        clip: rect(41px, 9999px, 56px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 19px, 0);
    }
    20% {
        clip: rect(28px, 9999px, 73px, 0);
    }
    40% {
        clip: rect(91px, 9999px, 42px, 0);
    }
    60% {
        clip: rect(53px, 9999px, 87px, 0);
    }
    80% {
        clip: rect(15px, 9999px, 61px, 0);
    }
    100% {
        clip: rect(79px, 9999px, 34px, 0);
    }
}

@keyframes glitch-skew {
    0% {
        transform: skew(0deg);
    }
    10% {
        transform: skew(-2deg);
    }
    20% {
        transform: skew(2deg);
    }
    30% {
        transform: skew(0deg);
    }
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    color: var(--color-accent);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-description {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--color-text-light);
    margin-bottom: 2.5rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================
   BOTONES
   ============================================ */
.btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-normal);
    border: none;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: var(--color-accent);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background: var(--color-accent-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-3px);
}

/* ============================================
   PARTÍCULAS FLOTANTES
   ============================================ */
.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 2;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--color-accent);
    border-radius: 50%;
    opacity: 0.6;
    animation: particleFloat linear infinite;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) translateX(100px) rotate(360deg);
        opacity: 0;
    }
}

/* ============================================
   SECCIÓN DE ESTADÍSTICAS
   ============================================ */
.stats-section {
    padding: 4rem 2rem;
    background: var(--color-bg-secondary);
    position: relative;
    z-index: 2;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--color-bg-card);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================
   SECCIONES
   ============================================ */
.featured-section,
.recent-posts {
    padding: 6rem 2rem;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    text-align: center;
    margin-bottom: 3rem;
    color: var(--color-primary);
    position: relative;
    display: inline-block;
    width: 100%;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--color-accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

/* ============================================
   TARJETAS DE CARACTERÍSTICAS
   ============================================ */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--color-bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-success));
    transform: scaleX(0);
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-primary);
}

.feature-card p {
    color: var(--color-text-light);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.feature-link {
    color: var(--color-accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition-fast);
}

.feature-link:hover {
    gap: 1rem;
}

/* ============================================
   POSTS GRID
   ============================================ */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.post-card {
    background: var(--color-bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    border: 2px solid transparent;
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-accent);
}

.post-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition-slow);
}

.post-card:hover .post-image {
    transform: scale(1.1);
}

.post-content {
    padding: 1.5rem;
}

.post-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--color-primary);
}

.post-content p {
    color: var(--color-text-light);
    line-height: 1.6;
}

/* Skeleton loading */
.skeleton {
    animation: skeleton-loading 1s linear infinite alternate;
}

@keyframes skeleton-loading {
    0% {
        background-color: hsl(200, 20%, 90%);
    }
    100% {
        background-color: hsl(200, 20%, 95%);
    }
}

.skeleton-img {
    height: 200px;
}

.skeleton-text {
    height: 20px;
    margin: 10px 0;
    border-radius: 4px;
}

.skeleton-text.short {
    width: 60%;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
    background: var(--color-primary);
    color: white;
    padding: 4rem 2rem 2rem;
    position: relative;
    z-index: 2;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
}

.footer-col p {
    line-height: 1.8;
    opacity: 0.9;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.8rem;
}

.footer-col ul li a {
    opacity: 0.8;
    transition: var(--transition-fast);
}

.footer-col ul li a:hover {
    opacity: 1;
    color: var(--color-accent);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 1.5rem;
    transition: var(--transition-normal);
}

.social-links a:hover {
    background: var(--color-accent);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

.visitor-count {
    margin-top: 0.5rem;
    color: var(--color-success);
    font-weight: 600;
}

/* ============================================
   UTILIDADES
   ============================================ */
.text-center {
    text-align: center;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        transition: var(--transition-normal);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    .hero {
        padding: 6rem 1rem 3rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .stats-grid,
    .features-grid,
    .posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}
