:root{
    --card-width: 350px;
    --card-height: 490px;
    --border-radius: 14px;
    --bg-main: linear-gradient(180deg,#f5b431 0%, #ffe488 60%);
    --accent: #e74c3c; /* fire-like accent */
    --type-accent: #4aa3ff; /* water fallback */
    --shadow: 0 14px 30px rgba(0,0,0,0.25);
    --glass: rgba(255,255,255,0.5);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

/* Page layout */
body{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    background: linear-gradient(135deg,#0f1724 0%, #1b2b3a 100%);
    padding:40px;
    box-sizing:border-box;
}

.card-wrapper{
    width:var(--card-width);
    height:var(--card-height);
    border-radius:var(--border-radius);
    background:var(--bg-main);
    box-shadow:var(--shadow);
    position:relative;
    overflow:hidden;
    border:12px solid #b7b7b7; /* thin inner border */
    display:flex;
    flex-direction:column;
}

#top-left {
    position: absolute;
    top: 0;
    left: 0;
    color: #5c5c5c;
    font-size: 12px;
    text-shadow: 0px 0px 2px #fff;
    padding: 5px;
    border-radius: 0 0 3px 0;
    background: radial-gradient(circle at bottom right, #d5d5d5 0%, #b7b7b7 60%);
}

/* top bar (name / HP / type) */
.topbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:7px 14px;
    gap:8px;
}

.pokemon-name{
    padding-left: 2rem;
    font-weight:700;
    letter-spacing:0.4px;
    font-size:18px;
}

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

.hp{
    font-weight:700;
    color:black;
    font-size:20px;
}

.hp span{
    font-size:9px;
}

.hp span::after{
    content:"  ";
}

.type {
    display: flex;
    align-items: center;
}

.type img{
    height: 24px;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

/* art area */
.art{
    margin:0 14px;
    margin-bottom:10px;
    border-radius:3px;
    overflow:hidden;
    border: 4px solid #b7b7b7;
}

.art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* card body / attacks */
.body{
    flex: 1 1 auto;
    padding:12px 14px;
    font-size:14px;
    color:#1b1b1b;
    /* background:linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0.4)); */
}

.attack {
    padding:8px 8px;
    border-radius:8px;
    margin-bottom:8px;
}

.attack-header {
    display:flex;
    gap:10px;
    align-items:flex-start;
}

.energy-cost{
    display:flex;
    gap:6px;
    align-items:center;
    min-width:60px;
    flex-shrink:0;
}

.energy{
    width:18px;
    height:18px;
    border-radius:50%;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    font-size:11px;
    font-weight:700;
    color:white;
    box-shadow:0 2px 0 rgba(0,0,0,0.12);
}

.energy img {
    height: 18px;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

.attack-info{
    flex:1 1 auto;
}

.attack-name{
    font-weight:700;
    font-size:15px;
    margin-bottom:4px;
}

.attack-effect{
    font-size:12px;
    color:#333;
    text-align: justify;
}

.attack-damage{
    font-weight:800;
    font-size:16px;
    color:#111;
    min-width:40px;
    text-align:right;
}

/* footer: weakness / resistance / retreat / set info */
.footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    margin-top:8px;
    gap:8px;
    padding: 5px 10px;
}

.stats{
    border-top: 1px solid #8b7d61;
    width: 100%;
    display:flex;
    align-items:center;
    justify-content: space-between;
    font-size:10px;
    padding-top: 5px;
}

.stats img {
    height: 14px;
    object-fit: contain;
    aspect-ratio: 1 / 1;
}

.stats span {
    font-size: 14px;
    font-weight: 600;
}

.stat-item{
    display:flex;
    gap:6px;
    align-items:center;
}

.small-print{
    padding: 2px 10px;
    font-size:10px;
    color:#4b4b4b;
    display:flex;
    justify-content:space-between;
    margin-top:10px;
    align-items:center;
}

#retraite {
    width: 50%;
}


/* responsive scaling */
@media (max-width:420px){
    .card-wrapper{transform:scale(0.9)}
}