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

html {
    scroll-behavior: smooth;
    font-family: 'Montserrat', sans-serif;
}

html,
body {
    height: 100%;
}

body {
    min-height: 100vh;
}

body {
    background-color: #2d2f33;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='100%25' viewBox='0 0 1600 800'%3E%3Cg %3E%3Cpolygon fill='%23292b2f' points='1600 160 0 460 0 350 1600 50'/%3E%3Cpolygon fill='%2326282b' points='1600 260 0 560 0 450 1600 150'/%3E%3Cpolygon fill='%23222427' points='1600 360 0 660 0 550 1600 250'/%3E%3Cpolygon fill='%231f2023' points='1600 460 0 760 0 650 1600 350'/%3E%3Cpolygon fill='%231b1c1e' points='1600 800 0 800 0 750 1600 450'/%3E%3C/g%3E%3C/svg%3E");
    background-attachment: fixed;
    background-size: cover;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

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

header {
    width: 100%;
    padding: 20px 40px;
}

#header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

#logo {
    font-size: 20px;
    font-weight: 500;
}

#dash {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.highlight {
    color: #8dd2e4;
}

/* ---------- Buttons ---------- */
.btn-primary,
.btn-primary-full,
.btn-secondary,
.btn-discord,
.btn-discord-full {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

.btn-primary,
.btn-primary-full {
    background: #e7f4f7;
    color: #12203a;
}

.btn-primary:hover,
.btn-primary-full:hover {
    transform: translateY(-1px);
}

.btn-primary:active,
.btn-primary-full:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-discord,
.btn-discord-full {
    background: #5865F2;
    color: white;
}

.btn-discord:hover,
.btn-discord-full:hover {
    background: #4752c4;
    transform: translateY(-1px);
}

.btn-discord:active,
.btn-discord-full:active {
    transform: translateY(0);
}

.btn-primary-full,
.btn-discord-full {
    width: 100%;
}

.btn-full {
    width: 100%;
}

/* ---------- Landing ---------- */
#landing {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}

.main-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 12px;
}

.subtitle {
    font-size: 18px;
    color: #adbec9;
    max-width: 600px;
    margin-bottom: 40px;
}

.secondary {
    color: #adbec9;
}

.proxy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 900px;
}

.proxy-card {
    background-color: rgba(34, 46, 78, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    padding: 24px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.price-box {
    margin-top: 15px;
    padding: 10px 18px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    font-size: 16px;
    font-weight: 500;
    color: white;
}

/* ---------- Other pages' footer (dashboard, etc.) ---------- */
footer {
    border-top: 1px solid rgba(255,255,255,.08);
    background: rgba(0,0,0,.15);
    padding: 18px 40px;
}

#footer-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    max-width: 1100px;
    margin: 0 auto;
}

.footer-copy {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: #8d98a5;
}

.footer-copy a {
    color: #8d98a5;
    transition: .2s;
}

.footer-copy a:hover {
    color: white;
}

@media (max-width:760px){
    #footer-wrapper{
        flex-direction: column;
        gap: 15px;
    }

    .footer-copy{
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ---------- Pricing Section ---------- */
#pricing-section {
    padding: 40px 20px 80px;
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
}

.pricing-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch; /* Cambiato da 'start' a 'stretch' */
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
}

.pricing-left {
    display: flex;
    flex-direction: column;
    height: 100%; /* Forziamo l'altezza intera */
}

.pricing-card {
    background-color: rgb(73 75 82 / 65%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    padding: 24px;
    border-radius: 10px;
    margin-bottom: 0; /* Rimosso il margin-bottom 20px che sfasava l'altezza */
    height: 100%;     /* Fa pareggiare l'altezza tra i due box */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.pricing-card h3 {
    font-size: 16px;
    font-weight: 700;
}


.features-list { list-style: none; margin-top: 15px; }
.features-list li { margin-bottom: 10px; color: #8dd2e4; font-weight: 500; font-size: 14px; }

.tier-list { display: flex; flex-direction: column; gap: 8px; }
.tier-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.tier-item span { color: #adbec9; }
.tier-item strong { color: white; }
.tier-item.active {
    border-color: #8dd2e4;
    background: rgba(141, 210, 228, 0.1);
}
.tier-item.active span,
.tier-item.active strong {
    color: #8dd2e4;
}

/* Calculator Component */
.calc-card { margin-bottom: 0; }
.calc-header { display: flex; justify-content: space-between; margin: 20px 0 10px; font-size: 14px; }
.slider { width: 100%; accent-color: #8dd2e4; margin-bottom: 15px; }

.input-container {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
}
.input-container input {
    background: transparent;
    border: none;
    color: white;
    font-size: 16px;
    width: 100%;
    outline: none;
}

.price-display-box {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 20px 0;
}
.total-price { font-size: 32px; font-weight: 700; color: #8dd2e4; }
.per-gb { font-size: 13px; color: #adbec9; margin-top: 4px; }
.current-tier { font-size: 12px; color: #8dd2e4; margin-top: 8px; }

@media (max-width: 760px) {
    .pricing-container {
        grid-template-columns: 1fr;
    }
    .main-title {
        font-size: 34px;
    }
    #footer-wrapper {
        justify-content: flex-start;
        gap: 40px;
    }
}

/* ---------- Auth pages (Login / Register) ---------- */
.auth-body { display: flex; justify-content: center; align-items: center; min-height: 100vh; }
.auth-wrapper { width: 100%; max-width: 420px; padding: 20px; }
.auth-logo { text-align: center; font-size: 24px; font-weight: 700; margin-bottom: 24px; }
.auth-card {
    background-color: #2d2f33;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    border-radius: 10px;
    padding: 30px;
}
.auth-subtitle { font-size: 13px; color: #adbec9; margin: 6px 0 20px; }

.form-error {
    background: rgba(239, 83, 80, 0.12);
    border: 1px solid rgba(239, 83, 80, 0.4);
    color: #ff9b98;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 12px; margin-bottom: 6px; }
.form-group input {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
    outline: none;
    transition: border-color 0.15s ease;
}
.form-group input:focus {
    border-color: #8dd2e4;
}
.form-group small { font-size: 10px; color: #adbec9; display: block; margin-top: 4px; }

.password-input-wrapper { position: relative; }
.password-input-wrapper input { padding-right: 36px; }
.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    margin-bottom: 20px;
}
.checkbox-container { display: flex; align-items: center; gap: 6px; color: #adbec9; }
.highlight-link { color: #8dd2e4; }
.highlight-link:hover { text-decoration: underline; }

.form-checkbox { display: flex; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 20px; }

.divider { text-align: center; margin: 20px 0; border-bottom: 1px solid rgba(255,255,255,0.1); line-height: 0.1em; }
.divider span { background: #222e4e; padding: 0 10px; font-size: 12px; color: #888; }
.auth-footer { text-align: center; font-size: 13px; margin-top: 20px; color: #adbec9; }

/* ==========================================================================
   DASHBOARD LAYOUT & COMPONENTS
   ========================================================================== */
.dash-body {
    background-color: #2d2f33;
    color: white;
    height: 100vh;
    overflow: hidden;
}

.dash-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: rgba(30, 32, 36, 0.95);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    padding: 20px;
    flex-shrink: 0;
}

.sidebar-header {
    margin-bottom: 30px;
}

.sidebar-header .logo {
    font-size: 18px;
    font-weight: 700;
}

.user-badge {
    margin-top: 8px;
    font-size: 12px;
    color: #adbec9;
    word-break: break-all;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #adbec9;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    width: 100%;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.nav-item.active {
    border-left: 3px solid #8dd2e4;
}

.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.logout-link {
    color: #ff6b6b;
}

/* Dash Content */
.dash-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px 40px;
}

.view-panel {
    display: none;
}

.view-panel.active {
    display: block;
}

.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.dash-header h2 {
    font-size: 26px;
    font-weight: 700;
}

/* Stats Top Row */
.top-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    background: rgb(73 75 82 / 65%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 18px 20px;
    border-radius: 10px;
}

.stat-label {
    font-size: 12px;
    color: #adbec9;
    display: block;
    margin-bottom: 6px;
}

.stat-value {
    font-size: 18px;
    font-weight: 700;
}

.code-value {
    font-family: monospace;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copy-icon {
    cursor: pointer;
    font-size: 14px;
    opacity: 0.7;
}

.copy-icon:hover { opacity: 1; }

/* Dash Card */
.dash-card {
    background: rgb(73 75 82 / 65%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.usage-card .card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.time-filters {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 2px;
}

.filter-btn {
    background: transparent;
    border: none;
    color: #adbec9;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
}

.filter-btn.active {
    background: #e7f4f7;
    color: #12203a;
    font-weight: 600;
}

.usage-stats-sub {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 15px;
}

.usage-big {
    font-size: 28px;
    font-weight: 700;
    color: #8dd2e4;
}

.usage-mini-grid {
    display: flex;
    gap: 30px;
    text-align: right;
    font-size: 13px;
}

.quick-credentials {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #adbec9;
}

/* Generator Section */
.generator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.toggle-switch {
    display: flex;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 3px;
}

.toggle-btn {
    flex: 1;
    background: transparent;
    border: none;
    color: #adbec9;
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
}

.toggle-btn.active {
    background: #e7f4f7;
    color: #12203a;
}

.custom-select {
    width: 100%;
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    outline: none;
}

.proxy-textarea {
    width: 100%;
    height: 250px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #8dd2e4;
    font-family: monospace;
    font-size: 12px;
    padding: 12px;
    resize: none;
    outline: none;
    margin-top: 15px;
}

/* Top Up Stepper & Summary */
.stepper-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto 30px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #adbec9;
}

.step.active {
    color: #8dd2e4;
    font-weight: 600;
}

.step-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.step.active .step-icon {
    border-color: #8dd2e4;
    background: rgba(141, 210, 228, 0.1);
}

.step-line {
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 10px;
}

.topup-card-wrapper {
    max-width: 480px;
    margin: 0 auto;
}

.coupon-link {
    display: block;
    font-size: 12px;
    color: #8dd2e4;
    margin: 12px 0;
}

.checkout-summary {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 13px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    color: #adbec9;
}

.summary-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 4px 0;
}

.total-row {
    font-size: 16px;
    color: white;
}