/* ═══════════════════════════════════════════════════
   Gear Climb Analyzer Pro — Stylesheet v2.0
   © Seremailragno Edizioni
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;600;700;900&family=Barlow:wght@400;500;600&display=swap');

/* ── Reset & base ─────────────────────────────── */
#gca-app, #gca-app * { box-sizing: border-box; }
#gca-app {
    font-family: 'Barlow', sans-serif;
    max-width: 860px;
    margin: 32px auto 48px;
    background: #0d0f14;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.6);
    border: 1px solid #1e2230;
    color: #dde1f0;
}

/* ── Header ───────────────────────────────────── */
.gca-header {
    background: linear-gradient(135deg, #111318 0%, #181c26 60%, #1a1208 100%);
    border-bottom: 3px solid #e85500;
    padding: 0;
}
.gca-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 28px;
    gap: 16px;
}
.gca-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.gca-brand-icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 0 10px rgba(232,85,0,.6));
}
.gca-brand-title {
    display: block;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: .04em;
    color: #fff;
    text-transform: uppercase;
    line-height: 1.1;
}
.gca-brand-title em {
    font-style: normal;
    color: #e85500;
}
.gca-brand-sub {
    display: block;
    font-size: .78rem;
    color: #7880a0;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin-top: 2px;
}
.gca-header-logo {
    height: 42px;
    width: auto;
    object-fit: contain;
    opacity: .9;
    transition: opacity .2s;
}
.gca-header-logo:hover { opacity: 1; }

/* ── Main tabs ────────────────────────────────── */
.gca-tabs {
    display: flex;
    background: #0a0c10;
    border-bottom: 1px solid #1e2230;
    gap: 0;
    overflow-x: auto;
}
.gca-tab {
    flex: 1;
    min-width: 120px;
    padding: 14px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #606880;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: color .2s, border-color .2s, background .2s;
}
.gca-tab:hover { color: #c8cde0; background: #10131a; }
.gca-tab.active {
    color: #e85500;
    border-bottom-color: #e85500;
    background: #0d0f14;
}

/* ── Panels ───────────────────────────────────── */
.gca-panel { display: none; padding: 28px; }
.gca-panel.active { display: block; }

.gca-intro {
    font-size: .9rem;
    color: #7880a0;
    margin: 0 0 22px;
    line-height: 1.6;
    border-left: 3px solid #e85500;
    padding-left: 12px;
}
.gca-intro strong { color: #dde1f0; }

/* ── Input grid ───────────────────────────────── */
.gca-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.gca-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.gca-field label {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #9098b8;
}
.gca-hint {
    font-weight: 400;
    text-transform: none;
    color: #555d78;
    font-size: .78rem;
}
.gca-field input[type="number"],
.gca-field select,
.gca-custom-input {
    background: #13151f;
    border: 1px solid #252840;
    border-radius: 8px;
    color: #dde1f0;
    font-family: 'Barlow', sans-serif;
    font-size: .95rem;
    padding: 9px 12px;
    width: 100%;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    -moz-appearance: textfield;
}
.gca-field input[type="number"]::-webkit-outer-spin-button,
.gca-field input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }
.gca-field input:focus,
.gca-field select:focus {
    border-color: #e85500;
    box-shadow: 0 0 0 3px rgba(232,85,0,.15);
}
.gca-field-accent input,
.gca-field-accent select {
    border-color: #3a2010;
    background: #180f06;
    color: #ffb870;
}
.gca-field-accent label { color: #e85500; }
.gca-field-accent input:focus,
.gca-field-accent select:focus {
    border-color: #e85500;
    box-shadow: 0 0 0 3px rgba(232,85,0,.2);
}

/* Range pairs */
.gca-range {
    display: flex;
    align-items: center;
    gap: 8px;
}
.gca-range input { flex: 1; min-width: 0; }
.gca-range-sep {
    color: #e85500;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

/* ── Primary button ───────────────────────────── */
.gca-btn {
    display: inline-block;
    background: linear-gradient(135deg, #e85500 0%, #c04000 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 13px 32px;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s, filter .15s;
    box-shadow: 0 4px 18px rgba(232,85,0,.35);
    margin-bottom: 4px;
}
.gca-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(232,85,0,.5);
    filter: brightness(1.08);
}
.gca-btn:active { transform: translateY(0); }

/* ── Result box ───────────────────────────────── */
.gca-result {
    margin-top: 22px;
    background: #0a0c10;
    border: 1px solid #1e2230;
    border-radius: 12px;
    padding: 22px 24px;
    animation: gcaFadeIn .3s ease;
}
@keyframes gcaFadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

/* Result stat cards */
.gca-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.gca-stat {
    background: #13151f;
    border: 1px solid #1e2230;
    border-radius: 10px;
    padding: 14px 16px;
    text-align: center;
}
.gca-stat-val {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 1.7rem;
    font-weight: 900;
    line-height: 1;
    color: #e85500;
    display: block;
}
.gca-stat-lbl {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #606880;
    display: block;
    margin-top: 4px;
}
.gca-stat.gca-stat-ok  .gca-stat-val { color: #22cc88; }
.gca-stat.gca-stat-warn .gca-stat-val { color: #f0a020; }
.gca-stat.gca-stat-bad  .gca-stat-val { color: #e83040; }

/* Big headline result */
.gca-result-headline {
    font-family: 'Barlow Condensed', sans-serif;
    font-size: 3rem;
    font-weight: 900;
    letter-spacing: .02em;
    color: #e85500;
    display: block;
    margin-bottom: 6px;
    line-height: 1;
}
.gca-result-note {
    font-size: .82rem;
    color: #5a6278;
    margin-top: 10px;
    line-height: 1.5;
}
.gca-result-note strong { color: #9098b8; }

/* Gear suggestion table */
.gca-gear-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
    margin-top: 8px;
}
.gca-gear-table th {
    background: #13151f;
    padding: 9px 12px;
    text-align: left;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: #606880;
    border-bottom: 1px solid #1e2230;
}
.gca-gear-table td {
    padding: 9px 12px;
    border-bottom: 1px solid #14161e;
    color: #b8bdd4;
}
.gca-gear-table tr:last-child td { border-bottom: none; }
.gca-gear-table tr:hover td { background: #13151f; }
.gca-gear-table .gca-best { color: #22cc88; font-weight: 600; }
.gca-gear-table .gca-tag {
    display: inline-block;
    background: rgba(232,85,0,.18);
    color: #e85500;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 2px 7px;
    border-radius: 4px;
}

/* FTP zones */
.gca-zones { margin-top: 14px; }
.gca-zone-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 7px;
    margin-bottom: 5px;
    border: 1px solid transparent;
}
.gca-zone-row:hover { background: #13151f; }
.gca-zone-num {
    font-family: 'Barlow Condensed', sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    width: 28px;
    text-align: center;
    flex-shrink: 0;
}
.gca-zone-bar-wrap {
    flex: 1;
    background: #13151f;
    border-radius: 4px;
    height: 8px;
    overflow: hidden;
}
.gca-zone-bar { height: 100%; border-radius: 4px; transition: width .5s ease; }
.gca-zone-label { font-size: .8rem; color: #9098b8; min-width: 110px; }
.gca-zone-watts { font-size: .82rem; color: #dde1f0; min-width: 100px; text-align: right; font-family: 'Barlow Condensed', sans-serif; font-weight: 600; }

.gca-no-result {
    text-align: center;
    color: #f04848;
    padding: 18px;
    font-weight: 600;
}

/* ── Sub-tabs (tab 3) ─────────────────────────── */
.gca-subtabs {
    display: flex;
    gap: 6px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.gca-subtab {
    padding: 8px 18px;
    background: #13151f;
    border: 1px solid #1e2230;
    border-radius: 8px;
    color: #606880;
    font-family: 'Barlow Condensed', sans-serif;
    font-size: .88rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .2s;
}
.gca-subtab:hover { color: #dde1f0; border-color: #3a3e58; }
.gca-subtab.active {
    background: rgba(232,85,0,.12);
    border-color: #e85500;
    color: #e85500;
}
.gca-subpanel { display: none; }
.gca-subpanel.active { display: block; }

/* ── Footer ───────────────────────────────────── */
.gca-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 28px;
    border-top: 1px solid #1e2230;
    background: #0a0c10;
    flex-wrap: wrap;
}
.gca-footer-logo {
    height: 34px;
    width: auto;
    object-fit: contain;
    opacity: .75;
    transition: opacity .2s;
    flex-shrink: 0;
}
.gca-footer-logo:hover { opacity: 1; }
.gca-footer-text {
    font-size: .78rem;
    color: #4a5068;
    line-height: 1.6;
}
.gca-footer-text strong { color: #7880a0; }
.gca-footer-text a { color: #e85500; text-decoration: none; }
.gca-footer-text a:hover { text-decoration: underline; }
.gca-disclaimer { font-size: .72rem; color: #363848; }

/* ── Responsive ───────────────────────────────── */
@media (max-width: 600px) {
    .gca-header-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
    .gca-header-logo { height: 30px; }
    .gca-panel { padding: 18px; }
    .gca-grid { grid-template-columns: 1fr; }
    .gca-brand-title { font-size: 1.2rem; }
    .gca-tabs { gap: 0; }
    .gca-tab { font-size: .78rem; padding: 12px 10px; min-width: 90px; }
    .gca-stats { grid-template-columns: repeat(2, 1fr); }
    .gca-result-headline { font-size: 2.2rem; }
    .gca-footer { flex-direction: column; align-items: flex-start; }
}
