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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 28rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    padding: 2rem;
    text-align: center;
}

.icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1.5rem;
    opacity: 0.8;
}

h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #0f172a;
}

h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: #1e293b;
}

p {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 2rem;
}

.features {
    text-align: left;
    background: #faf5ff;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b21a8;
    margin-bottom: 0.75rem;
}

.feature-item:last-child {
    margin-bottom: 0;
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-primary {
    background: #9333ea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #7e22ce;
}

.btn-secondary {
    background: white;
    border: 2px solid #ede9fe;
    color: #475569;
}

.btn-secondary:hover {
    border-color: #9333ea;
    background: #faf5ff;
}

.btn-success {
    background: #16a34a;
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #15803d;
}

.btn:disabled {
    background: #cbd5e1;
    color: #94a3b8;
    cursor: not-allowed;
}

.progress-container {
    width: 100%;
    max-width: 28rem;
    margin-bottom: 1.5rem;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 0.25rem;
}

.progress-bar {
    width: 100%;
    height: 0.625rem;
    background: #cbd5e1;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #9333ea;
    transition: width 0.3s;
    border-radius: 9999px;
}

.progress-fill.pre-quiz {
    background: #9333ea;
}

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

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: #9333ea;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.option-btn {
    width: 100%;
    text-align: left;
    padding: 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: white;
    font-size: 1rem;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.option-btn:hover {
    border-color: #9333ea;
    background: #faf5ff;
}

.gdpr-box {
    background: #f8fafc;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    font-size: 0.75rem;
    color: #64748b;
    text-align: justify;
    margin-bottom: 1rem;
}

.gdpr-title {
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-bottom: 0.25rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    margin-bottom: 1.5rem;
    text-align: left;
}

.checkbox-label input {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

.checkbox-label span {
    font-size: 0.75rem;
    color: #475569;
}

.session-id {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: #94a3b8;
}

.result-score {
    background: #faf5ff;
    padding: 1rem;
    border-radius: 0.75rem;
    color: #6b21a8;
    margin-bottom: 1.5rem;
}

.result-score-number {
    font-weight: 700;
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.result-score-label {
    font-size: 0.875rem;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.flag {
    font-size: 1.5rem;
}

.question-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9333ea;
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

@media (max-width: 640px) {
    .container {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
}

/* Spacing between contact buttons */
.container .btn + .btn {
    margin-top: 0.75rem;
}

/* ── Blocchi Temi ─────────────────────────────────── */
.themes-container {
    max-width: 32rem;
}

.block-section {
    margin-bottom: 1.5rem;
    background: #faf5ff;
    border: 1px solid #ede9fe;
    border-radius: 0.75rem;
    padding: 1rem;
}

.block-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b21a8;
    margin-bottom: 0.75rem;
}

.block-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.theme-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.5rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.theme-label:hover {
    background: #f3e8ff;
}

.theme-label.selected {
    border-color: #9333ea;
    background: #f3e8ff;
}

.theme-label.selected .theme-text {
    font-weight: 600;
    color: #581c87;
}

.theme-label.dimmed {
    opacity: 0.45;
    pointer-events: none;
}

.theme-label input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin-top: 0.2rem;
    accent-color: #9333ea;
    flex-shrink: 0;
    cursor: pointer;
}

.theme-text {
    font-size: 0.875rem;
    color: #475569;
    line-height: 1.4;
}

/* ── A-spec highlight ─────────────────────────────── */
.aspec-group {
    background: #faf5ff;
    border: 1px solid #ede9fe;
    border-radius: 0.75rem;
    padding: 1rem;
}

.aspec-group .form-label {
    color: #6b21a8;
    font-weight: 700;
}

/* ── Result icon ──────────────────────────────────── */
.result-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

/* ── Open question textarea ───────────────────────── */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
}

/* ── Event date subtitle ──────────────────────────── */
.event-date {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9333ea;
    margin-bottom: 1rem;
}

/* ── Title purple accent ──────────────────────────── */
.purple { color: #9333ea; }
