/* =====================
   ARROW BAR (Navigation)
   ===================== */

.arrow-bar {
    display: flex;
    align-items: center;
    flex: 1;
    overflow: hidden;
    padding: 0 8px;
    gap: 4px;
}

.nav-arrow {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    color: #ffbf00;
    text-decoration: none;
    white-space: nowrap;
    max-width: 200px;
    overflow: hidden;
    background: transparent;
    margin: 0;
    transition: background-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.nav-arrow:hover {
    background-color: rgba(255, 191, 0, 0.12);
    color: #ffd966;
    transform: none;
}

.arrow-icon {
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1;
}

.arrow-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.current-card-indicator {
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.82rem;
    overflow: hidden;
    padding: 0 4px;
    min-width: 0;
}

.current-id {
    color: #ffbf00;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

.current-name {
    color: #d0d0d0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* =====================
   MAIN PANEL LAYOUT
   ===================== */

/* Global main is a wrapping flex row; on ultra-wide screens the top bar and
   card panel would otherwise share one row, pushing the panel right of center. */
main {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.card-page-top {
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 0;
    box-sizing: border-box;
}

.card-back-link {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.72rem;
    letter-spacing: 2px;
    color: rgba(255, 191, 0, 0.65);
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.card-back-link:hover {
    color: #ffbf00;
}

.card-key-hint {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.62rem;
    letter-spacing: 1px;
    color: rgba(240, 236, 230, 0.25);
    white-space: nowrap;
}

.card-panel {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 24px;
    width: 100%;
    max-width: 1060px;
    margin: 0 auto;
    padding: 14px 20px 0;
    box-sizing: border-box;
    animation: card-panel-in 0.4s ease both;
}

@keyframes card-panel-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* =====================
   CARD IMAGE SECTION
   ===================== */

.card-image-section {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    position: sticky;
    top: 150px;
}

.card-image-section img {
    max-height: 64vh;
    width: auto;
    border-radius: 14px;
    box-shadow: 0 10px 44px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.04);
    display: block;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card-image-section img:hover {
    transform: scale(1.03);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 32px rgba(255, 191, 0, 0.18);
}

/* =====================
   CARD INFO SECTION
   ===================== */

.card-info-section {
    flex: 1;
    min-width: 0;
    max-width: 500px;
    background: rgba(8, 8, 8, 0.82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 191, 0, 0.11);
    border-radius: 20px;
    padding: 26px 30px;
    color: #e0d8d0;
    text-align: left;
}

.card-header-row {
    margin-bottom: 18px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 191, 0, 0.18);
}

.card-title {
    font-family: 'DragonSlayer', 'HwyGothic', Arial, sans-serif;
    font-size: 1.8rem;
    color: #ffbf00;
    margin: 0 0 10px 0;
    letter-spacing: 3px;
    text-transform: uppercase;
    line-height: 1.2;
    text-shadow: 0 0 16px rgba(255, 191, 0, 0.2);
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.card-id-badge {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 191, 0, 0.7);
    letter-spacing: 1px;
    background: rgba(255, 191, 0, 0.1);
    border: 1px solid rgba(255, 191, 0, 0.22);
    border-radius: 20px;
    padding: 3px 11px;
    font-variant-numeric: tabular-nums;
}

.set-badge {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.72rem;
    font-weight: bold;
    letter-spacing: 1.5px;
    padding: 3px 12px;
    border-radius: 20px;
    border: 1px solid;
}

.dragons-set {
    color: #ff7043;
    border-color: #ff7043;
    background-color: rgba(255, 112, 67, 0.1);
}

.gemini-set {
    color: #ab8ee8;
    border-color: #ab8ee8;
    background-color: rgba(171, 142, 232, 0.1);
}

/* =====================
   POWER ROW
   ===================== */

/* "Skins for this card" → /skins?tab=CARD&card={id} */
.card-skins-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    padding: 11px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 191, 0, 0.35);
    background: rgba(255, 191, 0, 0.08);
    color: #ffbf00;
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.82rem;
    font-weight: bold;
    letter-spacing: 1px;
    transition: background 0.18s, border-color 0.18s;
}

.card-skins-link:hover {
    background: rgba(255, 191, 0, 0.16);
    border-color: rgba(255, 191, 0, 0.7);
    color: #ffd54f;
}

.card-skins-count {
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #ffbf00;
    color: #0e0e0e;
    font-size: 0.72rem;
    text-align: center;
}

.card-skins-link .card-skins-arrow {
    font-size: 0.75rem;
    transition: transform 0.18s;
}

.card-skins-link:hover .card-skins-arrow {
    transform: translateX(3px);
}

.power-row {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    padding: 12px 18px;
    background-color: rgba(255, 191, 0, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(255, 191, 0, 0.18);
}

.power-label {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.7rem;
    color: rgba(255, 191, 0, 0.55);
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.power-value {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 1.65rem;
    font-weight: bold;
    color: #ffbf00;
    line-height: 1;
}

.power-value.infinity {
    font-family: 'Brush Script MT', cursive;
    font-size: 2rem;
}

/* =====================
   INFO SECTIONS
   ===================== */

.info-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 191, 0, 0.08);
}

.info-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section-title {
    font-family: 'HwyGothic', Arial, sans-serif;
    font-size: 0.66rem;
    letter-spacing: 3px;
    color: rgba(255, 191, 0, 0.55);
    margin: 0 0 8px 0;
    text-transform: uppercase;
}

.section-content {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #cdc5bc;
}

.ability-text {
    color: #E0A69F;
}

.lore-text {
    font-style: italic;
    color: #b0a89e;
    border-left: 2px solid rgba(255, 191, 0, 0.22);
    padding-left: 14px;
    line-height: 1.7;
}

.clarification-section {
    background-color: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 12px 16px;
    border-left: 3px solid rgba(255, 191, 0, 0.35);
    border-bottom: none;
    margin-bottom: 0;
}

.clarification-text {
    font-size: 0.87rem;
    color: #8a8a80;
}

/* =====================
   MOBILE STYLES
   ===================== */

@media screen and (max-width: 767px), screen and (hover: none) {

    .card-panel {
        flex-direction: column;
        align-items: center;
        padding: 16px 12px 0;
        gap: 14px;
    }

    .card-image-section {
        position: static;
        width: 100%;
        max-width: 300px;
    }

    .card-image-section img {
        max-height: none;
        max-width: 100%;
        width: 100%;
    }

    .card-info-section {
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
        padding: 16px 18px;
        border-radius: 14px;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .section-content {
        font-size: 0.85rem;
    }

    .power-value {
        font-size: 1.35rem;
    }

    .power-value.infinity {
        font-size: 1.65rem;
    }

    .card-page-top {
        padding: 12px 14px 0;
    }

    .card-key-hint {
        display: none; /* no arrow keys on touch devices */
    }

    .nav-arrow {
        font-size: 0.7rem;
        max-width: 100px;
        padding: 3px 8px;
    }

    .arrow-label {
        display: none;
    }

    .current-card-indicator {
        font-size: 0.72rem;
    }

    .current-name {
        display: none;
    }
}
