* { margin: 0; padding: 0; box-sizing: border-box; }

@font-face {
    font-family: 'Material Symbols Outlined';
    font-style: normal;
    font-weight: 100 700;
    src: url('../fonts/material-symbols-outlined.woff2') format('woff2');
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

html { scroll-behavior: smooth; }

* { scrollbar-width: thin; scrollbar-color: var(--border-color) transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
*::-webkit-scrollbar-track { background: transparent; }

:root {
    --color-primary: #d46040;
    --color-primary-light: #e8846a;
    --color-primary-dark: #b84c30;

    --gray-50: #f8f7f5;
    --gray-100: #efedeb;
    --gray-200: #ddd9d5;
    --gray-300: #c4bfba;
    --gray-400: #a39d96;
    --gray-500: #847e78;
    --gray-600: #66605a;
    --gray-700: #4a4642;
    --gray-800: #2e2b28;
    --gray-900: #1a1816;

    --bg-color: #f6f5f3;
    --text-color: #2a2725;
    --text-secondary: #6b6660;
    --text-muted: #948e88;
    --card-bg: #ffffff;
    --border-color: #e6e3df;
    --header-bg: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.05);
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --max-width: 740px;
    --max-width-wide: 1000px;
}

.theme-dark {
    --color-primary: #ff6b55;
    --color-primary-light: #ff8a77;
    --color-primary-dark: #e05540;

    --gray-50: #1a100b;
    --gray-100: #241711;
    --gray-200: #332219;
    --gray-300: #453024;
    --gray-400: #664b3b;
    --gray-500: #876857;
    --gray-600: #aa8c7b;
    --gray-700: #cdb2a3;
    --gray-800: #ebd8cd;
    --gray-900: #f7eee8;

    /* Fondos súper profundos */
    --bg-color: #0d0705;
    --card-bg: #150d09;
    --header-bg: #0d0705;
    --border-color: #2b1c14;

    /* Textos (se mantienen claros para no perder legibilidad) */
    --text-color: #f0e2d8;
    --text-secondary: #a38878;
    --text-muted: #b39c8f;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
}

html, body { overflow-x: hidden; }

body {
    font-family: 'Lora', Georgia, 'Times New Roman', serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1.1rem;
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }

img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

/* ========== TOPBAR ========== */
.topbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
    background: var(--header-bg);
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar .logo {
    padding: 10px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.topbar .logo a { color: var(--text-secondary); }
.topbar .logo a span { color: var(--color-primary); }

.topbar .first-child,
.topbar .box-btn-search {
    padding-inline: 16px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 28px;
    cursor: pointer;
    transition: color 0.2s;
}

.topbar .first-child:hover,
.topbar .box-btn-search:hover {
    color: var(--color-primary);
}

/* ========== SEARCH BOX ========== */
.search-box {
    width: 100%;
    padding: 12px 16px;
    display: flex;
    justify-content: center;
    gap: 8px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
}

.search-box input {
    flex: 1;
    max-width: 600px;
    font-size: 0.95rem;
    font-family: 'Lora', Georgia, serif;
    padding: 0 12px;
    height: 48px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-color);
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s;
}

.search-box input:focus {
    border-color: var(--color-primary);
}

.search-box .material-symbols-outlined {
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    height: 48px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.search-box .material-symbols-outlined:hover {
    color: var(--color-primary);
}

/* ========== MENU OVERLAY ========== */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    z-index: 99;
}

.menu-overlay.show { display: block; }

/* ========== LEFT MENU ========== */
.left-menu {
    width: 360px;
    height: 100vh;
    background-color: var(--card-bg);
    position: fixed;
    z-index: 100;
    top: 0;
    left: 0;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 8px 20px;
    transform: translateX(0);
    display: flex;
    flex-direction: column;
}

.left-menu h3 {
    margin-block: 16px;
    font-weight: 600;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.left-menu .top-left-menu {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 8px 0;
}

.left-menu .top-left-menu span {
    font-size: 24px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.left-menu .top-left-menu span:hover { color: var(--color-primary); }

.left-menu .top-left-menu a {
    color: var(--text-secondary);
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.left-menu .top-left-menu a span { color: var(--color-primary); font-size: inherit; }

.left-menu-user {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.left-menu-user .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.left-menu-user .user-avatar {
    font-size: 32px;
    color: var(--color-primary);
}

.left-menu-user .user-meta {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.left-menu-user .user-name {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-color);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.left-menu-user .user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'Lora', serif;
}

.left-menu-user .user-logout { margin-left: auto; }

.left-menu-user .user-logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-width: 44px;
    padding: 0 10px;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: color 0.2s, border-color 0.2s;
}

.left-menu-user .user-logout-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.left-menu-user .user-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-muted);
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.left-menu-user .user-action-btn:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
    background: transparent;
}

.left-menu-user .user-action-btn-staff {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.left-menu .posts {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.left-menu .posts .post {
    box-shadow: none;
    padding: 0;
    margin: 0;
    background: none;
    border: none;
}

.left-menu .posts .post h2 {
    font-size: 1rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 300px;
    overflow: hidden;
}

.left-menu .posts .post h2 a { color: var(--text-color); }
.left-menu .posts .post .fecha { font-size: 0.75rem; color: var(--text-muted); font-family: 'Lora', serif; }
.left-menu .posts .post .content { font-size: 0.8rem; color: var(--text-secondary); }

.left-menu .extra-links {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.left-menu .extra-links a {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 6px 0;
    font-family: 'Lora', serif;
    transition: color 0.2s;
}

.left-menu .extra-links a:hover { color: var(--color-primary); }

.left-menu .theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    cursor: pointer;
    color: var(--text-muted);
    font-size: 24px;
    transition: color 0.2s;
}

.left-menu .theme-toggle:hover { color: var(--color-primary); }

.left-menu .theme-toggle .icon-dark { display: none; }
.theme-dark .left-menu .theme-toggle .icon-light { display: none; }
.theme-dark .left-menu .theme-toggle .icon-dark { display: inline; }

.left-menu.close { transform: translateX(-100%); }

/* ========== NAV TAGS ========== */
.nav-tags {
    width: 100%;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--border-color);
    background: var(--header-bg);
}

.nav-tags ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
    margin: 0;
    padding: 0;
    width: var(--max-width-wide);
    max-width: 100%;
    list-style: none;
}

.nav-tags ul li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-tags ul li a {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    padding: 14px 16px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 0.2s;
    position: relative;
}

.nav-tags ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.2s;
}

.nav-tags ul li a:hover { color: var(--color-primary); }
.nav-tags ul li a:hover::after { width: 60%; }

.nav-tags ul li a.aporte { color: var(--color-primary); }

/* ========== CONTAINER ========== */
.container {
    margin: 0 auto;
    padding: 0 16px;
    max-width: var(--max-width-wide);
}

/* ========== POSTS ========== */
.posts {
    display: flex;
    flex-direction: column;
    row-gap: 32px;
    margin: 32px auto;
    align-items: center;
}

.posts.detalle-entrada {
    max-width: var(--max-width);
}

.posts .post {
    width: 100%;
    max-width: var(--max-width);
    display: flex;
    flex-direction: column;
    row-gap: 8px;
    background: var(--card-bg);
    padding: 28px 32px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    transition: box-shadow 0.2s;
}

.theme-dark .posts .post {
    box-shadow: var(--shadow-sm);
}

.posts .post h1,
.posts .post h2,
.posts .post h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--text-color);
    line-height: 1.3;
    margin: 0;
}

.posts .post h1 {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.posts .post h2 {
    font-size: 1.5rem;
}

.posts .post h3 {
    font-size: 1.35rem;
}

.posts .post h3 a,
.posts .post h2 a,
.posts .post h1 a {
    color: var(--text-color);
    transition: color 0.2s;
}

.posts .post h3 a:hover,
.posts .post h2 a:hover,
.posts .post h1 a:hover {
    color: var(--color-primary);
}

.theme-dark .posts .post h1,
.theme-dark .posts .post h2,
.theme-dark .posts .post h3 {
    text-shadow: 0 0 30px rgba(255,107,85,0.06);
}

.posts .post .date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.posts .post .content {
    color: var(--text-color);
    line-height: 1.8;
}

.posts .post .content p {
    margin: 0 0 16px 0;
}

.posts .post .content p strong.title {
    color: var(--text-color);
    font-weight: 600;
}

.posts .post .content .twitter-tweet {
    margin: 0 auto;
}

.posts .post .content strong {
    color: var(--color-primary);
    font-weight: 600;
}

.posts .post .content ul {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 16px;
}

.posts .post .content h5 {
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
    margin: 16px 0 8px;
}

.posts .post .content h6 {
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    margin: 12px 0 6px;
}

.posts .post .content blockquote {
    border-left: 3px solid var(--color-primary);
    padding: 8px 16px;
    margin: 16px 0;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--gray-50);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.theme-dark .posts .post .content blockquote {
    background: rgba(255,107,85,0.04);
}

.posts .post .img {
    text-align: center;
    margin: 12px 0;
}

.posts .post .img img {
    border-radius: var(--radius-sm);
}

/* Buenos días */
.posts .post.buenosdias .content {
    font-family: 'Delius', cursive;
    font-size: 1.6rem;
    line-height: 1.5;
    color: var(--color-primary);
}

.theme-dark .posts .post.buenosdias .content {
    text-shadow: 0 0 20px rgba(255,107,85,0.15);
}

/* Cita destacada (entradas.comment) */
.posts .post .entry-quote {
    max-width: 680px;
    margin: 20px auto;
    padding: 0 12px;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.posts .post .entry-quote p {
    display: inline;
    margin: 0;
}

.posts .post .entry-quote p + p::before {
    content: ' ';
}

.posts .post .entry-quote::before,
.posts .post .entry-quote::after {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.8em;
    line-height: 0;
    vertical-align: -0.38em;
    color: var(--color-primary);
}

.posts .post .entry-quote::before {
    content: '\201C';
    margin-right: 4px;
}

.posts .post .entry-quote::after {
    content: '\201D';
    margin-left: 4px;
}

/* Tags */
.posts .post .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 16px;
}

.posts .post .tags .tag {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: 999px;
    padding: 4px 14px;
    font-weight: 600;
    font-size: 0.75rem;
    font-family: 'Poppins', sans-serif;
    text-transform: lowercase;
    transition: all 0.2s;
}

.posts .post .tags .tag:hover {
    background: var(--color-primary);
    color: #fff;
}

.theme-dark .posts .post .tags .tag {
    box-shadow: 0 0 12px rgba(255,107,85,0.08);
}

.theme-dark .posts .post .tags .tag:hover {
    box-shadow: 0 0 20px rgba(255,107,85,0.25);
}

/* Comment count */
.posts .post .comment {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.posts .post .comment .material-symbols-outlined {
    font-size: 18px;
    font-family: 'Material Symbols Outlined';
}

/* Social share */
.posts .post .share-sn {
    display: flex;
    justify-content: center;
    column-gap: 6px;
    margin-top: 8px;
}

.posts .post .share-sn a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.posts .post .share-sn a:hover {
    background: var(--gray-50);
}

.theme-dark .posts .post .share-sn a:hover {
    background: rgba(255,107,85,0.08);
}

.posts .post .share-sn a svg {
    width: 18px;
    height: 18px;
    fill: var(--text-muted);
    transition: fill 0.2s;
}

.posts .post .share-sn a:hover svg {
    fill: var(--color-primary);
}

.theme-dark .posts .post .share-sn a:hover svg {
    fill: var(--color-primary);
    filter: drop-shadow(0 0 6px rgba(255,107,85,0.4));
}

/* Social networks inside posts */
.posts .post .redes-sociales {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    column-gap: 16px;
    padding: 12px 0;
    margin: 16px 0 0;
    font-size: 24px;
}

.posts .post .redes-sociales a svg {
    width: 24px;
    height: 24px;
    fill: var(--color-primary);
}

.theme-dark .posts .post .redes-sociales a svg {
    filter: drop-shadow(0 0 6px rgba(255,107,85,0.3));
}

/* Foto card (horóscopo / profesional) */
.posts .post .foto-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    margin: 0 0 16px 0;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border-left: 3px solid var(--color-primary);
}

.theme-dark .posts .post .foto-card {
    background: rgba(255,107,85,0.04);
    box-shadow: 0 0 12px rgba(255,107,85,0.06);
}

.posts .post .foto-card img {
    width: 200px;
    height: 200px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
}

.theme-dark .posts .post .foto-card img {
    box-shadow: 0 0 16px rgba(255,107,85,0.15);
}

.posts .post .foto-card .foto-card-info {
    display: flex;
    flex-direction: column;
}

.posts .post .foto-card .foto-card-nombre {
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    color: var(--color-primary);
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.posts .post .foto-card .foto-card-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========== COMENTARIOS ========== */
.comentarios-wrapper {
    max-width: var(--max-width);
    margin: 0 auto 48px;
    padding: 0;
}

.comentarios-wrapper h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-color);
}

.total-comentarios {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.total-comentarios span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.total-comentarios span.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-size: 18px;
}

.comentarios {
    display: flex;
    flex-direction: column;
    row-gap: 12px;
}

.comentarios .comentario {
    display: flex;
    flex-direction: column;
    row-gap: 4px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
}

.comentarios .comentario .nombre-usuario {
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: var(--text-color);
}

.comentarios .comentario .fecha {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.comentarios .comentario p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.comentarios-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    row-gap: 4px;
    padding: 14px 16px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
}

.comentarios-empty .material-symbols-outlined {
    font-size: 22px;
    color: var(--text-muted);
    opacity: 0.6;
}

.comentarios-empty p {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.add-comentario {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    row-gap: 8px;
    margin-top: 20px;
}

.add-comentario textarea {
    width: 100%;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
    padding: 12px;
    height: 48px;
    min-height: 80px;
    resize: vertical;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--card-bg);
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s;
}

.add-comentario textarea:focus {
    border-color: var(--color-primary);
}

.add-comentario .btn {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 24px;
    height: 48px;
    background: var(--color-primary);
    color: #fff;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.add-comentario .btn:hover {
    background: var(--color-primary-dark);
}

.theme-dark .add-comentario .btn {
    box-shadow: 0 0 20px rgba(255,107,85,0.2);
}

.theme-dark .add-comentario .btn:hover {
    box-shadow: 0 0 30px rgba(255,107,85,0.35);
}

/* ========== AUTH (login / registro) ========== */
.topbar-right {
    display: flex;
    align-items: center;
}

.auth-page {
    max-width: 460px;
    margin: 40px auto 64px;
    padding: 0 20px;
}

.auth-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-md);
}

.auth-card .auth-logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
}

.auth-card .auth-logo a { color: var(--text-secondary); }
.auth-card .auth-logo a span { color: var(--color-primary); }

.auth-card h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-color);
    margin-bottom: 4px;
}

.auth-card .auth-subtitle {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.auth-card .form-group {
    display: flex;
    flex-direction: column;
    row-gap: 6px;
    margin-bottom: 16px;
}

.auth-card .form-group label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.auth-card .form-group input {
    width: 100%;
    height: 48px;
    font-family: 'Lora', Georgia, serif;
    font-size: 0.95rem;
    padding: 0 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-color);
    color: var(--text-color);
    outline: none;
    transition: border-color 0.2s;
}

.auth-card .form-group input:focus {
    border-color: var(--color-primary);
}

.auth-card .btn {
    width: 100%;
    height: 48px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    background: var(--color-primary);
    color: #fff;
    border: 0;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 8px;
}

.auth-card .btn:hover {
    background: var(--color-primary-dark);
}

.auth-card .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-card .btn-link {
    background: none;
    border: none;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
}

.auth-card .btn-link:hover { text-decoration: underline; }

.auth-card .auth-switch {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 20px;
}

.auth-card .auth-switch a { color: var(--color-primary); font-weight: 600; }

.auth-alert {
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0.85rem;
    margin-bottom: 16px;
    line-height: 1.5;
}

.auth-alert-error {
    background: rgba(211, 47, 47, 0.1);
    border: 1px solid rgba(211, 47, 47, 0.35);
    color: #c62828;
}

.auth-alert-success {
    background: rgba(46, 125, 50, 0.1);
    border: 1px solid rgba(46, 125, 50, 0.35);
    color: #2e7d32;
}

.theme-dark .auth-alert-error { color: #ff8a80; }
.theme-dark .auth-alert-success { color: #a5d6a7; }

.auth-code-hint {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.auth-user-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    row-gap: 12px;
    padding: 12px 0;
}

.auth-user-box .material-symbols-outlined { font-size: 56px; color: var(--color-primary); }

.auth-user-box .alias {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
}

.auth-user-box .email {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.auth-user-box .btn-logout {
    width: 100%;
    height: 48px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.auth-user-box .btn-logout:hover { background: var(--color-primary); color: #fff; }

.auth-actions { margin-top: 16px; }


/* ========== CAT HEADER ========== */
.cat-header {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto 8px;
    padding: 0 32px;
}

.cat-header h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cat-header h1 strong {
    color: var(--color-primary);
    font-weight: 700;
}

/* ========== PAGINATION ========== */
.paginate {
    margin: 32px auto 48px;
    max-width: var(--max-width);
    display: flex;
    justify-content: center;
}

.paginate ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.paginate ul li { margin: 0; padding: 0; }

.paginate ul li a {
    color: var(--text-secondary);
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.paginate ul li a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.theme-dark .paginate ul li a:hover {
    box-shadow: 0 0 16px rgba(255,107,85,0.15);
}

.paginate ul li.active a {
    color: #fff;
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.theme-dark .paginate ul li.active a {
    box-shadow: 0 0 20px rgba(255,107,85,0.25);
}

.paginate ul li.disabled a {
    color: var(--text-muted);
    cursor: default;
    border-color: var(--border-color);
    background: transparent;
}

.paginate ul li.disabled a:hover {
    border-color: var(--border-color);
    color: var(--text-muted);
    box-shadow: none;
}

/* ========== FOOTER ========== */
.footer {
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-block: 24px;
    margin-top: 48px;
    background: var(--card-bg);
}

.footer .redes-sociales {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    margin-inline: 36px;
}

.footer .redes-sociales a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.footer .redes-sociales a:hover {
    background: var(--gray-50);
}

.theme-dark .footer .redes-sociales a:hover {
    background: rgba(255,107,85,0.08);
}

.footer .redes-sociales a svg {
    width: 22px;
    height: 22px;
    fill: var(--text-muted);
    transition: all 0.2s;
}

.footer .redes-sociales a:hover svg {
    fill: var(--color-primary);
}

.theme-dark .footer .redes-sociales a:hover svg {
    filter: drop-shadow(0 0 6px rgba(255,107,85,0.4));
}

.footer .bottom {
    font-size: 0.8rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
    margin-inline: 16px;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-family: 'Poppins', sans-serif;
}

.footer .bottom a {
    color: var(--text-muted);
    transition: color 0.2s;
}

.footer .bottom a:hover {
    color: var(--color-primary);
}

/* ========== COOKIE BANNER ========== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--text-color);
    color: var(--bg-color);
    padding: 14px 24px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    z-index: 200;
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.cookie-banner .cookie-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.cookie-banner button {
    background: var(--color-primary);
    color: #fff;
    border: 0;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    height: 48px;
    min-height: 48px;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.cookie-banner button.cookie-reject {
    background: transparent;
    color: var(--bg-color);
    border: 1px solid currentColor;
    opacity: 0.85;
}

.cookie-banner button.cookie-reject:hover {
    background: rgba(0, 0, 0, 0.08);
    opacity: 1;
}

.cookie-banner button:hover {
    background: var(--color-primary-dark);
}

.theme-dark .cookie-banner button {
    box-shadow: 0 0 16px rgba(255,107,85,0.2);
}

/* ========== PÁGINAS LEGALES ========== */
.legal-page {
    line-height: 1.6;
    align-items: flex-start;
}

.legal-page h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.4rem;
    color: var(--color-primary);
    margin: 0;
}

.legal-page h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.05rem;
    color: var(--text-color);
    margin: 20px 0 8px;
}

.legal-page h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    color: var(--text-color);
    margin: 16px 0 6px;
}

.legal-page p,
.legal-page li {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.legal-page ul {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 6px 0;
}

.legal-page strong {
    color: var(--text-color);
}

.legal-page a {
    color: var(--color-primary);
    text-decoration: underline;
}

.legal-page .legal-updated {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.8;
    margin-top: 4px;
}

.legal-page .consent-box {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 16px 20px;
    margin: 12px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    width: 100%;
}

.legal-page .consent-status {
    margin: 0;
}

.legal-page .consent-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.legal-page .consent-note {
    margin: 0;
    font-size: 0.85rem;
    opacity: 0.85;
}

.legal-page .consent-btn {
    height: 48px;
    min-height: 48px;
    padding: 0 20px;
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
}

.legal-page .consent-btn-primary {
    background: var(--color-primary);
    color: #fff;
    border: 0;
}

.legal-page .consent-btn-primary:hover {
    background: var(--color-primary-dark);
}

.legal-page .consent-btn-secondary {
    background: transparent;
    color: var(--text-color);
    border: 1px solid var(--border-color);
}

.legal-page .consent-btn-secondary:hover {
    background: rgba(0, 0, 0, 0.06);
}

/* ========== VOTACIONES ========== */
.eleccion {
    width: 100%;
}

.resumen-partido {
    flex-direction: column;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-color);
    padding: 16px 0;
}

.resumen-partido .fase {
    display: flex;
    justify-content: center;
    width: 100%;
    font-size: 1.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

.resumen-partido .fase-partido {
    display: flex;
    justify-content: center;
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.resumen-partido .partidos-totales {
    display: flex;
    justify-content: center;
    width: 100%;
    font-size: 1.2rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: var(--color-primary);
}

.theme-dark .resumen-partido .partidos-totales {
    text-shadow: 0 0 16px rgba(255,107,85,0.15);
}

.opciones {
    position: relative;
    display: flex;
    width: 100%;
    aspect-ratio: 2/1;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    justify-content: center;
    overflow: hidden;
}

.theme-dark .opciones {
    border: 1px solid var(--border-color);
}

.opciones .opcion {
    flex: 1;
    aspect-ratio: 1/1;
    background-repeat: no-repeat;
    background-position: center center;
    position: relative;
    background-size: 95%;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    cursor: pointer;
}

.opciones .opcion:hover {
    border-color: var(--color-primary);
}

.theme-dark .opciones .opcion:hover {
    box-shadow: 0 0 20px rgba(255,107,85,0.15);
}

.opciones .opcion .pie-fotografia {
    position: absolute;
    bottom: 4px;
    width: 100%;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: rgba(255,255,255,0.8);
    padding: 2px 4px;
}

.theme-dark .opciones .opcion .pie-fotografia {
    background: rgba(0,0,0,0.6);
    color: var(--text-secondary);
}

.opciones .opcion.derecha .pie-fotografia {
    text-align: center;
}

.opciones .opcion:first-child {
    background-color: var(--gray-100);
}

@media (hover: hover) and (pointer: fine) {
    .opciones:hover .opcion { filter: blur(3px); }
    .opciones .opcion:hover {
        filter: blur(0);
        background-size: 100%;
    }
}

.miniatura {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 12px 0;
}

.progressbarContent {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.progressbarContent .progressbar {
    width: 100%;
    height: 28px;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.8rem;
    line-height: 28px;
    background: var(--gray-100);
    border-radius: 999px;
    overflow: hidden;
}

.theme-dark .progressbarContent .progressbar {
    background: var(--gray-200);
}

.progressbarContent .progressbar .progress {
    height: 28px;
    background: var(--color-primary);
    border-radius: 999px;
    transition: width 0.3s;
}

.theme-dark .progressbarContent .progressbar .progress {
    box-shadow: 0 0 12px rgba(255,107,85,0.2);
}

/* ========== TORNEO SELECCION ========== */
.torneo {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.torneo-loading {
    text-align: center;
    color: var(--text-muted);
    padding: 24px 0;
}

.torneo-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}

.torneo-header .torneo-titulo {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.05rem;
}

.torneo-header .torneo-fase {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.torneo-header .torneo-progreso {
    color: var(--color-primary);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
}

.torneo-campeon {
    text-align: center;
    margin: 16px 0;
}

.torneo-campeon h3,
.torneo-ranking h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.torneo-campeon-img {
    max-width: 320px;
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.torneo-ranking {
    margin-top: 20px;
}

.ranking-item {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.ranking-fila {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ranking-miniatura {
    flex: 0 0 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    background-size: cover;
    background-position: center center;
    background-color: var(--gray-100);
    border: 1px solid var(--border-color);
}

.ranking-porcentaje {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 60px 0;
    color: var(--text-muted);
}

.empty-state p:first-child {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
}

.empty-state p:last-child {
    font-size: 0.9rem;
    margin-top: 8px;
}

.empty-state .empty-state-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.empty-state .empty-state-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.empty-state .empty-state-actions .btn-login {
    background: var(--color-primary);
    color: #fff;
}

.empty-state .empty-state-actions .btn-login:hover {
    background: var(--color-primary-dark);
}

.empty-state .empty-state-actions .btn-register {
    background: var(--gray-200);
    color: var(--text-color);
}

.empty-state .empty-state-actions .btn-register:hover {
    opacity: 0.85;
}

/* Entradas solo para usuarios registrados: teaser con candado en el listado */
.restricted-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin: 4px 0 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--gray-200);
    color: var(--text-muted);
    font-family: 'Poppins', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
}

.restricted-badge .material-symbols-outlined {
    font-size: 14px;
}

.content-restricted {
    font-size: 0.92rem;
    line-height: 1.6;
}

.content-restricted .restricted-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 10px;
    margin-top: 14px;
    padding: 12px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--gray-100);
    text-align: center;
}

.content-restricted .restricted-cta > .material-symbols-outlined {
    color: var(--text-muted);
}

.content-restricted .restricted-cta .lock-text {
    flex: 1 1 100%;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.content-restricted .restricted-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: var(--radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, opacity 0.2s;
}

.content-restricted .restricted-cta .btn-login {
    background: var(--color-primary);
    color: #fff;
}

.content-restricted .restricted-cta .btn-login:hover {
    background: var(--color-primary-dark);
}

.content-restricted .restricted-cta .btn-register {
    background: var(--gray-200);
    color: var(--text-color);
}

.content-restricted .restricted-cta .btn-register:hover {
    opacity: 0.85;
}

/* Menú lateral: entrada restringida */
.left-menu .posts .post .content.restricted {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ========== RESPONSIVE ========== */
@media only screen and (max-width: 1200px) {
    .posts .post,
    .comentarios-wrapper {
        max-width: 680px;
    }
    .nav-tags ul { width: 800px; }
    .cat-header { max-width: 680px; }
}

@media only screen and (max-width: 968px) {
    .posts .post,
    .posts.detalle-entrada,
    .comentarios-wrapper {
        width: 100%;
        max-width: 100%;
    }
    .nav-tags ul { width: 100%; }
    .cat-header { max-width: 100%; }

    .left-menu { width: 300px; }
    .left-menu .posts .post h2 { width: 230px; }
}

@media only screen and (max-width: 720px) {
    body { font-size: 1rem; }

    .nav-tags { display: none; }

    .posts {
        margin: 16px auto;
        row-gap: 16px;
    }

    .posts .post {
        padding: 20px 16px;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .posts .post h1 { font-size: 1.4rem; }
    .posts .post h2 { font-size: 1.2rem; }
    .posts .post h3 { font-size: 1.15rem; }

    .footer .bottom { flex-direction: column; gap: 12px; }

    .post.container {
        padding: 0;
    }

    .opciones {
        flex-direction: column;
        aspect-ratio: 14/24;
    }

    .torneo-header .torneo-titulo {
        font-size: 1rem;
    }

    .posts .post.buenosdias .content {
        font-size: 1.3rem;
    }

    .posts .post .foto-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .posts .post .foto-card img {
        width: 160px;
        height: 160px;
    }

    .topbar .logo {
        font-size: 1.2rem;
    }

    .topbar .logo a span {
        font-size: inherit;
    }

    .topbar .first-child,
    .topbar .box-btn-search {
        font-size: 24px;
    }

    .left-menu { width: 280px; }
    .left-menu .posts .post h2 { width: 210px; }

    .posts .post .share-sn {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Aviso de fecha simulada (solo la ve quien la activa) */
.sim-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 6px 14px;
    background: var(--color-primary, #f07c41);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
}
.sim-banner a {
    margin-left: auto;
    color: #fff;
    font-weight: 600;
    text-decoration: underline;
}
