:root {
    --primary: #6366f1;
    --secondary: #8b5cf6;
    --background: #0f172a;
    --surface: rgba(255, 255, 255, 0.05);
    --border: rgba(255, 255, 255, 0.1);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --font-family: 'Inter', sans-serif;
}

/* Temi colore */
.theme-marriage {
    --primary: #ff69b4;
    --secondary: #ff1493;
}

.theme-single {
    --primary: #9370db;
    --secondary: #6a5acd;
}

.theme-health {
    --primary: #3cb371;
    --secondary: #2e8b57;
}

.theme-work {
    --primary: #1e90ff;
    --secondary: #0047ab;
}

.theme-info {
    --primary: #ffa500;
    --secondary: #ff8c00;
}

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

body {
    background: var(--background);
    color: var(--text-primary);
    font-family: var(--font-family);
    line-height: 1.6;
    padding: 2rem;
    min-height: 100vh;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 4rem;
    padding: 4rem 0;
}

.gradient-text {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -0.05em;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-top: 1rem;
}

.grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 320px 1fr;
}

.card {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.input-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

input, select {
    width: 100%;
    padding: 0.875rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.slider-container {
    position: relative;
    padding-top: 0.5rem;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.pill-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill.active {
    background: var(--primary);
    color: white;
    border-color: var(--secondary);
}

.primary-button {
    width: 100%;
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-button:hover {
    background: var(--secondary);
}

.main-content {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.life-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.phase-grid {
    display: grid;
    gap: 2rem;
}

.phase-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    position: relative;
}

.current-phase {
    border-color: var(--primary);
}

.current-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.phase-header {
    margin-bottom: 1rem;
}

.phase-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.phase-years {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.phase-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.azioni-section, .pros-cons, .legal-notes {
    margin-top: 1.5rem;
}

.section-title {
    color: var(--primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

ul {
    list-style-type: none;
    padding-left: 1rem;
}

ul li {
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

.pros-cons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.pros-list, .cons-list {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
}

.legal-notes {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1rem;
}

.info-section {
    background: var(--surface);
    backdrop-filter: blur(12px);
    border-radius: 24px;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    width: 100%;
}

.info-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 100%;
    width: 100%;
}

.info-card {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
}

.info-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.info-card p {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.animate-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */

@media (max-width: 1024px) {
    .container {
        padding: 1rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .header {
        padding: 2rem 0;
    }

    .gradient-text {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .life-stats {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .phase-grid {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        padding: 1rem;
    }

    .gradient-text {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 0.875rem;
    }

    .primary-button {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .pill-selector {
        flex-direction: column;
        gap: 0.25rem;
    }

    .pill {
        width: 100%;
        text-align: center;
        padding: 0.5rem 0;
    }

    .life-stats {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .phase-card {
        padding: 1rem;
    }

    .info-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .info-section {
        padding: 1rem;
    }

.info-grid {
    gap: 1.5rem;
}

.icona {
    width: 30px;
    height: 30px;
    vertical-align: middle;
    margin-right: 0.5rem;
    display: inline-block;
}

.icon {
    width: 15px;
    height: 15px;
    vertical-align: text-bottom;
    margin-right: 0.3rem;
    display: inline-block;
}

.icone-paragraph { /* icona senza margine che e alta quanto un paragrafo e larga uguale per acompagrare nel testo*/
    display: inline-block !important;
    width: 20px !important;
    height: 20px !important;
    vertical-align: middle !important;
    margin-right: 0.5rem !important;
}
 
.lifespan-bar-container {
    font-size: 1rem !important;
    letter-spacing: 0.05rem !important;
    display: flex;
    flex-wrap: wrap;
    max-width: 100%;
    gap: 0.1rem;
    user-select: none;
}

.lifespan-bar-container span {
    display: inline-block;
    width: 1.2rem;
    height: 1.2rem;
    margin: 0 0.05rem 0.1rem 0;
}
}

/* --- utilita per gestire le immagini --- */
.img-opacity {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.img-opacity:hover {
    opacity: 1;
}
