:root {
    --bg-color: #0a0a0a;
    --card-bg: #1a1a1a;
    --primary-orange: #ff6b00;
    --secondary-orange: #ff9100;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --accent-gradient: linear-gradient(135deg, #ff6b00 0%, #ff9100 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.background-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(255, 107, 0, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255, 145, 0, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 50% 50%, rgba(255, 107, 0, 0.08) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
    filter: blur(60px);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -2px;
    margin-bottom: 0.5rem;
}

header h1 span {
    color: var(--primary-orange);
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

h2, h3 {
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.form-group {
    margin-bottom: 1.5rem;
}

.distance-input-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.quick-distances {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-chip {
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-chip:hover {
    border-color: var(--primary-orange);
    color: white;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

input {
    width: 100%;
    background: #2a2a2a;
    border: 1px solid #3a3a3a;
    padding: 1rem;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus {
    outline: none;
    border-color: var(--primary-orange);
    box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.2);
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    background: var(--accent-gradient);
    color: white;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.hidden {
    display: none;
}

.results-container {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 15px;
}

.stat-item .label {
    display: block;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.stat-item .value {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-orange);
}

.comparison-bar-container {
    width: 100%;
    height: 12px;
    background: #2a2a2a;
    border-radius: 6px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.comparison-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-gradient);
    border-radius: 6px;
    transition: width 1s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

#advice-text {
    font-size: 1.1rem;
    color: #e0e0e0;
}

.target-message {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1rem;
}

.upgrade-container {
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    margin-bottom: 2rem;
}

.btn-upgrade {
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(255, 107, 0, 0.3);
    border: none;
    cursor: pointer;
}

.btn-upgrade:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 30px rgba(255, 107, 0, 0.4);
}

.btn-upgrade svg {
    transition: transform 0.3s ease;
}

.btn-upgrade:hover svg {
    transform: translateX(5px);
}

/* Box Prodotti Promo */
.products-promo-card {
    margin-top: 2rem;
    padding: 1.5rem;
    overflow: hidden;
    background: linear-gradient(145deg, var(--card-bg), #252525);
}

.products-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.products-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem;
}

.products-info {
    flex: 1;
}

.products-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.products-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
}

.btn-products {
    display: inline-block;
    width: auto;
    padding: 0.7rem 1.5rem;
    text-decoration: none;
    text-align: center;
}

/* Link nelle Intestazioni Card */
.card-header-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    transition: all 0.3s ease;
}

.card-header-link h3 {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header-link h3 span {
    font-size: 1.2rem;
    opacity: 0.5;
    transition: transform 0.3s ease, opacity 0.3s ease;
    color: var(--primary-orange);
    -webkit-text-fill-color: var(--primary-orange); /* Sovrascrive il gradiente del logo se necessario */
}

.card-header-link:hover h3 span {
    opacity: 1;
    transform: translateX(5px);
}

.card-header-link:hover h3 {
    color: var(--primary-orange);
}

@media (max-width: 600px) {
    .products-content {
        flex-direction: column;
        text-align: center;
    }
    .products-img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 600px) {
    header h1 {
        font-size: 2.5rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
