html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Dark thematic background for character selection */
body {
    background-color: #1a1a1a;
    color: #ffffff;
}

/* Hide the native radio button circles */
.hero-radio-input {
    display: none;
}

/* Base style for the interactive card wrapper */
.hero-card-label {
    width: 100%;
    cursor: pointer;
}

.hero-card {
    background-color: #2b2b2b;
    border: 3px solid #444444;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

    /* Hover effects on the card structure */
    .hero-card:hover {
        transform: translateY(-5px);
        border-color: #ffc107; /* Highlight gold on hover */
    }

/* Image Container to scope absolute hover message overlays */
.hero-image-container {
    position: relative;
    width: 100%;
    height: 350px; /* Fixed height for image alignment consistency */
    background-color: #000;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    transition: opacity 0.3s ease;
}

.warrior-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%; /* Adjusts the Y-axis position down by 15% */
    transition: opacity 0.3s ease;
}

/* Hidden Hover Message Text Block */
.hero-hover-message {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.85);
    color: #ffc107;
    padding: 15px;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

/* Show message text smoothly when hovering over the card container */
.hero-card:hover .hero-hover-message {
    opacity: 1;
    transform: translateY(0);
}

.hero-card:hover .hero-img {
    opacity: 0.4; /* Dim image slightly to make text more readable */
}

/* Thematic fantasy Nameplate Design */
.hero-nameplate {
    background-color: #3d3d3d;
    color: #ffffff;
    padding: 12px 5px;
    font-size: 1.15rem;
    font-weight: bold;
    letter-spacing: 1px;
    border-top: 2px solid #444444;
    text-transform: uppercase;
}

/* Active Highlight Style: Triggered when the matching radio input is clicked/checked */
.hero-radio-input:checked + .hero-card {
    border-color: #ffc107;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.6) !important;
}

    .hero-radio-input:checked + .hero-card .hero-nameplate {
        background-color: #ffc107;
        color: #000000;
    }

/* Decorative animations on the primary button */
.choose-btn {
    transition: transform 0.1s ease;
}

    .choose-btn:active {
        transform: scale(0.95);
    }

/* Fixes the form precisely in the top-right viewport coordinates */
.custom-logout-anchor {
    position: absolute;
    top: 20px;
    right: 25px;
    z-index: 9999; /* Keeps the button clickable over images/overlays */
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent dark backing box */
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #444;
}

/* ─── COOPERATIVE THEMATIC RARITY BORDER MATRIX HIGHLIGHTS ─── */
.rarity-frame-common {
    border: 1px solid #6c757d !important;
    box-shadow: 0 0 4px rgba(108, 117, 125, 0.3);
}

.rarity-frame-uncommon {
    border: 1px solid #1ebd41 !important;
    box-shadow: 0 0 8px rgba(30, 189, 65, 0.5);
}

.rarity-frame-rare {
    border: 1px solid #0dcaf0 !important;
    box-shadow: 0 0 10px rgba(13, 202, 240, 0.6);
}

.rarity-frame-epic {
    border: 1px solid #b142ff !important;
    box-shadow: 0 0 12px rgba(177, 66, 255, 0.7);
    animation: epicPulse 2s infinite ease-in-out;
}

.rarity-frame-legendary {
    border: 1px solid #ffb100 !important;
    box-shadow: 0 0 15px rgba(255, 177, 0, 0.8);
    animation: legendaryPulse 1.5s infinite ease-in-out;
}

/* Pulsing text color accents */
.text-rarity-common {
    color: #adb5bd !important;
}

.text-rarity-uncommon {
    color: #2ecc71 !important;
    font-weight: bold;
}

.text-rarity-rare {
    color: #00d2ff !important;
    font-weight: bold;
}

.text-rarity-epic {
    color: #9b59b6 !important;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(155, 89, 182, 0.4);
}

.text-rarity-legendary {
    color: #f1c40f !important;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(241, 196, 15, 0.5);
}

@keyframes epicPulse {
    0%, 100% {
        opacity: 0.8;
        box-shadow: 0 0 6px #b142ff;
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 14px #b142ff;
    }
}

@keyframes legendaryPulse {
    0%, 100% {
        opacity: 0.8;
        box-shadow: 0 0 8px #ffb100;
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 18px #ffb100;
    }
}

/* Enhances legibility against gaming backgrounds */
.live-logout-btn {
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    transition: color 0.2s ease, transform 0.1s ease;
}

    .live-logout-btn:hover {
        color: #ff4d4d !important; /* Brighter red text glow on hover */
        text-decoration: underline !important;
    }
