/* Guide Mu Online - Estilo moderno, dinámico y animado */

:root {
    --bg-dark: #0a0a0c;
    --bg-panel: #12121a;
    --bg-card: #16161f;
    --bg-input: #1a1a24;
    --border: #2a2a3a;
    --border-hover: #3a3a4a;
    --text: #e8e8ed;
    --text-muted: #8888a0;
    --accent: #c41e3a;
    --accent-hover: #e02545;
    --accent-glow: rgba(196, 30, 58, 0.35);
    --success: #22c55e;
    --warning: #eab308;
    --error: #ef4444;
    --font-display: 'Orbitron', sans-serif;
    --font-body: 'Share Tech Mono', 'Consolas', monospace;
    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --transition: 0.25s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg-dark);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(196, 30, 58, 0.12), transparent),
        radial-gradient(ellipse 60% 40% at 100% 50%, rgba(196, 30, 58, 0.06), transparent),
        radial-gradient(ellipse 60% 40% at 0% 50%, rgba(196, 30, 58, 0.06), transparent);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover { color: var(--accent-hover); }

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

/* Layout */
.site-header {
    background: linear-gradient(180deg, rgba(18, 18, 26, 0.98) 0%, rgba(10, 10, 12, 0.95) 100%);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.header-top a {
    color: var(--text-muted);
    font-size: 0.9rem;
}
.header-top a:hover { color: var(--accent); }

.logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.logo .logo-g { color: var(--accent); }
.logo:hover { color: var(--text); }

.nav-main {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.75rem 1.5rem;
    overflow-x: auto;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

.nav-main a {
    padding: 0.5rem 0.9rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.nav-main a:hover,
.nav-main a.active {
    background: rgba(196, 30, 58, 0.15);
    color: var(--accent);
}

/* Dropdown navigation */
.nav-item-dropdown {
    position: relative;
}

.nav-dropdown-indicator {
    font-size: 0.6rem;
    color: var(--text-muted);
    margin-left: 0.15rem;
    transition: color var(--transition);
}

.nav-item-dropdown:hover .nav-dropdown-indicator {
    color: var(--accent);
}

.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    padding: 0.5rem 0;
    margin-top: 0.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
    z-index: 1000;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}

.nav-item-dropdown:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown a {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    border-radius: 0;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition), padding-left var(--transition);
}

.nav-dropdown a:hover,
.nav-dropdown a.active {
    background: rgba(196, 30, 58, 0.15);
    color: var(--accent);
    padding-left: 1.25rem;
}

/* Dropdowns anidados (sub-subcategorías) */
.nav-dropdown .nav-item-dropdown {
    position: relative;
}

.nav-dropdown .nav-item-dropdown > a {
    position: relative;
    padding-right: 2rem;
}

.nav-dropdown-nested {
    position: absolute;
    left: 100%;
    top: 0;
    margin-left: 0.25rem;
    min-width: 200px;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: opacity var(--transition), visibility var(--transition), transform var(--transition);
    z-index: 1001;
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}

.nav-dropdown .nav-item-dropdown:hover > .nav-dropdown-nested {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Ads: header strip */
.ad-header {
    padding: 0.5rem 1rem;
    background: var(--bg-panel);
    border-bottom: 1px solid var(--border);
    text-align: center;
    min-height: 60px;
}
.ad-header .ad-block { display: inline-block; max-width: 100%; }
.ad-header img,
.ad-header video { max-height: 50px; width: auto; margin: 0 auto; display: block; }

/* Main content grid */
.main-wrap {
    display: grid;
    grid-template-columns: 1fr minmax(0, 960px) 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
    .main-wrap { grid-template-columns: 1fr; }
    .sidebar-left { order: 2; }
    .sidebar-right { order: 3; }
}

.sidebar-left,
.sidebar-right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-left .panel,
.sidebar-right .panel {
    animation: fadeInUp 0.5s ease backwards;
}
.sidebar-left .panel:nth-child(1) { animation-delay: 0.1s; }
.sidebar-left .panel:nth-child(2) { animation-delay: 0.2s; }
.sidebar-left .panel:nth-child(3) { animation-delay: 0.3s; }
.sidebar-right .panel:nth-child(1) { animation-delay: 0.1s; }
.sidebar-right .panel:nth-child(2) { animation-delay: 0.2s; }
.sidebar-right .panel:nth-child(3) { animation-delay: 0.3s; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem;
    box-shadow: var(--shadow);
    transition: border-color var(--transition), box-shadow var(--transition), opacity 0.5s ease, transform 0.5s ease, background var(--transition), backdrop-filter var(--transition);
    position: relative;
    overflow: hidden;
}
.panel.reveal { opacity: 0; transform: translateY(20px); }
.panel.reveal.is-visible { opacity: 1; transform: translateY(0); }
.panel:hover {
    border-color: var(--border-hover);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    background: rgba(22, 22, 31, 0.7);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
}

.panel-title {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--accent);
    margin: 0 0 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

/* Central content */
.main-content {
    min-width: 0;
    animation: fadeInUp 0.5s ease 0.15s backwards;
}

/* Ads: between content */
.ad-between {
    margin: 1.5rem 0;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-panel);
    border: 1px dashed var(--border);
    border-radius: var(--radius);
}
.ad-between .ad-block { max-width: 100%; }

/* Guide cards */
.guide-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guide-card {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition), opacity 0.5s ease, background var(--transition), backdrop-filter var(--transition);
    position: relative;
}
.guide-card.reveal { opacity: 0; transform: translateY(20px); }
.guide-card.reveal.is-visible { opacity: 1; transform: translateY(0); }
.guide-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(196, 30, 58, 0.15);
    background: rgba(22, 22, 31, 0.75);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
}

@media (max-width: 600px) {
    .guide-card { grid-template-columns: 1fr; }
}

.guide-card-thumb {
    aspect-ratio: 16/10;
    background: var(--bg-card);
    overflow: hidden;
}
.guide-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.guide-card:hover .guide-card-thumb img { transform: scale(1.05); }

.guide-card-body { padding: 1rem 1rem 1rem 0; }
@media (max-width: 600px) { .guide-card-body { padding: 1rem; } }

.guide-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
}
.guide-card-meta .cat { color: var(--accent); }

.guide-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
    line-height: 1.3;
}
.guide-card-title a { color: inherit; }
.guide-card-title a:hover { color: var(--accent); }

.guide-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
    background: var(--accent);
    color: #fff;
    margin-left: 0.5rem;
}

/* Featured / hero */
.hero-featured {
    margin-bottom: 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: border-color var(--transition), opacity 0.5s ease, transform 0.5s ease;
    position: relative;
}
.hero-featured.reveal { opacity: 0; transform: translateY(20px); }
.hero-featured.reveal.is-visible { opacity: 1; transform: translateY(0); }
.hero-featured:hover { 
    border-color: var(--accent);
}
.hero-featured:hover .hero-featured-body {
    background: rgba(22, 22, 31, 0.8);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
}

.hero-featured a {
    display: block;
    color: inherit;
}
.hero-featured a:hover { color: inherit; }

.hero-featured-img {
    aspect-ratio: 21/9;
    background: var(--bg-card);
    overflow: hidden;
}
.hero-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.hero-featured:hover .hero-featured-img img { transform: scale(1.03); }

.hero-featured-body {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(180deg, var(--bg-panel) 0%, var(--bg-card) 100%);
}
.hero-featured-title {
    font-family: var(--font-display);
    font-size: 1.4rem;
    margin: 0 0 0.5rem;
}
.hero-featured-meta { font-size: 0.85rem; color: var(--text-muted); }

/* Single guide page */
.guide-single .guide-header {
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.5s ease backwards;
}
.guide-single .guide-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}
.guide-single .guide-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin: 0 0 1rem;
    line-height: 1.3;
}
.guide-single .guide-featured-img {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border);
}
.guide-single .guide-featured-img img { width: 100%; height: auto; }

.guide-content {
    font-size: 1rem;
    line-height: 1.75;
    animation: fadeInUp 0.5s ease 0.1s backwards;
}
.guide-content h2, .guide-content h3 {
    font-family: var(--font-display);
    color: var(--accent);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.guide-content p { margin: 0 0 1rem; }
.guide-content ul, .guide-content ol { margin: 0 0 1rem; padding-left: 1.5rem; }
.guide-content img { border-radius: var(--radius-sm); margin: 1rem 0; }

/* Changelog list */
.changelog-list { list-style: none; padding: 0; margin: 0; }
.changelog-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.changelog-list li:last-child { border-bottom: 0; }
.changelog-list .date { color: var(--text-muted); flex-shrink: 0; }
.changelog-list .title { color: var(--text); }

/* Noticias Globales */
.news-global {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    transition: border-color var(--transition), box-shadow var(--transition), background var(--transition), backdrop-filter var(--transition);
    position: relative;
    overflow: hidden;
}
.news-global:hover {
    background: rgba(22, 22, 31, 0.7);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(196, 30, 58, 0.2);
}

/* Noticia destacada (última noticia completa) */
.news-featured {
    transition: transform var(--transition), box-shadow var(--transition);
}
.news-featured:hover {
    transform: translateY(-4px);
}
.news-featured a {
    display: block;
    text-decoration: none;
    color: inherit;
}
.news-featured img {
    transition: transform 0.5s ease;
}
.news-featured:hover img {
    transform: scale(1.05);
}
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.news-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
    transition: background var(--transition);
}
.news-item:hover {
    background: rgba(255, 255, 255, 0.02);
    padding-left: 0.25rem;
}
.news-item:last-child {
    border-bottom: 0;
}
.news-icon {
    color: var(--success);
    font-size: 0.6rem;
    flex-shrink: 0;
    line-height: 1;
}
.news-link {
    flex: 1;
    color: var(--text);
    text-decoration: none;
    transition: color var(--transition);
}
.news-link:hover {
    color: var(--accent);
}
.news-badge {
    display: inline-block;
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.news-badge-new {
    background: var(--accent);
    color: #fff;
}
.news-badge-hot {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #000;
    font-weight: 700;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

/* Footer ads */
.ad-footer { margin-top: 2rem; }

/* Footer */
.site-footer {
    margin-top: 0;
    padding: 2rem 1.5rem;
    background: var(--bg-panel);
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

/* Powered by Gabo Develop */
.powered-by {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.powered-by-text {
    color: var(--text-muted);
    font-family: var(--font-body);
}

.powered-by-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 600;
    text-decoration: none;
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.1), rgba(196, 30, 58, 0.05));
    border: 1px solid rgba(196, 30, 58, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.powered-by-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.powered-by-link:hover::before {
    left: 100%;
}

.powered-by-link:hover {
    color: var(--accent);
    border-color: var(--accent);
    background: linear-gradient(135deg, rgba(196, 30, 58, 0.2), rgba(196, 30, 58, 0.1));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(196, 30, 58, 0.3);
}

.powered-by-glow {
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent-glow);
    animation: poweredByGlow 2s ease-in-out infinite;
    font-weight: 700;
    letter-spacing: 0.05em;
}

@keyframes poweredByGlow {
    0%, 100% {
        text-shadow: 0 0 8px var(--accent-glow), 0 0 12px var(--accent-glow);
        opacity: 1;
    }
    50% {
        text-shadow: 0 0 12px var(--accent-glow), 0 0 20px var(--accent-glow), 0 0 30px var(--accent-glow);
        opacity: 0.9;
    }
}

.powered-by-link:hover .powered-by-glow {
    animation: poweredByPulse 0.6s ease-in-out infinite;
}

@keyframes poweredByPulse {
    0%, 100% {
        text-shadow: 0 0 12px var(--accent-glow), 0 0 20px var(--accent-glow), 0 0 30px var(--accent-glow);
        transform: scale(1);
    }
    50% {
        text-shadow: 0 0 16px var(--accent-glow), 0 0 28px var(--accent-glow), 0 0 40px var(--accent-glow);
        transform: scale(1.05);
    }
}

/* Ad blocks in sidebars */
.ad-block {
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-card);
}
.ad-block img,
.ad-block video {
    width: 100%;
    height: auto;
    display: block;
}
.ad-block video {
    border-radius: var(--radius-sm);
}
.ad-block .ad-link { display: block; }
.ad-block .ad-link:hover { opacity: 0.9; }
.ad-block .ad-link:hover video { opacity: 0.9; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

/* Search form */
.search-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.search-form input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: inherit;
}
.search-form input:focus {
    outline: none;
    border-color: var(--accent);
}
.search-form button {
    padding: 0.5rem 1rem;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    cursor: pointer;
    transition: background var(--transition);
}
.search-form button:hover { background: var(--accent-hover); }

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 12, 0.85);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
}
.loading-overlay.active {
    display: flex;
}
.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.loading-text {
    color: var(--text);
    font-size: 0.9rem;
    font-family: var(--font-display);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
    pointer-events: none;
}
.toast {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 300px;
    pointer-events: auto;
    animation: toastSlideIn 0.3s ease;
    position: relative;
}
.toast.toast-success {
    border-left: 4px solid var(--success);
}
.toast.toast-error {
    border-left: 4px solid var(--error);
}
.toast.toast-info {
    border-left: 4px solid var(--accent);
}
.toast.toast-warning {
    border-left: 4px solid var(--warning);
}
.toast-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
    line-height: 1;
}
.toast-success .toast-icon { color: var(--success); }
.toast-error .toast-icon { color: var(--error); }
.toast-info .toast-icon { color: var(--accent); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-content {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}
.toast-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text);
}
.toast-message {
    color: var(--text-muted);
}
.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.25rem;
    line-height: 1;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: color 0.2s;
}
.toast-close:hover {
    color: var(--text);
}
@keyframes toastSlideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
.toast.toast-exit {
    animation: toastSlideOut 0.3s ease forwards;
}
@keyframes toastSlideOut {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}
