:root{
--yellow:#FFD400;
--black:#000;
--card:#111214;
--border:#3a3a3a;
--border-light:#4a4a4a;
--green:#38a169;
--text-muted:#c0c0c0;
--input-bg:#0a0a0a;
--card-surface:#161718;
}

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

body{
background:var(--black);
color:var(--yellow);
font-family:
-system,
BlinkMacSystemFont,
"Segoe UI",
Roboto,
Arial,
sans-serif;
padding:10px;
}

.container{
max-width:520px;
margin:auto;
background:var(--card);
border:1px solid var(--border);
border-radius:18px;
padding:18px;
box-shadow:
0 0 10px rgba(255,212,0,.10),
0 0 30px rgba(255,212,0,.04);
}

h1{
text-align:center;
font-size:2rem;
font-weight:700;
margin-bottom:18px;
line-height:1.2;
}

.top-actions{
display:flex;
gap:8px;
margin-bottom:18px;
}

.top-actions button{
flex:1;
}

button{
cursor:pointer;
border:none;
transition:
transform .15s ease,
opacity .15s ease,
background .15s ease;
}

button:active{
transform:scale(.96);
}

/* =========================
   BOTÕES SUPERIORES
========================= */

.btn-primary{
background:var(--yellow);
color:#000;
font-weight:700;
height:48px;
border-radius:12px;
font-size:16px;
}

.btn-primary:hover{
opacity:.92;
}

.btn-secondary{
background:#1a1a1a;
color:var(--yellow);
border:1px solid #555;
height:48px;
border-radius:12px;
font-size:16px;
}

.btn-secondary:hover{
background:#242424;
border-color:#777;
}

/* =========================
   CARDS
========================= */

.brand{
background:var(--card-surface);
border:1px solid var(--border);
border-radius:14px;
overflow:hidden;
margin-bottom:14px;
}

.brand.cheapest{
border:2px solid var(--green);
box-shadow:
0 0 12px rgba(56,161,105,.45);
}

.brand-header{
padding:18px;
display:flex;
justify-content:space-between;
align-items:center;
cursor:pointer;
font-size:1.15rem;
font-weight:700;
user-select:none;
}

.arrow{
font-size:1.3rem;
}

.brand-body{
display:none;
padding:14px;
}

.brand.open .brand-body{
display:block;
}

/* =========================
   CAMPOS
========================= */

label{
display:block;
font-size:14px;
font-weight:600;
color:#d4d4d4;
margin-top:12px;
margin-bottom:5px;
letter-spacing:.01em;
}

input{
width:100%;
padding:12px;
font-size:16px;
border-radius:10px;
border:1px solid var(--border-light);
background:var(--input-bg);
color:var(--yellow);
outline:none;
}

input:focus{
border-color:#888;
box-shadow: 0 0 0 2px rgba(255,212,0,.15);
}

/* =========================
   STEPPER
========================= */

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

.stepper input{
flex:1;
text-align:center;
}

.step-btn{
width:52px;
height:52px;
border-radius:50%;
background:#fff;
color:#000;
font-size:24px;
font-weight:700;
flex-shrink:0;
}

.step-btn:hover{
background:#ededed;
}

/* =========================
   RESULTADO INDIVIDUAL
========================= */

.card-result{
margin-top:16px;
text-align:center;
font-size:18px;
font-weight:700;
color:#7ee787;
min-height:26px;
}

/* =========================
   LIMPAR PRODUTO
========================= */

.card-actions{
display:flex;
justify-content:flex-end;
margin-top:12px;
}

.clear-product{
background:transparent;
border:1px solid #4a4a4a;
color:#c0c0c0;
padding:7px 12px;
border-radius:8px;
font-size:13px;
}

.clear-product:hover{
background:#1f1f1f;
color:#e0e0e0;
border-color:#666;
}

/* =========================
   VENCEDOR
========================= */

.winner-badge{
color:#7ee787;
font-size:.9rem;
font-weight:600;
margin-left:8px;
}

/* =========================
   RANKING
========================= */

.ranking{
margin-top:20px;
padding-top:16px;
border-top:1px solid var(--border);
}

.ranking h2{
font-size:1.15rem;
margin-bottom:12px;
text-align:center;
}

.ranking-item{
padding:12px;
border:1px solid var(--border-light);
border-radius:10px;
margin-bottom:8px;
font-size:15px;
background:#131415;
}

.ranking-item.first{
border:2px solid var(--green);
background:rgba(56,161,105,.08);
font-weight:700;
}

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

@media (max-width:520px){

.container{
padding:14px;
}

h1{
font-size:1.9rem;
}

.top-actions{
gap:6px;
}

.btn-primary,
.btn-secondary{
height:46px;
font-size:15px;
}

.brand-header{
font-size:1.05rem;
padding:16px;
}

.step-btn{
width:48px;
height:48px;
font-size:22px;
}

}

.ranking-row{
display:grid;
grid-template-columns:50px 1fr 110px;
gap:10px;
align-items:center;
}

.ranking-pos{
font-weight:700;
}

.ranking-name{
overflow:hidden;
text-overflow:ellipsis;
}

.ranking-value{
text-align:right;
font-weight:600;
white-space:nowrap;
}
