/* === Estilos Generales === */

/* Contenedor centrado */
.centered-column {
    position: relative;
    padding: 20px;
}

/* Columna personalizada */
.custom-column {
    width: 1200px;
    margin: 0 auto;
}

/* === Contenedor de Imágenes === */

/* Contenedor para imágenes como fondos */
.image-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
}

/* Capa de fondo */
.background-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Capa de primer plano (imagen principal) */
.foreground-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

/* === Texto Superpuesto === */

/* Texto superpuesto (izquierda) */
.text-overlay {
    position: absolute;
    top: 0.5%;
    left: 2%;
    z-index: 2;
    max-width: 96%;
    padding: 5px 10px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    text-shadow: 2px 2px 4px #000;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

/* Texto superpuesto (derecha) */
.text-overlay-right {
    position: absolute;
    top: 0.5%;
    right: 3%;
    z-index: 2;
    max-width: 96%;
    padding: 5px 10px;
    color: white;
    font-size: 30px;
    font-weight: bold;
    text-shadow: 2px 2px 4px #000;
    overflow-wrap: break-word;
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 5px;
}

/* Texto del número de carta */
.card-number-text {
    margin-right: -5%;
    position: relative;
}

/* === Imágenes de Iconos === */

/* Estilo para el botón de assets_icon */
.assets-icon-btn {
    position: absolute;
    bottom: 35%;
    left: 2%;
    transform: translateY(-50%);
    z-index: 5;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.assets-icon-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

.assets-icon-btn .assets-icon {
    width: 33.5px;
    height: auto;
}

/* Estilo para el botón de awake-symbol */
.awake-symbol-btn {
    position: absolute;
    bottom: 35%;
    right: 2%;
    transform: translateY(-50%);
    z-index: 5;
    transition: transform 0.3s ease;
}

.awake-symbol-btn:hover {
    transform: translateY(-50%) scale(1.1);
}

.awake-symbol-btn .awake-symbol {
    width: 70px;
    height: auto;
}

/* Imagen de rareza */
.rarity-image {
    position: absolute;
    bottom: 5px;
    left: 0;
    z-index: 3;
    max-width: 300px;
    height: auto;
}

/* Imagen de Legends Limited */
.legends-limited-image {
    position: absolute;
    bottom: 90px;
    left: 0;
    z-index: 1;
    max-width: 600px;
    height: auto;
}

/* Imagen de atributo */
.attribute-image {
    position: absolute;
    bottom: 5px;
    right: 0;
    z-index: 3;
    max-width: 100px;
    height: auto;
}

/* Imagen basada en misc_info_ (Tag Change) */
.misc-image {
    position: absolute;
    bottom: 60px;
    right: 25px;
    z-index: 4;
    width: 50px;
    height: auto;
}

/* Imagen adicional a la izquierda de Tag Change */
.misc-image-left {
    position: absolute;
    bottom: 60px;
    right: 90px;
    z-index: 4;
    width: 50px;
    height: auto;
}

/* === Estilos para Tablas de Habilidades === */

/* Tabla genérica para habilidades */
.ability-table,
.main-ability-table,
.unique-ability-table,
.z-ability-table,
.llz-ability-table,
.tags-table {
    padding: 10px;
    color: white;
}

/* Títulos de tablas */
.ability-title,
.main-ability-title,
.unique-ability-title,
.z-ability-title,
.llz-ability-title,
.tags-title {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    font-size: 22px;
    font-weight: bold;
    color: white;
    text-align: left;
    border-radius: 5px;
}

/* Gradientes específicos para títulos */
.ability-title {
    background: linear-gradient(to right, #896290, #7f2590);
}

.main-ability-title,
.unique-ability-title,
.z-ability-title,
.tags-title {
    background: linear-gradient(to right, #333333, #1C1C1C);
}

.llz-ability-title {
    background: linear-gradient(to right, #DAA520, #A78600);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

/* Fila de habilidades */
.ability-row {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Celdas de habilidades */
.ability-name .ability-cell {
    padding: 5px 5px 2px 5px;
    font-size: 20px;
    text-align: left;
}

.ability-detail .ability-cell {
    padding: 0 5px 5px 5px;
    font-size: 18px;
    text-align: left;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/* Sección de Z-Ability */
.z-ability-section {
    margin-bottom: 20px;
}

/* === Held Arts Cards === */

/* Fila de Arts Cards */
.arts-card-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

/* Contenedor para el texto (nombre y detalle) */
.arts-card-text {
    flex: 1;
    color: #fff;
    display: flex;
    flex-direction: column;
}

/* Imagen de Arts Card */
.arts-card-image {
    width: 80px;
    height: 100px;
    border-radius: 5px;
    flex-shrink: 0;
    vertical-align: middle;
}

/* Nombre de Arts Card */
.ability-name-text {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 5px;
}

/* Detalle de Arts Card */
.ability-detail-text {
    font-size: 1.2em;
    line-height: 1.4;
    white-space: pre-wrap;
    color: #fff;
}

/* === Tabla de Tags === */

/* Contenedor de tags */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* Elemento de tag */
.tag-item {
    position: relative;
    display: inline-block;
    transition: transform 0.3s ease;
}

.tag-item:hover {
    transform: scale(1.1);
}

/* Imagen de tag */
.tag-image {
    display: block;
    width: 100%;
    height: auto;
}

/* Texto de tag */
.tag-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    color: black;
    font-size: 16px;
    font-weight: bold;
    text-shadow: 1px 1px 2px #fff;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === Botones de Habilidades === */

/* Botones de Z-Ability, Unique Ability y LIMITED Z-Ability */
.z-ability-buttons,
.unique-ability-buttons,
.llz-ability-buttons {
    display: flex;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 20px;
}

/* Estilo base para botones */
.z-ability-btn,
.unique-ability-btn,
.llz-ability-btn {
    padding: 8px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* Botones de Z-Ability */
.z-ability-btn {
    background: linear-gradient(135deg, #4a4a4a, #2a2a2a);
    color: #fff;
    border: 2px solid #666;
}

.z-ability-btn:hover {
    background: linear-gradient(135deg, #666, #444);
    border-color: #888;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.z-ability-btn.active {
    background: linear-gradient(135deg, #1C1C1C, #0a0a0a);
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    transform: translateY(0);
}

/* Botones de Unique Ability */
.unique-ability-btn {
    background: linear-gradient(135deg, #4a4a4a, #2a2a2a);
    color: #fff;
    border: 2px solid #666;
}

.unique-ability-btn:hover {
    background: linear-gradient(135deg, #666, #444);
    border-color: #888;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.unique-ability-btn.active {
    background: linear-gradient(135deg, #1C1C1C, #0a0a0a);
    border-color: #fff;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    transform: translateY(0);
}

/* Botones de LIMITED Z-Ability */
.llz-ability-btn {
    background: linear-gradient(135deg, #FFD700, #FFC107);
    color: #1C1C1C;
}

.llz-ability-btn:hover {
    background: linear-gradient(135deg, #FFE87C, #DAA520);
    border-color: #FFD700;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    transform: translateY(-2px);
}

.llz-ability-btn.active {
    background: linear-gradient(135deg, #A78600, #8B6508);
    border-color: #FFD700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
    color: white;
    transform: translateY(0);
}

/* Contenido oculto */
.unique-ability-content,
.llz-ability-content {
    display: none;
}

/* === LIMITED Z-Ability === */

/* Tabla de LIMITED Z-Ability */
.llz-ability-table {
    padding: 10px;
    color: white;
    background-color: #1C1C1C;
}

/* Estilos para el Offcanvas */
.offcanvas-end {
    background-color: #202020;
    color: #ffffff;
    width: 400px;
}

.offcanvas-header, .offcanvas-body {
    background-color: #202020;
    color: #ffffff;
}

.offcanvas-header {
    border-bottom: 1px solid #333;
}

.offcanvas-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.btn-close-white {
    filter: invert(1);
}

.offcanvas-body a {
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 10px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.offcanvas-body a:hover {
    background-color: #575757;
    border-radius: 10px;
    transform: scale(1.05);
}

.image-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.image-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    padding: 10px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.image-link:hover {
    background-color: #575757;
    border-radius: 10px;
    transform: scale(1.05);
}

.sidebar-image {
    width: 50px;
    height: auto;
    margin-right: 20px;
    border-radius: 5px;
    pointer-events: auto;
}

.image-name {
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* === Media Queries === */

/* Pantallas grandes (hasta 1400px) */
@media (max-width: 1400px) {
    .custom-column {
        width: 900px;
    }

    .image-container {
        height: 225px;
    }

    .text-overlay,
    .text-overlay-right {
        top: 0.5%;
        max-width: 94%;
        padding: 4px 8px;
        font-size: 24px;
    }

    .assets-icon-btn .assets-icon,
    .awake-symbol-btn .awake-symbol {
        width: 40px;
    }

    .rarity-image {
        max-width: 240px;
    }

    .legends-limited-image {
        max-width: 320px;
    }

    .attribute-image {
        max-width: 80px;
    }

    .misc-image {
        width: 40px;
        bottom: 45px;
        right: 20px;
    }

    .misc-image-left {
        width: 40px;
        bottom: 45px;
        right: 70px;
    }

    .ability-title,
    .main-ability-title,
    .unique-ability-title,
    .z-ability-title,
    .llz-ability-title,
    .tags-title {
        font-size: 20px;
    }

    .ability-name .ability-cell {
        padding: 5px 5px 2px 5px;
        font-size: 19px;
    }

    .ability-detail .ability-cell {
        padding: 0 5px 5px 5px;
        font-size: 18px;
    }

    .tag-text {
        font-size: 15px;
    }

    .z-ability-buttons,
    .unique-ability-buttons,
    .llz-ability-buttons {
        gap: 12px;
    }

    .z-ability-btn,
    .unique-ability-btn,
    .llz-ability-btn {
        padding: 7px 18px;
        font-size: 15px;
    }
}

/* Pantallas medianas (hasta 1100px) */
@media (max-width: 1100px) {
    .custom-column {
        width: 600px;
    }

    .image-container {
        height: 150px;
    }

    .text-overlay,
    .text-overlay-right {
        top: 0.5%;
        max-width: 92%;
        padding: 3px 6px;
        font-size: 20px;
    }

    .assets-icon-btn .assets-icon,
    .awake-symbol-btn .awake-symbol {
        width: 30px;
    }

    .rarity-image {
        max-width: 180px;
    }

    .legends-limited-image {
        max-width: 240px;
    }

    .attribute-image {
        max-width: 60px;
    }

    .misc-image {
        width: 35px;
        bottom: 30px;
        right: 15px;
    }

    .misc-image-left {
        width: 35px;
        bottom: 30px;
        right: 55px;
    }

    .ability-title,
    .main-ability-title,
    .unique-ability-title,
    .z-ability-title,
    .llz-ability-title,
    .tags-title {
        font-size: 18px;
    }

    .ability-name .ability-cell {
        padding: 5px 5px 2px 5px;
        font-size: 19px;
    }

    .ability-detail .ability-cell {
        padding: 0 5px 5px 5px;
        font-size: 18px;
    }

    .tag-text {
        font-size: 14px;
    }

    .z-ability-buttons,
    .unique-ability-buttons,
    .llz-ability-buttons {
        gap: 10px;
    }

    .z-ability-btn,
    .unique-ability-btn,
    .llz-ability-btn {
        padding: 6px 15px;
        font-size: 14px;
    }
}

/* Pantallas pequeñas (hasta 768px) */
@media (max-width: 768px) {
    .custom-column {
        width: 100%;
        padding: 0 10px;
    }

    .image-container {
        position: relative;
        height: 150px;
        min-height: 150px;
        max-height: 200px;
        overflow: hidden;
    }

    .text-overlay,
    .text-overlay-right {
        position: absolute;
        top: 0;
        max-width: 90%;
        padding: 0 5px;
        font-size: 13px;
        line-height: 1;
        z-index: 2;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .text-overlay-right {
        align-items: flex-end;
        text-align: right;
    }

    .assets-icon-btn .assets-icon,
    .awake-symbol-btn .awake-symbol {
        width: 25px;
    }

    .rarity-image {
        max-width: 140px;
    }

    .legends-limited-image {
        max-width: 300px;
        bottom: 40px;
    }

    .attribute-image {
        max-width: 50px;
    }

    .misc-image {
        width: 30px;
        bottom: 35px;
        right: 10px;
    }

    .misc-image-left {
        width: 40px;
        bottom: 35px;
        right: 55px;
    }

    .ability-title,
    .main-ability-title,
    .unique-ability-title,
    .z-ability-title,
    .llz-ability-title,
    .tags-title {
        font-size: 16px;
    }

    .ability-name .ability-cell {
        padding: 5px 5px 2px 5px;
        font-size: 18px;
    }

    .ability-detail .ability-cell {
        padding: 0 5px 5px 5px;
        font-size: 16px;
    }

    .tag-text {
        font-size: 13px;
    }

    .z-ability-buttons,
    .unique-ability-buttons,
    .llz-ability-buttons {
        flex-wrap: wrap;
        gap: 8px;
    }

    .z-ability-btn,
    .unique-ability-btn,
    .llz-ability-btn {
        padding: 5px 12px;
        font-size: 13px;
        flex: 1 1 45%;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    .z-ability-btn:hover,
    .unique-ability-btn:hover,
    .llz-ability-btn:hover {
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
    }

    .z-ability-btn.active,
    .unique-ability-btn.active,
    .llz-ability-btn.active {
        box-shadow: 0 0 8px rgba(255, 255, 255, 0.15);
    }
}