/*==================================================
MONSTERCODEX
==================================================*/

:root{

--bg:#0d1117;
--panel:#161b22;
--panel2:#21262d;
--border:#30363d;

--text:#f0f6fc;
--muted:#b1bac4;

--red:#d32f2f;
--green:#22c55e;
--orange:#f59e0b;
--blue:#3b82f6;

--radius:12px;

}

/*==================================================
RESET
==================================================*/

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

html{
scroll-behavior:smooth;
}

body{
background:var(--bg);
color:var(--text);
font-family:'Inter',sans-serif;
line-height:1.6;
}

img{
display:block;
max-width:100%;
}

a{
text-decoration:none;
color:inherit;
}

ul{
list-style:none;
}

/*==================================================
HEADINGS
==================================================*/

h1,h2,h3,h4{
font-family:'Cinzel',serif;
font-weight:700;
}

h1{
font-size:2.6rem;
}

h2{
font-size:2rem;
margin-bottom:10px;
}

p{
color:var(--muted);
}

/*==================================================
NAVBAR
==================================================*/

.navbar{
display:flex;
justify-content:space-between;
align-items:center;
padding:18px 40px;
background:#0b0f14;
border-bottom:1px solid var(--border);
position:sticky;
top:0;
z-index:999;
}

.logo{
font-size:1.6rem;
font-family:'Cinzel',serif;
font-weight:bold;
color:white;
}

.nav-links{
display:flex;
gap:28px;
}

.nav-links a{
font-weight:600;
transition:.25s;
}

.nav-links a:hover{
color:var(--red);
}

/*==================================================
BUTTONS
==================================================*/

.button{
display:inline-block;
padding:10px 20px;
background:var(--red);
color:white;
border-radius:8px;
font-weight:600;
transition:.25s;
}

.button:hover{
transform:translateY(-2px);
box-shadow:0 10px 25px rgba(211,47,47,.35);
}

/*==================================================
HERO
==================================================*/

.hero{
    padding:120px 20px;
    text-align:center;
    position:relative;

    background:
        radial-gradient(circle at center,
            rgba(0,0,0,.15) 0%,
            rgba(0,0,0,.35) 45%,
            rgba(0,0,0,.75) 100%),
        url("images/banners/header.png");

    background-size:cover;
    background-position:center;
    background-repeat:no-repeat;
}

.hero::before{
content:"";
position:absolute;
inset:0;
background:transparent;

}

.hero-content{
position:relative;
max-width:850px;
margin:auto;
z-index:2;
}

.hero h1{
font-size:4rem;
margin-bottom:20px;
}

.hero p{
font-size:1.2rem;
margin-bottom:30px;
color:#d6d6d6;
}

.search-container{
position:relative;
width:60%;
max-width:600px;
margin:auto;
}

#search{
width:100%;
padding:18px 24px;
background:#1c2128;
border:2px solid var(--red);
border-radius:40px;
color:white;
font-size:1rem;
outline:none;
transition:.25s;
}

#search:focus{
transform:scale(1.02);
}

#search-results{
position:absolute;
top:calc(100% + 8px);
left:0;
width:100%;
background:var(--panel);
border:1px solid var(--border);
border-radius:12px;
overflow:hidden;
display:none;
z-index:9999;
box-shadow:0 15px 35px rgba(0,0,0,.5);
}

.search-item{
display:flex;
align-items:center;
gap:12px;
padding:14px;
cursor:pointer;
border-bottom:1px solid var(--border);
transition:.2s;
}

.search-item:last-child{
border-bottom:none;
}

.search-item:hover{
background:#242b34;
}

.search-item img{
width:48px;
height:48px;
object-fit:cover;
border-radius:6px;
}

.search-item h4{
font-family:'Inter',sans-serif;
margin:0;
}

.search-item p{
font-size:.85rem;
}

/*==================================================
SECTION TITLES
==================================================*/

.section-title{
text-align:center;
margin:70px 0 35px;
}

.section-title h2{
margin-bottom:8px;
}

.section-title p{
font-size:1rem;
color:var(--muted);
}

/*==================================================
CATEGORY GRID
==================================================*/

.categories{
max-width:1400px;
margin:0 auto;
padding:20px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 14px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}


.category {
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:12px;
    padding:18px 8px;
    text-align:center;
    font-weight:600;
    cursor:pointer;
    transition:.25s;
    user-select:none;
    white-space:nowrap;
}

.category:hover{
background:#1d232c;
border-color:var(--red);
transform:translateY(-4px);
}

.category.active{
background:var(--red);
border-color:var(--red);
color:white;
}

/*==================================================
FEATURED MONSTERS
==================================================*/

.featured{
max-width:1400px;
margin:0 auto;
padding:20px;
}

.monster-grid {
    display: grid;
    grid-template-columns: repeat(5, 280px);
    gap: 22px;
    justify-content: center;
}

/*==================================================
MONSTER CARD
==================================================*/

.card{
background:var(--panel);
border:1px solid var(--border);
border-radius:14px;
overflow:hidden;
transition:.3s;
display:flex;
flex-direction:column;
}

.card:hover{
transform:translateY(-8px);
border-color:var(--red);
box-shadow:0 18px 40px rgba(0,0,0,.45);
}

.card img{
width:100%;
height:auto;
display:block;
object-fit:contain;
}

.card-content{
display:flex;
flex-direction:column;
padding:18px;
flex:1;
}

.card-content h3{
    text-align:center;
    margin-bottom:12px;
}

.card-content p{
font-size:.9rem;
margin-bottom:4px;
}

.card .button{
margin-top:auto;
text-align:center;
}

/*==================================================
THREAT BADGES
==================================================*/

.threat{
display:inline-flex;
align-items:center;
justify-content:center;
padding:7px 14px;
border-radius:999px;
font-size:.85rem;
font-weight:700;
margin-bottom:15px;
width:max-content;
}

.threat.extreme{
background:#7f1d1d;
color:#fff;
}

.threat.high{
background:#b45309;
color:#fff;
}

.threat.medium{
background:#1d4ed8;
color:#fff;
}

.threat.low{
background:#166534;
color:#fff;
}

.threat.unknown{
background:#374151;
color:#fff;
}

/*==================================================
FOOTER
==================================================*/

footer{
margin-top:80px;
padding:30px;
text-align:center;
border-top:1px solid var(--border);
color:var(--muted);
background:#0b0f14;
}

/*==================================================
MONSTER PROFILE
==================================================*/

.monster-profile{
max-width:1400px;
margin:50px auto;
padding:0 20px;
}

.profile-top{
display:grid;
grid-template-columns:400px 1fr;
gap:45px;
align-items:start;
}

/*==================================================
LEFT COLUMN
==================================================*/

.profile-left{
display:flex;
flex-direction:column;
align-items:center;
}

#monster-image{
    width:100%;
    aspect-ratio:1/1;
    object-fit:cover;
    border:2px solid var(--red);
    border-radius:14px;
    background:#111;
    margin-bottom:18px;
}


/*==================================================
RIGHT COLUMN
==================================================*/

.profile-right{
display:flex;
flex-direction:column;
gap:15px;
}

.profile-right h1{
font-size:2.5rem;
margin:0;
}

.monster-intro{
font-size:1rem;
line-height:1.8;
color:var(--muted);
}

/*==================================================
INFO TABLE
==================================================*/

.monster-table{
width:100%;
border-collapse:collapse;
background:var(--panel);
border-radius:12px;
overflow:hidden;
}

.monster-table tr:nth-child(even){
background:#1b2129;
}

.monster-table th{
width:180px;
padding:10px 16px;
text-align:left;
background:#20262e;
font-weight:600;
}

.monster-table td{
padding:10px 16px;
}

/*==================================================
ABILITY / WEAKNESS CARDS
==================================================*/

.profile-bottom{
display:grid;
grid-template-columns:1fr 1fr;
gap:20px;
}

.profile-section{
background:var(--panel);
border:1px solid var(--border);
border-radius:12px;
padding:18px;
}

.profile-section h2{
display:flex;
align-items:center;
gap:10px;
font-size:1.1rem;
margin-bottom:15px;
padding-bottom:10px;
border-bottom:2px solid var(--red);
}

#monster-abilities,
#monster-weaknesses{
display:flex;
flex-direction:column;
gap:10px;
}

#monster-abilities li,
#monster-weaknesses li{
display:flex;
align-items:center;
gap:10px;
padding:8px 12px;
background:var(--panel2);
border:1px solid var(--border);
border-radius:8px;
font-size:.9rem;
transition:.25s;
}

#monster-abilities li:hover{
background:#123524;
border-color:var(--green);
}

#monster-weaknesses li:hover{
background:#5a1a1a;
border-color:#ef4444;
}

.ability-icon,
.weakness-icon{
width:30px;
height:30px;
display:flex;
justify-content:center;
align-items:center;
border-radius:50%;
flex-shrink:0;
}

.ability-icon{
background:#14532d;
}

.weakness-icon{
background:#7f1d1d;
}

/*==================================================
RELATED MONSTERS
==================================================*/

.related-grid{
display:grid;
grid-template-columns:repeat(3,1fr);
gap:18px;
margin-top:15px;
}

/*==================================================
RETURN BUTTON
==================================================*/

.back-home{
text-align:center;
margin:45px 0;
}

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

@media(max-width:950px){

.profile-top{
grid-template-columns:1fr;
}

.profile-left{
max-width:340px;
margin:auto;
}

.profile-bottom{
grid-template-columns:1fr;
}

.profile-right h1{
font-size:2rem;
}

.monster-table th{
width:130px;
}

}

/*==================================================
RANDOM ENCOUNTER
==================================================*/

#encounter-screen{
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
display:none;
justify-content:center;
align-items:center;
background:rgba(0,0,0,.85);
backdrop-filter:blur(4px);
z-index:99999;
}

.encounter-box{
width:420px;
max-width:90%;
padding:40px;
background:#161b22;
border:2px solid #d32f2f;
border-radius:14px;
text-align:center;
box-shadow:0 0 40px rgba(211,47,47,.45);
}

.encounter-box h2{
margin-bottom:20px;
}

.encounter-box p{
margin-bottom:25px;
color:#b1bac4;
}

.loading-bar{
height:10px;
background:#30363d;
border-radius:20px;
overflow:hidden;
}

.loading-fill{
width:0;
height:100%;
background:#d32f2f;
animation:loading 2s linear forwards;
}

@keyframes loading{

from{
width:0%;
}

to{
width:100%;
}

}

/*==================================================
LOADING BAR
==================================================*/

.loading-bar{
width:100%;
height:12px;
background:#2b3139;
border-radius:999px;
overflow:hidden;
}

.loading-fill{
width:0;
height:100%;
background:var(--red);
animation:loading 1.5s linear forwards;
}

@keyframes loading{

from{
width:0%;
}

to{
width:100%;
}

}

/*==================================================
GENERAL ANIMATIONS
==================================================*/

.button,
.card,
.category,
.profile-section,
.gallery img,
#monster-image{
transition:.25s;
}

.card:hover{
transform:translateY(-8px);
}

.category:hover{
transform:translateY(-5px);
}

.profile-section:hover{
border-color:var(--red);
}

.gallery img:hover{
transform:scale(1.08);
}

#monster-image:hover{
box-shadow:0 0 35px rgba(211,47,47,.35);
}

/*==================================================
SCROLLBAR
==================================================*/

::-webkit-scrollbar{
width:10px;
}

::-webkit-scrollbar-track{
background:#0d1117;
}

::-webkit-scrollbar-thumb{
background:#3a3f46;
border-radius:20px;
}

::-webkit-scrollbar-thumb:hover{
background:var(--red);
}

/*==================================================
UTILITY
==================================================*/

.hidden{
display:none!important;
}

.center{
text-align:center;
}

.mt20{
margin-top:20px;
}

.mt30{
margin-top:30px;
}

.mb20{
margin-bottom:20px;
}

.mb30{
margin-bottom:30px;
}

/*==================================================
RESPONSIVE
==================================================*/

@media(max-width:1200px){

.monster-grid{
grid-template-columns:repeat(auto-fill,minmax(240px,1fr));
}

}

@media(max-width:900px){

.navbar{
flex-direction:column;
gap:15px;
padding:20px;
}

.nav-links{
flex-wrap:wrap;
justify-content:center;
gap:18px;
}

.hero{
    background:
        linear-gradient(rgba(10,10,10,.70), rgba(10,10,10,.85)),
        url("images/banners/header.png");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    min-height: 650px;

    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;

    padding: 120px 20px 80px;
}

.hero h1{
font-size:2.8rem;
}

.monster-grid{
grid-template-columns:1fr;
}

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

}

@media(max-width:600px){

.hero h1{
font-size:2.2rem;
}

.category-grid{
grid-template-columns:1fr;
}

.profile-left{
max-width:300px;
}

.profile-right h1{
font-size:1.8rem;
}

.monster-table th,
.monster-table td{
padding:10px;
font-size:.9rem;
}

.gallery img{
width:60px;
height:60px;
}

.button{
width:100%;
text-align:center;
}

}

.random-popup {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

.random-popup.show {
    display: flex;
}

.random-box {
    background: #111;
    border: 2px solid #e63946;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    color: white;
    max-width: 420px;
    width: 90%;
}

#encounter-name{

    font-size:32px;
    font-family:'Cinzel',serif;
    margin-top:15px;
    color:#ffffff;

}

#encounter-text{

    color:#cccccc;
    margin-top:10px;
    min-height:24px;

}

#encounter-button{

    margin-top:25px;
    padding:14px 30px;
    background:#e63946;
    color:#fff;
    border:none;
    border-radius:8px;
    font-size:16px;
    cursor:pointer;
    transition:.25s;

}

#encounter-button:hover{

    transform:scale(1.05);
    background:#ff4d5f;

}

#encounter-image{

    width:220px;
    height:220px;
    object-fit:cover;
    border-radius:12px;
    border:2px solid #e63946;
    margin:20px auto;

}

.scan-header{
    font-family:monospace;
    color:#ff3131;
    letter-spacing:4px;
    opacity:.7;
    margin-bottom:15px;
}

.encounter-box h2{
    font-family:'Cinzel',serif;
    letter-spacing:2px;
    margin-bottom:5px;
}

.encounter-box h3{
    color:#ff3131;
    font-size:14px;
    letter-spacing:5px;
    margin-bottom:25px;
    text-transform:uppercase;
}

#encounter-text{
    color:#cfcfcf;
    min-height:24px;
    margin-bottom:15px;
}

#encounter-name{
    font-size:32px;
    letter-spacing:2px;
    margin-top:20px;
    text-transform:uppercase;
}

#encounter-button{
    margin-top:20px;
    padding:14px 30px;
    background:#d11f1f;
    border:none;
    color:white;
    border-radius:8px;
    cursor:pointer;
    font-weight:bold;
    letter-spacing:2px;
    text-transform:uppercase;
    transition:.25s;
}

#encounter-button:hover{
    background:#ff3131;
    transform:scale(1.05);
}

#encounter-image{
    width:220px;
    height:220px;
    object-fit:cover;
    border-radius:12px;
    border:2px solid #d11f1f;
    margin:20px auto;
    display:block;
}

#scan-percent{
    margin-top:15px;
    font-family:monospace;
    font-size:22px;
    color:#ff3131;
    font-weight:bold;
    letter-spacing:2px;
}

html {
    scroll-behavior: smooth;
}

.logo a{
    color:inherit;
    text-decoration:none;
    transition:0.2s;
}

.logo a:hover{
    color:#e63946;
}

.logo{
    position:relative;
    display:inline-block;
    transition:.8s;
    transition-delay:.4s;
}

.monster-eyes{
    position:absolute;
    top:-8px;
    left:55%;
    transform:translateX(-50%);
    display:flex;
    gap:16px;
    pointer-events:none;
}

.eye{
    width:8px;
    height:8px;
    background:#ff3b3b;
    border-radius:50%;
    box-shadow:
        0 0 6px #ff3b3b,
        0 0 14px #ff3b3b,
        0 0 22px #ff3b3b;
    animation:eyes 12s infinite;
    transform-origin:center;
}

.eye:nth-child(2){
    animation-delay:.05s;
}

@keyframes eyes{

    /* Looking forward */
    0%,15%{
        transform:translateX(0) scaleY(1);
    }

    /* Look left */
    20%,30%{
        transform:translateX(-3px) scaleY(1);
    }

    /* Centre */
    35%,45%{
        transform:translateX(0) scaleY(1);
    }

    /* Look right */
    50%,60%{
        transform:translateX(3px) scaleY(1);
    }

    /* Blink */
    65%{
        transform:translateX(3px) scaleY(.1);
    }

    /* Open */
    68%{
        transform:translateX(3px) scaleY(1);
    }

    /* Look left */
    75%,85%{
        transform:translateX(-2px) scaleY(1);
    }

    /* Return */
    90%,100%{
        transform:translateX(0) scaleY(1);
    }

}

.logo{
    position:relative;
    display:inline-block;
    transition:transform .25s ease;
}

.logo.monster-awake{
    transform:scale(1.02);
}

.monster-eyes{
    position:absolute;
    top:-14px;
    left:50%;
    transform:translateX(-50%);
    display:flex;
    gap:16px;
    padding:12px;
    transition:.35s ease;
    pointer-events:none;
}

.logo.monster-awake .monster-eyes{
    animation:shakeEyes .18s linear 4;
    background:#ff1b1b;
    transform:scale(1.35);
    box-shadow:
        0 0 8px #ff0000,
        0 0 18px #ff0000,
        0 0 35px #ff0000,
        0 0 55px #ff0000;
}

.logo:hover .monster-eyes{
    transform:translate(-50%,8px) scale(.9);
    opacity:.15;
}

.card-link{
    text-decoration:none;
    color:inherit;
    display:block;
}

.card-link:hover{
    text-decoration:none;
}

.card{
    cursor:pointer;
}

@keyframes shakeEyes{

0%{transform:translateX(-50%) translateX(0);}
25%{transform:translateX(-50%) translateX(-2px);}
50%{transform:translateX(-50%) translateX(2px);}
75%{transform:translateX(-50%) translateX(-2px);}
100%{transform:translateX(-50%) translateX(0);}

}

/* PAGINATION */

.pagination{

    display:flex;
    justify-content:center;
    align-items:center;
    gap:20px;
    margin:50px 0;

}

.pagination button{

    background:#d32f2f;
    color:#fff;
    border:none;
    padding:12px 24px;
    border-radius:8px;
    cursor:pointer;
    font-weight:bold;
    transition:.25s;

}

.pagination button:hover{

    transform:translateY(-2px);

}

.pagination button:disabled{

    opacity:.4;
    cursor:not-allowed;

}

#page-info{

    font-weight:bold;

}

/* =========================================
   MONSTER TYPE FILTERS
========================================= */

#type-filters {
    width: 100%;
    margin: 25px 0 35px;
    text-align: center;
}

#type-filters .section-title {
    margin-bottom: 20px;
}

#type-filters .section-title h3 {
    margin-bottom: 8px;
}

#type-filters .section-title p {
    margin: 0;
}

.type-filter-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
}

.type-filter {
    padding: 12px 20px;
    border: 1px solid #303640;
    border-radius: 10px;
    background: #171b21;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s ease;
}

.type-filter:hover {
    background: #242a32;
    transform: translateY(-2px);
}

.type-filter.active {
    background: #c93b32;
    border-color: #c93b32;
    color: #fff;
}

/* =========================================
   MONSTER PROFILE INFO FIX
========================================= */

.profile-right .monster-table {
    width: 100%;
    max-width: 700px;
    border-collapse: separate;
    border-spacing: 0 8px;
    background: transparent;
}

.profile-right .monster-table tr {
    background: var(--panel);
}

.profile-right .monster-table tr:nth-child(even) {
    background: var(--panel);
}

.profile-right .monster-table th {
    width: 180px;
    padding: 12px 16px;
    background: #20262e;
    border: 1px solid var(--border);
    border-right: none;
}

.profile-right .monster-table td {
    padding: 12px 16px;
    background: var(--panel);
    border: 1px solid var(--border);
}

.profile-right .monster-table th:first-child {
    border-radius: 8px 0 0 8px;
}

.profile-right .monster-table td:last-child {
    border-radius: 0 8px 8px 0;
}

/* =========================================
   MONSTER PROFILE HEADING
========================================= */

.profile-right h1#monster-name {
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--red);
}

.profile-right .monster-intro {
    margin-bottom: 10px;
}

/* Monster source title on cards */

.monster-source {
    font-weight: 600;
    margin: 6px 0;
}

/* =========================================
   PROFILE LEFT COLUMN
========================================= */

.profile-left {
    align-self: flex-start;
}


/* =========================================
   ABILITIES + WEAKNESSES UNDER IMAGE
========================================= */

.profile-left .profile-bottom {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 8px;

    width: 100%;

    margin-top: 10px;

}


/* Individual boxes */

.profile-left .profile-section {

    margin: 0;

    padding: 12px;

    min-width: 0;

    height: auto;

}


/* Headings */

.profile-left .profile-section h2 {

    font-size: 0.9rem;

    margin: 0 0 8px;

    padding-bottom: 6px;

    border-bottom: 1px solid var(--border);

}


/* Lists */

.profile-left .profile-section ul {

    margin: 0;

    padding: 0;

    list-style: none;

}


/* List items */

.profile-left .profile-section li {

    font-size: 0.8rem;

    padding: 4px 0;

}


/* Icons */

.profile-left .ability-icon,
.profile-left .weakness-icon {

    width: 22px;

    display: inline-block;

    text-align: center;

}


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

@media (max-width: 700px) {

    .profile-left .profile-bottom {

        grid-template-columns: 1fr;

    }

}/* =========================================
   MONSTER PROFILE - INFO + RELATED LAYOUT
   Keeps profile image exactly where it is
========================================= */

/* Keep the existing profile layout */
.profile-top {
    align-items: start;
}


/* LEFT SIDE - DO NOT MOVE IMAGE */

.profile-left {
    align-self: start;
}


/* Abilities + Weaknesses remain underneath image */

.profile-left .profile-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
}


/* =========================================
   RIGHT SIDE
========================================= */

.profile-right {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 20px;
    align-items: start;
}


/* Name + description stay at top */

.profile-main-info {
    min-width: 0;
}


/* =========================================
   INFORMATION TABLE CARD
========================================= */

.profile-main-info .monster-table {
    margin-top: 20px;
}


/* =========================================
   RELATED MONSTERS - SEPARATE CARD
========================================= */

.related-side {
    width: 180px;
    margin-top: 165px;
    padding: 15px;

    box-sizing: border-box;

    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;

    align-self: start;
}


/* Related heading */

.related-side h2 {
    margin: 0 0 12px;
    padding-bottom: 8px;

    font-size: 1rem;

    border-bottom: 2px solid var(--red);
}


/* Vertical monster list */

.related-side .related-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}


/* Related monster cards */

.related-side .card {
    width: 100%;
    margin: 0;
}


/* Related monster images */

.related-side .card img {
    width: 100%;
    height: 90px;
    object-fit: cover;
}


/* Related monster text */

.related-side .card-content {
    padding: 8px;
}


.related-side .card-content h3 {
    margin: 0;

    font-size: 0.8rem;
}


/* Hide unnecessary card information */

.related-side .card-content p,
.related-side .card-content .button,
.related-side .threat {
    display: none;
}


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

@media (max-width: 900px) {

    .profile-right {
        grid-template-columns: 1fr;
    }

    .related-side {
        width: 100%;
        margin-top: 20px;
    }

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

}

/* =========================================
   CLEAN MONSTER PROFILE LAYOUT
========================================= */


/* Keep image exactly on the left */

.profile-left {
    align-self: flex-start;
}


/* Abilities + weaknesses underneath image */

.profile-left .profile-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
    margin-top: 10px;
}


/* =========================================
   RIGHT SIDE
========================================= */

.profile-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}


/* Name and description stay at the top */

.profile-right #monster-name {
    margin-top: 0;
}


/* =========================================
   INFO + RELATED CARDS
========================================= */

.info-related-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 20px;
    align-items: stretch;
    margin-top: 20px;

    width: 100%;
}


/* Information card */

.info-card {
    width: 100%;
    height: 100%;
}


/* Information table */

.info-card .monster-table {
    width: 100%;
    height: 100%;
    margin: 0;
}


/* Related Monsters card */

.related-side {

    width: 240px;
    height: 100%;
    box-sizing: border-box;

    padding: 15px;

    margin: 0;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 10px;

    align-self: stretch;
}


/* Related heading */

.related-side h2 {

    margin: 0 0 12px;

    padding-bottom: 8px;

    font-size: 1rem;

    border-bottom: 2px solid var(--red);

}


/* Related monsters vertically */

.related-side .related-grid {

    display: flex;

    flex-direction: column;

    gap: 10px;

}


/* Related cards */

.related-side .card {

    width: 100%;

    margin: 0;

}




.related-side .card img {
    

    width: 100%;
    height: 80px;
    object-fit: contain;
    display: block;
    background: #000;



}




.related-side .card-content {

    padding: 7px;

}


.related-side .card-content h3 {

    margin: 0;

    font-size: 0.8rem;

}


/* Hide extra information */

.related-side .card-content p,

.related-side .card-content .button,

.related-side .threat {

    display: none;

}


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

@media (max-width: 900px) {

    .info-related-row {

        grid-template-columns: 1fr;

    }

    .related-side {

        width: 100%;

    }

    .related-side .related-grid {

        display: grid;

        grid-template-columns: repeat(2, 1fr);

    }

}


@media (max-width: 700px) {

    .profile-left .profile-bottom {

        grid-template-columns: 1fr;

    }

}

/* =========================================
   ABOUT PAGE
========================================= */

.about-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 20px 80px;
}


/* Hero */

.about-hero {
    text-align: center;
    margin-bottom: 50px;
}

.about-hero h1 {
    margin-bottom: 10px;
}

.about-tagline {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.about-intro {
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.8;
}


/* Sections */

.about-section {
    margin-bottom: 45px;
}

.about-section h2 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--red);
}

.about-section p {
    line-height: 1.7;
}


/* Cards */

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 25px;
}

.about-card {
    padding: 22px;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 10px;

    text-align: center;
}

.about-card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.about-card h3 {
    margin: 8px 0;
}

.about-card p {
    margin: 0;
    font-size: 0.9rem;
}


/* Profile feature cards */

.profile-features {
    grid-template-columns: repeat(4, 1fr);
}


/* VS button */

.about-button {
    display: inline-block;

    margin-top: 15px;

    padding: 10px 18px;

    border-radius: 6px;

    text-decoration: none;

    font-weight: 600;

    background: var(--red);

    color: white;
}


/* Final section */

.about-final {
    text-align: center;

    max-width: 850px;

    margin-left: auto;
    margin-right: auto;
}


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

@media (max-width: 900px) {

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

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

}


@media (max-width: 600px) {

    .about-page {
        padding: 30px 15px 60px;
    }

    .about-grid,
    .profile-features {
        grid-template-columns: 1fr;
    }

}

/* =========================================
   ABOUT PAGE
========================================= */

.about-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 50px 20px 80px;
}

.about-hero {
    text-align: center;
    margin-bottom: 50px;
}

.about-hero h1 {
    margin-bottom: 10px;
}

.about-tagline {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.about-intro {
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.8;
}

.about-section {
    margin-bottom: 45px;
}

.about-section h2 {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--red);
}

.about-section p {
    line-height: 1.7;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 25px;
}

.about-card {
    padding: 22px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
}

.about-card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.about-card h3 {
    margin: 8px 0;
}

.about-card p {
    margin: 0;
    font-size: 0.9rem;
}

.profile-features {
    grid-template-columns: repeat(4, 1fr);
}

.about-button {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    background: var(--red);
    color: white;
}

.about-final {
    text-align: center;
    max-width: 850px;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 900px) {

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

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

}

@media (max-width: 600px) {

    .about-page {
        padding: 30px 15px 60px;
    }

    .about-grid,
    .profile-features {
        grid-template-columns: 1fr;
    }

}

/* =========================================
   ABOUT DISCLAIMER
========================================= */

.about-disclaimer {
    margin-top: 50px;
    padding: 25px;

    background: var(--panel);

    border: 1px solid var(--border);

    border-radius: 10px;
}

.about-disclaimer h2 {
    margin-top: 0;
}

.about-disclaimer p {
    font-size: 0.85rem;
    line-height: 1.7;
}

/* =========================================
   MONSTER CARD TITLE + THREAT
========================================= */

.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}


.card-title-row h3 {
    margin: 0;
    flex: 1;
}


.card-title-row .threat {
    position: static;
    flex-shrink: 0;
    white-space: nowrap;
}

.monster-source {
    display: block;
    margin: 6px 0;
    line-height: 1.3;
    overflow: visible;
    position: relative;
    z-index: 2;
}