:root {
    --cdc-gold: #ffb507;
    --cdc-dark: #1a1a1a;
    --cdc-bg: #f9f9f9;
}

div.hunter-card-wrapper {
    padding: 20px 10px;
}

div.hunter-card-wrapper .breathing-select {
    color: #c0392b;
}

.cdc-dashboard {
    font-family: 'Segoe UI', Roboto, sans-serif;
}

.cdc-header {
    text-align: center;
    padding: 30px;
    background: var(--cdc-dark);
    color: white;
    border-radius: 12px;
    margin-bottom: 25px;
    border-bottom: 4px solid var(--cdc-gold);
}

.cdc-btn-main {
    background: var(--cdc-gold) !important;
    color: #000 !important;
    font-weight: bold;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    margin-top: 15px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cdc-btn-main:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 181, 7, 0.4);
}

/* Tabs */
.cdc-content-wrapper {
    margin-bottom: 30px;
}

.cdc-tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.cdc-tab-btn {
    flex: 1 1 auto;
    min-width: 150px;
    background: #5d3a24;
    color: #f2e3c9;
    border: none;
    padding: 15px;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 480px) {
    .cdc-tab-btn {
        flex: 1 1 100%;
    }
}

.cdc-tab-btn:hover {
    border-color: #724F01;
    color: #724F01;
}

.cdc-tab-btn.active {
    background: var(--cdc-gold);
    border-color: var(--cdc-gold);
    color: #000;
    box-shadow: 0 4px 12px rgba(255, 181, 7, 0.2);
}

/* Content Area */
.cdc-tab-content {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eee;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.cdc-section-title h2 {
    color: var(--cdc-dark)!important;
    border-left: 5px solid var(--cdc-gold);
    padding-left: 15px;
    margin-bottom: 25px;
}

/* Ajustes para Logros GamiPress */

.gamipress-achievement {
    border: 2px solid var(--cdc-gold)!important;
    border-radius: 10px;
    background: #f2e3c9 url('https://www.transparenttextures.com/patterns/paper-fibers.png');
    box-shadow: 0 4px 15px rgba(255, 181, 7, 0.1);
}

/* Filtro de logros */
.cdc-achievements-filter-container {
    display: flex;
    justify-content: right;
}

.cdc-achievements-filter {
    display: block;
    gap: 15px;
    margin-bottom: 25px;
    padding: 10px;
    background: #fdf2e2;
    border-radius: 8px;
    border: 1px solid var(--cdc-gold);
}

.cdc-switch-label {
    font-weight: bold;
    color: var(--cdc-dark);
    font-size: 0.9rem;
}

/* Estilo del Switch (Checkbox) */
.cdc-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.cdc-switch input { opacity: 0; width: 0; height: 0; }

.cdc-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.cdc-slider:before {
    position: absolute;
    content: "";
    height: 16px; width: 16px;
    left: 4px; bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .cdc-slider { background-color: var(--cdc-gold); }
input:checked + .cdc-slider:before { transform: translateX(26px); }

/* Estados de Logros */
.achievement-unearned {
    display: none; /* Ocultos por defecto */
    opacity: 0.4;
    filter: grayscale(0.8);
    border: 2px dashed #ccc !important;
    background: #f9f9f9 !important;
}

.section-hidden {
    display: none; /* Oculta secciones enteras si no hay ganados */
}

/* Títulos de sección de logros */
.cdc-achievement-section {
    margin-bottom: 40px;
}

.gamipress-achievement {
    padding: 5px 10px;
}

.gamipress-achievement .gamipress-achievement-image {
    align-content: center;
    opacity: 1!important;
}

.gamipress-achievement .gamipress-achievement-description .gamipress-points-thumbnail {
    height: 25px;
    width: auto;
}

.gamipress-achievement .gamipress-achievement-title {
    color: #4a2c1a;
}

.gamipress-achievement .gamipress-achievement-points {
    color: #c0392b;
}

.gamipress-achievement .gamipress-achievement-excerpt {
    color: #666;
}

/* Ajustes para Rangos GamiPress */

/* Contenedor de lista de rangos */
.cdc-ranks-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Item base de rango */
.cdc-rank-item {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
}

/* RANGO BLOQUEADO: Opacidad reducida y gris */
.rank-locked {
    opacity: 0.5;
    filter: grayscale(1);
    background: #fdfdfd;
}

.rank-locked:hover {
    opacity: 0.7;
    filter: grayscale(0.5);
}

/* RANGO GANADO: Color y brillo */
.rank-earned {
    border: 2px solid var(--cdc-gold);
    background: #f2e3c9 url('https://www.transparenttextures.com/patterns/paper-fibers.png');
    box-shadow: 0 4px 15px rgba(255, 181, 7, 0.1);
}

/* Detalles internos */
.rank-image-container {
    flex-shrink: 0;
    margin-right: 25px;
}

.rank-img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ddd;
}

.rank-earned .rank-img {
    border-color: var(--cdc-gold);
}

.rank-details {
    flex-grow: 1;
}

.rank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.rank-title {
    margin: 0 !important;
    font-size: 1.3rem;
    color: var(--cdc-dark);
}

.rank-status-tag {
    background: var(--cdc-gold);
    color: #000;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
}

.rank-title {
    color: #4a2c1a!important;
}

.rank-requirement {
    font-size: 0.9rem;
    color: #c0392b;
    margin-bottom: 10px;
    display: block;
}

.rank-desc {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Ajuste móvil */
@media (max-width: 600px) {
    .cdc-rank-item {
        flex-direction: column;
        text-align: center;
    }
    .rank-image-container {
        margin-right: 0;
        margin-bottom: 15px;
    }
    .rank-header {
        flex-direction: column;
        gap: 10px;
    }
}

/* Ajustes para Ranking GamiPress */
/* --- CONTENEDOR DEL RANKING (El secreto del scroll) --- */
.cdc-leaderboard-wrapper {
    margin-top: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #eee;
    
    /* Esto es lo que permite el scroll lateral en móvil */
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
}

.cdc-table-ranking {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-family: inherit;
    /* Forzamos un ancho mínimo para que en móvil no se amontone todo */
    min-width: 500px; 
}

/* Cabecera */
.cdc-table-ranking thead {
    background-color: #5d3a24;
}

.cdc-table-ranking thead th {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 15px;
    color: #f2e3c9; /* Color de texto para contraste */
    border-bottom: 2px solid var(--cdc-gold);
    text-align: center;
}

/* Celdas */
.cdc-table-ranking tbody {
    background: #f2e3c9 url('https://www.transparenttextures.com/patterns/paper-fibers.png');
}

.cdc-table-ranking tbody td {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    vertical-align: middle;
    color: #444;
    text-align: center;
}

/* Columna de Puesto */
.rank-number {
    font-weight: 800;
    color: #999;
    width: 50px;
    font-size: 1.1rem;
}

/* Podio */
.cdc-table-ranking tbody tr:nth-child(1) .rank-number { color: #f1c40f; } 
.cdc-table-ranking tbody tr:nth-child(2) .rank-number { color: #bdc3c7; } 
.cdc-table-ranking tbody tr:nth-child(3) .rank-number { color: #e67e22; }

/* Columna Cazador (Nombre + Avatar) */
.rank-user {
    text-align: left !important; /* Alineamos a la izquierda para mejor lectura */
    min-width: 180px;
}

.rank-avatar {
    border-radius: 50%;
    vertical-align: middle;
}

/* Columna Energía Vital */
.rank-points {
    font-weight: bold;
    color: #c0392b;
    white-space: nowrap;
}

.rank-avatar-container {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden; /* Corta lo que sobre de la imagen */
    margin-right: 12px;
    border: 2px solid var(--cdc-gold); /* Toque de diseño: borde dorado */
    background: #eee;
    flex-shrink: 0; /* Evita que se aplaste si el nombre es largo */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* La imagen dentro del contenedor */
.rank-avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover; /* Mantiene la proporción y centra la imagen */
    display: block;
}

/* Ajuste para el nombre al lado del avatar */
.rank-name {
    font-weight: 600;
    color: var(--cdc-dark);
    white-space: nowrap;
}

/* Opcional: un pequeño efecto hover en la fila */
.cdc-table-ranking tbody tr:hover {
    background-color: rgba(255, 181, 7, 0.05) !important;
    transition: background 0.2s ease;
}

/* --- RESPONSIVE ESPECÍFICO --- */
@media (max-width: 600px) {
    /* Si quieres que se vea el scrollbar visualmente */
    .cdc-leaderboard-wrapper::-webkit-scrollbar {
        height: 4px;
    }
    .cdc-leaderboard-wrapper::-webkit-scrollbar-thumb {
        background: var(--cdc-gold);
        border-radius: 10px;
    }

    /* Reducimos un poco el padding en móvil para ganar espacio */
    .cdc-table-ranking tbody td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }

    /* Ocultamos la columna de "Rango" (Badge) si es la tercera, 
       para que no haga falta tanto scroll lateral */
    .cdc-table-ranking th:nth-child(3),
    .cdc-table-ranking td:nth-child(3) {
        display: none;
    }
}





/* Banner Horizontal - Estilo Dark Cuartel */
.cdc-profile-notice {
    max-width: 900px;
    margin: 20px auto 40px auto;
    background: #1a1a1a;
    border: 4px solid #000;
    border-radius: 15px;
    position: relative;
    padding: 20px 30px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

/* Icono con el brillo rojo que te gustaba */
.cdc-notice-icon-wrap {
    font-size: 50px;
    flex-shrink: 0;
    line-height: 1;
    filter: drop-shadow(0 0 10px #e63946); /* Brillo directo sobre el emoji */
}

/* Textos adaptados del bloqueador */
.cdc-notice-text {
    flex-grow: 1;
}

.cdc-notice-text h4 {
    margin: 0 !important;
    color: #fff !important;
    font-family: 'Bangers', cursive, sans-serif; /* Usando la fuente de tu bloqueador */
    letter-spacing: 2px;
    font-size: 22px !important;
    text-transform: uppercase;
}

.cdc-notice-text p {
    margin: 5px 0 0 0 !important;
    color: #bbb !important;
    font-size: 14px !important;
    line-height: 1.5;
}

/* Botón de envío (Igual al cdc-btn-submit del bloqueador) */
.cdc-btn-notice {
    background: #e63946 !important;
    color: #fff !important;
    border: 3px solid #000 !important;
    padding: 12px 25px !important;
    font-weight: 900 !important;
    text-transform: uppercase;
    text-decoration: none !important;
    cursor: pointer;
    box-shadow: 4px 4px 0 #000;
    transition: all 0.1s;
    font-size: 12px !important;
    white-space: nowrap;
}

.cdc-btn-notice:hover {
    background: #ff4d5a !important;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 #000;
}

.cdc-btn-notice:active {
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 #000;
}

/* Sello de expediente - A la derecha y con tu estilo original */
.cdc-notice-stamp {
    position: absolute;
    top: -15px;
    right: 20px; /* Movido a la derecha */
    border: 3px solid #e63946;
    color: #e63946;
    padding: 2px 12px;
    font-weight: 900;
    font-size: 12px;
    transform: rotate(10deg);
    background: rgba(255,255,255,0.95);
    z-index: 10;
    pointer-events: none;
    border-style: double;
}

@media (max-width: 768px) {
    .cdc-profile-notice {
        flex-direction: column;
        text-align: center;
        padding-top: 35px;
    }
    .cdc-notice-stamp {
        right: 50%;
        transform: translateX(50%) rotate(5deg);
    }
}