:root {
    --primary: #4b5563;
    --primary-dark: #374151;
    --secondary: #6b7280;
    --accent: #9ca3af;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1f2937;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --radius: 12px;
    --radius-lg: 16px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #374151;
    min-height: 100vh;
    background: linear-gradient(180deg, #e5e7eb 0%, #f3f4f6 30%, #f9fafb 100%);
}

a { color: var(--primary); text-decoration: none; transition: all 0.2s ease; }
a:hover { color: var(--primary-dark); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
header {
    background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-600) 50%, var(--gray-500) 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

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

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

nav { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

nav a {
    color: white;
    padding: 10px 18px;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
}

nav a:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    color: white;
}

/* Main */
main { padding: 3rem 0; min-height: calc(100vh - 200px); }

/* Cards */
.card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-100);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card h2 {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-100);
    font-weight: 600;
    color: var(--gray-800);
    font-size: 1.4rem;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.post-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--gray-100);
}

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

.post-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card:hover img {
    transform: scale(1.08);
}

.post-card-body { padding: 1.5rem; }

.post-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
    font-weight: 600;
}

.post-card h3 a {
    color: var(--gray-800);
    transition: color 0.2s ease;
}

.post-card h3 a:hover { color: var(--primary); }

.post-meta {
    color: #374151;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Forms */
.form-group { margin-bottom: 1.5rem; }

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--gray-50);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(75, 85, 99, 0.1);
}

textarea.form-control { min-height: 160px; resize: vertical; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: inherit;
}

.btn:hover { transform: translateY(-2px); }

.btn-primary {
    background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-600) 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(75, 85, 99, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(75, 85, 99, 0.5);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
}

.btn-sm { padding: 8px 14px; font-size: 0.8rem; }

.btn-outline {
    background: transparent;
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
}

.btn-outline:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-warning {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-info {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #374151;
    border: 1px solid #d1d5db;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--radius);
    overflow: hidden;
}

th, td {
    padding: 14px 16px;
    text-align: left;
}

th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    border-bottom: 1px solid var(--gray-100);
}

tr:hover td {
    background: var(--gray-50);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-pending {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
}

.badge-approved {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
}

.badge-rejected {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: var(--gray-100);
    padding: 6px;
    border-radius: var(--radius);
    width: fit-content;
}

.tabs a {
    padding: 10px 20px;
    background: transparent;
    border-radius: 8px;
    color: var(--gray-600);
    font-weight: 500;
    transition: all 0.2s ease;
}

.tabs a:hover {
    background: white;
    color: var(--gray-800);
}

.tabs a.active {
    background: white;
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Stats */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat {
    background: white;
    padding: 1.75rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-100);
    transition: all 0.3s ease;
}

.stat:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat h3 {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.stat p {
    color: var(--gray-500);
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Post Single */
.post-single img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    margin: 1.5rem 0;
}

.post-content {
    line-height: 1.9;
    font-size: 1.05rem;
    color: #374151;
}

.post-content p { margin-bottom: 1.25rem; }

.post-single h1,
.post-content h2,
.post-content h3,
.post-content h4 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.post-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, var(--gray-700), var(--gray-500), var(--gray-400)) 1;
}

.post-content h3 {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-500) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 1.75rem 0 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.post-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 1.5rem 0 0.5rem;
}

.post-content strong {
    color: var(--primary-dark);
    font-weight: 700;
    background: linear-gradient(120deg, rgba(75, 85, 99, 0.1) 0%, rgba(107, 114, 128, 0.1) 100%);
    padding: 1px 4px;
    border-radius: 3px;
}

.post-content em {
    font-style: italic;
    color: var(--gray-600);
}

.post-content ul {
    margin: 0.5rem 0 1.5rem 1.25rem;
    padding: 0;
}

.post-content li {
    margin-bottom: 0.15rem;
    padding-left: 0.25rem;
}

.post-content li::marker {
    color: var(--primary);
}

.post-content li br {
    display: none;
}

.post-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: var(--gray-800);
}

/* Comments */
.comment {
    background: var(--gray-50);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid var(--gray-100);
    transition: all 0.2s ease;
}

.comment:hover {
    background: white;
    box-shadow: var(--shadow-sm);
}

.comment-author {
    font-weight: 600;
    color: var(--primary);
}

/* Auth Box */
.auth-box { max-width: 420px; margin: 2rem auto; }

/* Footer */
footer {
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--dark) 100%);
    color: var(--gray-400);
    text-align: center;
    padding: 2.5rem;
    margin-top: 4rem;
}

footer p {
    font-size: 0.9rem;
}

/* Page Title */
h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    nav {
        justify-content: center;
    }

    nav a {
        margin: 4px;
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.7rem;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    table {
        display: block;
        overflow-x: auto;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

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

main .container > * {
    animation: fadeIn 0.5s ease-out;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--gray-600) 0%, var(--gray-500) 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--gray-700) 0%, var(--gray-600) 100%);
}

/* Skip Link (Accesibilidad) */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius);
    z-index: 1000;
    font-weight: 600;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 10px;
    color: white;
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--dark) 100%);
    color: white;
    padding: 1rem;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    min-width: 280px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-content a {
    color: var(--accent);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

@media (max-width: 600px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
}

/* Contenedor de bloques de código */
.code-wrapper {
    position: relative;
    margin: 1.5rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.code-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1f2937;
    padding: 0.5rem 1rem;
    border-bottom: 1px solid #374151;
}

.code-lang {
    color: #9ca3af;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.copy-btn {
    background: #374151;
    border: none;
    color: #9ca3af;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.copy-btn:hover {
    background: #4b5563;
    color: #e5e7eb;
}

.copy-btn.copied {
    background: var(--success);
    color: white;
}

/* Bloques de código */
.code-block {
    background: #111827;
    color: #e5e7eb;
    padding: 1rem 1.25rem;
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    overflow-x: auto;
    max-width: 100%;
    white-space: pre-wrap;
    word-wrap: break-word;
    word-break: break-word;
}

.code-block code {
    background: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Formato terminal PowerShell */
.code-wrapper.powershell .code-header {
    background: #1f2937;
    border-bottom-color: #374151;
}

.code-wrapper.powershell .code-lang {
    color: #9ca3af;
}

.code-wrapper.powershell .code-block {
    background: #1f2937;
    color: #d1d5db;
}

.code-wrapper.powershell .ps-prompt {
    color: #9ca3af;
}

.code-wrapper.powershell .ps-command {
    color: #fbbf24;
}

.code-wrapper.powershell .ps-param {
    color: #f87171;
}

.code-wrapper.powershell .ps-string {
    color: #34d399;
}

.code-wrapper.powershell .ps-variable {
    color: #93c5fd;
}

/* Info box para ¿Qué hace? */
.code-info {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border-left: 4px solid var(--primary);
    padding: 0.75rem 1rem;
    margin-top: 0;
    border-radius: 0 0 8px 8px;
    font-size: 0.9rem;
}

.code-info strong {
    color: var(--primary);
    background: none;
    padding: 0;
}

.inline-code {
    background: #e5e7eb;
    color: #1f2937;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.85em;
    word-break: break-word;
}

/* Colores por lenguaje */
.code-wrapper.bash .code-header { background: #1f2937; border-bottom-color: #4b5563; }
.code-wrapper.bash .code-lang { color: #9ca3af; }
.code-wrapper.bash .code-block { background: #111827; }

.code-wrapper.javascript .code-header,
.code-wrapper.js .code-header { background: #1f2937; border-bottom-color: #fbbf24; }
.code-wrapper.javascript .code-lang,
.code-wrapper.js .code-lang { color: #fbbf24; }

.code-wrapper.python .code-header { background: #1f2937; border-bottom-color: #6b7280; }
.code-wrapper.python .code-lang { color: #9ca3af; }

.code-wrapper.php .code-header { background: #1f2937; border-bottom-color: #6b7280; }
.code-wrapper.php .code-lang { color: #9ca3af; }

/* =============================================
   HUB DASHBOARD
   ============================================= */
.hub-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    grid-template-rows: auto auto;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hub-box {
    background: linear-gradient(135deg, #e5e7eb 0%, #f3f4f6 100%);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
}

.hub-box .btn {
    margin-top: auto;
    align-self: flex-end;
}

/* Buscador - columnas 1-2 */
.hub-search-box {
    grid-column: 1 / 3;
    grid-row: 1;
    padding: 1rem 1.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub-search-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    max-width: 600px;
}

.hub-search-form .search-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.hub-search-form .hub-search-input {
    flex: 1;
    padding: 0.5rem 0;
    border: none;
    outline: none;
    font-size: 1rem;
}

.hub-search-form .btn {
    white-space: nowrap;
}

.hub-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #4b5563;
}

.hub-visits {
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.country-flag {
    margin-right: 0.35rem;
}

.flag-img {
    vertical-align: middle;
    border-radius: 2px;
}

.bot-icon {
    font-size: 0.7rem;
    margin-left: -4px;
    vertical-align: super;
}

.visits-divider {
    color: #d1d5db;
    margin: 0 0.5rem;
}

.search-icon {
    font-size: 1.25rem;
    color: #6b7280;
}

.hub-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #374151;
    background: transparent;
}

.hub-search-input::placeholder {
    color: #9ca3af;
}

/* Top Posts - columna 3, ocupa filas 1-2 */
.hub-top-posts {
    grid-column: 3;
    grid-row: 1 / 3;
}

/* Top Herramientas y Top Juegos - más pequeños */
.hub-small {
    padding: 1rem 1.25rem;
}

.hub-small h2 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.hub-small .hub-list {
    margin-bottom: 0.75rem;
}

.hub-small .hub-list li {
    padding: 0.15rem 0;
    font-size: 0.9rem;
}

.hub-box h2 {
    color: #1f2937;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.hub-box h2 a {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}
.hub-box h2 a:hover {
    color: #4b5563;
}

.hub-icon {
    font-size: 1.1rem;
}

.hub-list {
    list-style: none;
    padding-left: 0;
    margin: 0 0 1rem 0;
}

.hub-list li {
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
    color: #374151;
    font-size: 0.95rem;
}

.hub-list li a {
    color: #374151;
    text-decoration: none;
}

.hub-list li a:hover {
    text-decoration: underline;
}

/* Badges de posición (podio) */
.pos-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    margin-right: 0.5rem;
    flex-shrink: 0;
}
.pos-1 { font-size: 1.1rem; } /* Oro */
.pos-2 { font-size: 1.1rem; } /* Plata */
.pos-3 { font-size: 1.1rem; } /* Bronce */
.pos-4 { font-size: 1.1rem; } /* Cuarto */
.pos-5 { font-size: 1.1rem; } /* Quinto */
.pos-badge:not(.pos-1):not(.pos-2):not(.pos-3):not(.pos-4):not(.pos-5) {
    background: #9ca3af; color: white;
}

/* Mantener estilos anteriores para compatibilidad */
.stats-mini {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
}

.stat-item .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-700);
}

.stat-item .stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
}

.post-mini:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.post-mini-title {
    font-weight: 500;
    flex: 1;
}

.post-mini-meta {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.text-muted { color: var(--gray-500); }

/* =============================================
   TOOLS & GAMES
   ============================================= */
.tools-category { margin-bottom: 2rem; }
.tools-category h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--gray-700);
}

.tools-grid, .games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.25rem;
}

.tool-card, .game-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--gray-700);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tool-card:hover, .game-card:hover {
    transform: translateY(-5px);
    border-color: var(--gray-500);
    box-shadow: var(--shadow-lg);
}

.tool-icon, .game-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.tool-card h3, .game-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.tool-card p, .game-card p {
    font-size: 0.9rem;
    color: var(--gray-500);
    margin: 0;
    flex: 1;
}

.game-score {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
    background: var(--gray-100);
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
}

/* Tool/Game Container */
.tool-container, .game-container {
    max-width: 700px;
    margin: 0 auto;
}

.tool-desc, .game-desc {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.breadcrumb {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    color: var(--gray-500);
}

.breadcrumb a { color: var(--primary); }

/* Rankings */
.my-rank {
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
}

.ranking-table {
    width: 100%;
}

.ranking-table .rank-pos {
    font-weight: 700;
    color: var(--gray-700);
    width: 40px;
}

.ranking-table tr.highlight {
    background: linear-gradient(135deg, rgba(75, 85, 99, 0.1) 0%, rgba(107, 114, 128, 0.1) 100%);
}

.ranking-table tr.highlight td {
    font-weight: 600;
}

/* Tool Forms */
.tool-form .form-group { margin-bottom: 1.25rem; }

.tool-result {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    border-radius: var(--radius);
    text-align: center;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.result-label {
    color: var(--gray-600);
}

/* Game Area */
.game-area {
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-top: 1rem;
}

.game-result {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    text-align: center;
    font-weight: 600;
}

.game-result.success { background: #d1fae5; color: #065f46; }
.game-result.danger { background: #fee2e2; color: #991b1b; }

/* =============================================
   BÚSQUEDA
   ============================================= */
.search-page h1 {
    margin-bottom: 1.5rem;
}

.search-form-large {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.search-input-large {
    flex: 1;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    transition: border-color 0.2s;
}

.search-input-large:focus {
    outline: none;
    border-color: var(--primary);
}

.search-summary {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.search-section {
    margin-bottom: 2rem;
}

.search-section h2 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-100);
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.search-result-item {
    display: block;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    color: var(--gray-700);
    transition: all 0.2s;
}

.search-result-item:hover {
    background: var(--gray-600);
    color: white;
    transform: translateY(-2px);
}

.search-result-item strong {
    display: block;
    margin-bottom: 0.25rem;
}

.search-result-item span {
    font-size: 0.85rem;
    opacity: 0.8;
}

.search-results-posts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-post-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    color: var(--gray-700);
    transition: all 0.2s;
}

.search-post-item:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.search-post-item img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.search-post-item strong {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--gray-800);
}

.search-post-item p {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin: 0;
}

/* Responsive Hub - Tablet */
@media (max-width: 900px) {
    .hub-grid-layout {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
        gap: 0.75rem;
    }

    .hub-search-box {
        grid-column: 1 / 3;
        grid-row: 1;
    }

    .hub-top-posts {
        grid-column: 1 / 3;
        grid-row: 2;
    }

    .hub-small {
        grid-column: auto;
    }

    .hub-box {
        padding: 1rem 1.25rem;
    }

    .stats-mini {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .stat-item .stat-value { font-size: 1.2rem; }
}

/* Responsive Hub - Móvil */
@media (max-width: 600px) {
    .hub-grid-layout {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .hub-search-box {
        grid-column: 1;
        padding: 0.75rem 1rem;
    }

    .hub-search-form {
        max-width: 100%;
    }

    .hub-search-form .hub-search-input {
        font-size: 0.9rem;
        min-width: 0;
    }

    .hub-search-form .btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    .hub-top-posts,
    .hub-small {
        grid-column: 1;
    }

    .hub-box h2 {
        font-size: 1.1rem;
    }

    .hub-list li {
        font-size: 0.9rem;
    }

    .hub-posts-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive general - Móvil pequeño */
@media (max-width: 480px) {
    header .container {
        padding: 0.75rem 1rem;
    }

    header h1 {
        font-size: 1.3rem;
    }

    nav {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    nav a {
        padding: 6px 12px;
        font-size: 0.8rem;
        margin: 2px;
    }

    main {
        padding: 1rem 0.75rem;
    }

    .hub-box {
        padding: 0.75rem 1rem;
        border-radius: 10px;
    }

    .hub-search-form {
        gap: 0.5rem;
    }

    .search-icon {
        font-size: 1rem;
    }

    .posts-grid {
        gap: 1rem;
    }

    .post-card {
        border-radius: 10px;
    }

    .post-card img {
        height: 150px;
    }

    .post-card h3 {
        font-size: 1rem;
    }

    .post-card p {
        font-size: 0.85rem;
    }
}

/* ===== ECOBEBE LANDING PAGE ===== */
.ecobebe-landing {
    max-width: 100%;
    margin: -24px;
}

.ecobebe-hero {
    background: linear-gradient(135deg, #86efac 0%, #4ade80 50%, #22c55e 100%);
    padding: 80px 24px;
    text-align: center;
    color: white;
}

.ecobebe-hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.ecobebe-tagline {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.ecobebe-hero .btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    background: white;
    color: #22c55e;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.ecobebe-hero .btn-lg:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.ecobebe-section {
    padding: 60px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.ecobebe-section h2 {
    text-align: center;
    font-size: 2rem;
    color: var(--gray-800);
    margin-bottom: 2.5rem;
}

.ecobebe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.ecobebe-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ecobebe-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.ecobebe-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.ecobebe-card h3 {
    color: #22c55e;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.ecobebe-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1rem;
}

.ecobebe-card li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-600);
}

.ecobebe-card li:last-child {
    border-bottom: none;
}

.ecobebe-price {
    background: linear-gradient(135deg, #86efac, #22c55e);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-top: 1rem;
}

.ecobebe-promo {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    margin: 0;
    max-width: 100%;
    padding: 60px 24px;
}

.ecobebe-promo-box {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radius-lg);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.ecobebe-promo-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.ecobebe-promo-box h3 {
    color: #f59e0b;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.ecobebe-promo-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.ecobebe-promo-list li {
    padding: 0.75rem;
    font-size: 1.1rem;
    color: var(--gray-700);
}

.ecobebe-promo-list li:nth-child(odd) {
    background: var(--gray-50);
    border-radius: 8px;
}

.ecobebe-promo-cta {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 1rem 2rem;
    border-radius: 30px;
    font-weight: 600;
    display: inline-block;
    margin-top: 1rem;
}

.ecobebe-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.ecobebe-feature {
    text-align: center;
    padding: 2rem;
}

.ecobebe-feature-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 1rem;
}

.ecobebe-feature h4 {
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.ecobebe-feature p {
    color: var(--gray-500);
    font-size: 0.95rem;
}

.ecobebe-contact {
    background: var(--gray-100);
    margin: 0;
    max-width: 100%;
    text-align: center;
}

.ecobebe-contact-info {
    margin-top: 1.5rem;
}

.ecobebe-contact-info p {
    margin: 0.5rem 0;
    color: var(--gray-600);
}

@media (max-width: 768px) {
    .ecobebe-hero {
        padding: 50px 20px;
    }

    .ecobebe-hero h1 {
        font-size: 2rem;
    }

    .ecobebe-tagline {
        font-size: 1.1rem;
    }

    .ecobebe-section {
        padding: 40px 20px;
    }

    .ecobebe-promo-box {
        padding: 2rem;
    }
}
