/* ======================================
   ANDREA PADOAN LANDING - STYLES OTTIMIZZATI
   ====================================== */

/* ======================================
   🎨 BASE STYLES
   ====================================== */

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

body {
    background: #000;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #fff;
    overflow-x: hidden;
    min-height: 100vh;
}

/* ======================================
   📱 HEADER STYLES - ALTEZZA RIDOTTA
   ====================================== */

.header {
    position: fixed;
    top: 10px;
    left: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 45px;
}

.chi-sono-btn {
    background: rgba(255, 107, 53, 0.9);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 22px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chi-sono-btn:hover {
    background: #ff6b35;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 107, 53, 0.4);
}

.dashboard-btn {
    background: rgba(107, 114, 128, 0.9);
    color: #fff;
    border: none;
    padding: 8px;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dashboard-btn:hover {
    background: #6b7280;
    transform: translateY(-2px) scale(1.1);
}

/* ======================================
   🌟 HERO STYLES - ALTEZZA RIDOTTA
   ====================================== */

.hero {
    text-align: center;
    padding: 30px 20px 20px;
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
    min-height: auto;
}

.hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    font-weight: 900;
    color: #ff6b35;
    margin-bottom: 15px;
    /* RIMOSSO: transform e transition per bloccare effetti scroll */
}

.hero-subtitle {
    font-size: clamp(1.2rem, 2.8vw, 1.8rem);
    color: #fff;
    margin-bottom: 12px;
    font-weight: bold;
    /* RIMOSSO: transform e transition per bloccare effetti scroll */
}

.hero-pitch {
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: #b0b0b0;
    max-width: 700px;
    margin: 0 auto 25px;
    line-height: 1.5;
    /* RIMOSSO: transform e transition per bloccare effetti scroll */
}

.profile-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 25px 0;
}

.profile-image {
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b35, #ff8c5a);
    padding: 4px;
    margin-bottom: 18px;
}

.profile-content {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #000;
    background-image: url('./images/andrea-profile.jpg');
    background-size: cover;
    background-position: center;
    /* OTTIMIZZAZIONE: Preload dell'immagine critica */
    image-rendering: optimizeSpeed;
}

.main-cta {
    background: linear-gradient(45deg, #ff6b35, #ff8c5a);
    color: #fff;
    padding: 20px 45px;
    border: none;
    border-radius: 45px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 18px;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
    max-width: 450px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.main-cta:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.5);
}

/* ======================================
   🎯 QUIZ STYLES - EFFETTI FADING RIMOSSI
   ====================================== */

/* RIMOSSO: Floating particles background che causava lag */

/* RIMOSSO: Animazioni e transizioni che causavano fading */

/* Quiz Header Fixed */
.quiz-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 2px solid #ff6b35;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.home-btn {
    background: linear-gradient(45deg, #ff6b35, #ff8533);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 45px;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 25px rgba(255, 107, 53, 0.4);
}

.home-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.6);
    text-decoration: none;
    color: white;
}

.quiz-logo {
    color: #ff6b35;
    font-size: 1.2rem;
    font-weight: 800;
    text-shadow: 0 0 15px rgba(255, 107, 53, 0.5);
}

/* Progress Bar - Semplificata */
.progress-container {
    width: 200px;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b35, #ffaa80);
    border-radius: 25px;
    transition: width 0.5s ease;
    width: 0%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(255, 107, 53, 0.5);
}

/* RIMOSSO: Shimmer effect per migliorare performance */

/* Quiz Container - Altezza ridotta */
.quiz-container {
    padding-top: 80px;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 100px 20px 40px;
    position: relative;
    z-index: 10;
}

.quiz-card {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    padding: 50px 40px;
    max-width: 850px;
    width: 100%;
    text-align: center;
    border: 2px solid rgba(255, 107, 53, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 107, 53, 0.1);
    position: relative;
    overflow: hidden;
}

.quiz-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff6b35, #ffaa80, #ff6b35);
    border-radius: 25px 25px 0 0;
}

/* Welcome Screen */
.welcome-screen {
    display: block;
}

.welcome-title {
    color: #ff6b35;
    font-size: clamp(2.2rem, 4.5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 20px;
    line-height: 1.2;
    text-shadow: 0 0 25px rgba(255, 107, 53, 0.5);
    background: linear-gradient(135deg, #ff6b35, #ffaa80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1.1rem, 2.2vw, 1.4rem);
    margin-bottom: 35px;
    line-height: 1.6;
    font-weight: 500;
}

.welcome-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.welcome-feature {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 18px;
    padding: 25px 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* RIMOSSO: Effetto hover complesso per migliorare performance */
.welcome-feature:hover {
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 15px 30px rgba(255, 107, 53, 0.2);
    border-color: #ff6b35;
    background: rgba(255, 107, 53, 0.15);
}

.welcome-feature i {
    color: #ff6b35;
    font-size: 2.2rem;
    margin-bottom: 15px;
    text-shadow: 0 0 12px rgba(255, 107, 53, 0.5);
}

.welcome-feature h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.welcome-feature p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.5;
}

.start-quiz-btn {
    background: linear-gradient(135deg, #ff6b35, #ffaa80);
    color: white;
    border: none;
    padding: 20px 50px;
    border-radius: 45px;
    font-size: 1.2rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 12px 30px rgba(255, 107, 53, 0.4);
    position: relative;
    overflow: hidden;
}

/* RIMOSSO: Shimmer effect del bottone per performance */

.start-quiz-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 18px 40px rgba(255, 107, 53, 0.6);
}

/* Hero CTA Buttons Container */
.hero-cta-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.chat-benefits {
    font-size: 13px;
    color: #4ade80;
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.chat-benefit {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Quiz Loading Animation - Semplificata */
.quiz-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 35px;
}

.quiz-spinner {
    width: 45px;
    height: 45px;
    border: 3px solid rgba(255, 107, 53, 0.3);
    border-top: 3px solid #ff6b35;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 18px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.quiz-loading-text {
    color: #ff6b35;
    font-size: 15px;
    font-weight: bold;
}

/* Quiz Error State */
.quiz-error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    color: #ef4444;
    margin-bottom: 18px;
}

.quiz-error h3 {
    margin-bottom: 8px;
    font-size: 16px;
}

.quiz-error p {
    font-size: 13px;
    opacity: 0.8;
}

/* ======================================
   🎯 SERVICES STYLES - IMMAGINI OTTIMIZZATE
   ====================================== */

.projects-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 45px 20px;
}

.section-title {
    text-align: center;
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    color: #fff;
    margin-bottom: 25px;
    font-weight: bold;
    line-height: 1.2;
}

.section-subtitle {
    text-align: center;
    font-size: clamp(1rem, 2.2vw, 1.2rem);
    color: #b0b0b0;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

@media (max-width: 1200px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    background: rgba(26, 26, 26, 0.95);
    border-radius: 18px;
    padding: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    overflow: hidden;
    backdrop-filter: blur(10px);
    text-align: center;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-color);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    background: rgba(26, 26, 26, 1);
}

/* OTTIMIZZAZIONE CRITICA: Immagini con loading ottimizzato */
.project-image {
    width: 100%;
    height: 160px;
    border-radius: 12px;
    margin-bottom: 18px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    /* Ottimizzazione per immagini di sfondo */
    background-attachment: local;
    will-change: transform;
    transform: translateZ(0);
}

/* LAZY LOADING per le immagini di sfondo dei progetti */
.project-image[data-bg] {
    background-image: none;
    background-color: #333;
}

.project-image.loaded {
    transition: opacity 0.3s ease;
}

.project-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--accent-color) 0%, transparent 60%);
    opacity: 0.3;
    z-index: 1;
}

.project-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 12px;
}

.project-description {
    font-size: 0.9rem;
    color: #c0c0c0;
    line-height: 1.5;
    margin-bottom: 18px;
}

.project-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.project-btn-primary {
    background: var(--accent-color);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 22px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.project-btn-primary:hover {
    background: #fff;
    transform: translateY(-1px);
}

.project-btn-chat {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border: 1px solid #4ade80;
    padding: 8px 12px;
    border-radius: 18px;
    font-size: 11px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.project-btn-chat:hover {
    background: #4ade80;
    color: #000;
    transform: translateY(-1px);
}

/* Colori per categorie */
.fitness { --accent-color: #ff6b35; }
.nutrition { --accent-color: #4a7c59; }
.business { --accent-color: #6b7280; }

/* Global Chat CTA */
.global-chat-cta {
    text-align: center;
    margin: 40px 0;
    padding: 35px 20px;
    background: rgba(255, 107, 53, 0.05);
    border-radius: 18px;
}

.global-chat-title {
    color: #ff6b35;
    font-size: 1.6rem;
    margin-bottom: 12px;
    font-weight: bold;
}

.global-chat-text {
    color: #b0b0b0;
    margin-bottom: 20px;
    font-size: 1rem;
}

.global-chat-btn {
    background: linear-gradient(45deg, #ff6b35, #ff8c5a);
    color: #fff;
    border: none;
    padding: 15px 35px;
    border-radius: 25px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.global-chat-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

/* ======================================
   💬 CHAT SECTION STYLES - ALTEZZA RIDOTTA
   ====================================== */

.chat-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    padding: 80px 20px;
    position: relative;
}

.chat-container {
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.chat-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    color: #ff6b35;
    margin-bottom: 20px;
    font-weight: 900;
    line-height: 1.1;
}

.chat-subtitle {
    font-size: clamp(1.2rem, 2.8vw, 1.8rem);
    color: #b0b0b0;
    margin-bottom: 35px;
    font-weight: 600;
}

.chat-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.chat-feature {
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 18px;
    padding: 20px;
    text-align: center;
}

.chat-feature-icon {
    font-size: 2.2rem;
    color: #ff6b35;
    margin-bottom: 12px;
}

.chat-feature-title {
    color: #fff;
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 1rem;
}

.chat-feature-text {
    color: #b0b0b0;
    font-size: 0.85rem;
    line-height: 1.4;
}

.chat-intro {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.chat-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: linear-gradient(45deg, #ff6b35, #4a7c59);
    padding: 4px;
    position: relative;
    /* RIMOSSO: animation per ridurre effetti */
}

.chat-avatar-content {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-image: url('./images/andrea-profile.jpg');
    background-size: cover;
    background-position: center;
}

.chat-bubble {
    background: rgba(255, 107, 53, 0.1);
    border: 2px solid #ff6b35;
    border-radius: 25px;
    padding: 35px;
    max-width: 550px;
    position: relative;
}

.chat-bubble::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-right: 15px solid #ff6b35;
}

.chat-text {
    color: #fff;
    font-size: 1.3rem;
    line-height: 1.5;
    margin-bottom: 25px;
    font-weight: 500;
}

.chat-cta {
    background: linear-gradient(45deg, #ff6b35, #ff8c5a);
    color: #fff;
    border: none;
    padding: 20px 45px;
    border-radius: 35px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.chat-cta:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 15px 35px rgba(255, 107, 53, 0.5);
}

/* ======================================
   🤖 CHAT FULLSCREEN STYLES - OTTIMIZZATI
   ====================================== */

.chat-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
    z-index: 10000;
    display: none;
    flex-direction: column;
}

.chat-header {
    background: linear-gradient(45deg, #ff6b35, #4a7c59);
    padding: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 3px 15px rgba(0,0,0,0.3);
    height: 70px;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-image: url('./images/andrea-profile.jpg');
    background-size: cover;
    background-position: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

/* RIMOSSO: Complesse animazioni avatar per performance */

.chat-header-text {
    color: #fff;
}

.chat-header-name {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.chat-header-status {
    font-size: 0.85rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.status-dot-header {
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    /* SEMPLIFICATO: Pulse animation */
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

.chat-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #fff;
    padding: 10px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.chat-messages {
    flex: 1;
    padding: 25px;
    overflow-y: auto;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.messages-container {
    width: 100%;
    max-width: 750px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.message {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    opacity: 0;
    transform: translateY(15px);
    animation: messageSlideIn 0.4s ease forwards;
}

@keyframes messageSlideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message.user {
    flex-direction: row-reverse;
}

.message.andrea {
    flex-direction: row;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.bot-avatar {
    background: linear-gradient(135deg, #ff6b35, #ff8533);
    color: white;
    background-image: url('./images/andrea-profile.jpg');
    background-size: cover;
    background-position: center;
}

.user-avatar {
    background: linear-gradient(135deg, #4ade80, #22d3ee);
    color: white;
}

.message-content {
    max-width: 78%;
    padding: 14px 18px;
    border-radius: 18px;
    position: relative;
    word-wrap: break-word;
    line-height: 1.5;
    font-size: 0.9rem;
}

.bot-message {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 133, 51, 0.05));
    border: 1px solid rgba(255, 107, 53, 0.3);
    color: #e0e0e0;
    border-radius: 18px 18px 18px 6px;
    box-shadow: 0 3px 12px rgba(255, 107, 53, 0.1);
}

.user-message {
    background: linear-gradient(135deg, #ff6b35, #ff8533);
    color: #fff;
    border-radius: 18px 18px 6px 18px;
    box-shadow: 0 3px 12px rgba(255, 107, 53, 0.3);
}

.message-time {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 6px;
    text-align: right;
}

.typing-indicator {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(255, 133, 51, 0.05));
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 18px 18px 18px 6px;
    max-width: 130px;
    margin-bottom: 18px;
    box-shadow: 0 3px 12px rgba(255, 107, 53, 0.1);
}

.typing-dots {
    display: flex;
    gap: 3px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #ff6b35;
    border-radius: 50%;
    animation: typingBounce 1.2s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.28s; }
.typing-dot:nth-child(2) { animation-delay: -0.14s; }

@keyframes typingBounce {
    0%, 80%, 100% { 
        transform: scale(0); 
        opacity: 0.5; 
    }
    40% { 
        transform: scale(1); 
        opacity: 1; 
    }
}

.typing-text {
    color: #ff6b35;
    font-size: 0.8rem;
    font-style: italic;
}

.chat-input-container {
    padding: 20px 25px;
    background: linear-gradient(135deg, #000 0%, #2a2a2a 100%);
    border-top: 1px solid #333;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.quick-actions {
    display: flex;
    gap: 6px;
    margin-bottom: 18px;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 750px;
}

.quick-action-btn {
    padding: 6px 14px;
    background: rgba(255, 107, 53, 0.1);
    border: 1px solid rgba(255, 107, 53, 0.4);
    border-radius: 20px;
    color: #ff6b35;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.quick-action-btn:hover {
    background: #ff6b35;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(255, 107, 53, 0.3);
}

.chat-input-wrapper {
    display: flex;
    gap: 10px;
    max-width: 750px;
    width: 100%;
}

.chat-input {
    flex: 1;
    padding: 16px 20px;
    border: 2px solid #333;
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.chat-input:focus {
    border-color: #ff6b35;
    box-shadow: 0 0 15px rgba(255, 107, 53, 0.3);
    background: rgba(255, 255, 255, 0.08);
}

.chat-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.chat-send {
    background: linear-gradient(135deg, #ff6b35, #ff8533);
    border: none;
    color: #fff;
    padding: 16px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 55px;
    box-shadow: 0 3px 12px rgba(255, 107, 53, 0.4);
}

.chat-send:hover {
    transform: translateY(-1px) scale(1.03);
    box-shadow: 0 6px 18px rgba(255, 107, 53, 0.5);
}

.chat-send:active {
    transform: translateY(0) scale(0.98);
}

.message-content strong {
    color: #ff6b35;
}

.message-content em {
    color: #4ade80;
}

.chat-messages::-webkit-scrollbar {
    width: 5px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ff6b35;
    border-radius: 2px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #ff8533;
}

/* ======================================
   📋 PROJECTS LIST STYLES
   ====================================== */

.projects-list-section {
    background: #000;
    padding: 60px 20px;
}

.projects-list-container {
    max-width: 900px;
    margin: 0 auto;
}

.projects-list-title {
    text-align: center;
    font-size: 2.2rem;
    color: #ff6b35;
    margin-bottom: 18px;
    font-weight: 900;
}

.projects-list-subtitle {
    text-align: center;
    color: #b0b0b0;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

.project-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    margin-bottom: 18px;
    background: rgba(26, 26, 26, 0.8);
    border-radius: 12px;
    border-left: 4px solid var(--item-color);
    transition: all 0.3s ease;
}

.project-list-item:hover {
    background: rgba(26, 26, 26, 1);
    transform: translateX(8px);
}

.project-info {
    flex: 1;
}

.project-icon {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    margin-right: 18px;
    background-size: cover;
    background-position: center;
}

.project-name {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--item-color);
    margin-bottom: 4px;
}

.project-tagline {
    color: #b0b0b0;
    font-size: 0.85rem;
}

.project-cta {
    background: var(--item-color);
    color: #000;
    border: none;
    padding: 8px 18px;
    border-radius: 18px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.project-cta:hover {
    background: #fff;
    transform: scale(1.03);
}

/* ======================================
   📱 SOCIAL SECTION STYLES
   ====================================== */

.social-section {
    background: #1a1a1a;
    padding: 50px 20px;
    text-align: center;
}

.social-title {
    color: #ff6b35;
    font-size: 1.8rem;
    margin-bottom: 12px;
    font-weight: bold;
}

.social-call-to-action {
    color: #b0b0b0;
    font-size: 0.95rem;
    margin-bottom: 25px;
    font-weight: 400;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 18px;
    flex-wrap: wrap;
}

.social-link {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #fff;
    font-size: 18px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.social-link:hover {
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 8px 18px rgba(0,0,0,0.3);
}

.social-link.instagram {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

.social-link.facebook {
    background: #1877F2;
}

.social-link.tiktok {
    background: #000000;
    color: #ffffff;
}

.social-link.youtube {
    background: #FF0000;
}

/* ======================================
   📞 CONTACT SECTION STYLES - ALTEZZA RIDOTTA
   ====================================== */

.contact-section {
    text-align: center;
    padding: 30px 20px 45px;
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
}

.contact-section h2 {
    color: #6b7280;
    margin-bottom: 12px;
    font-size: 1.6rem;
}

.contact-section p {
    color: #888;
    margin-bottom: 25px;
    max-width: 350px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.95rem;
}

.contact-buttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.contact-btn {
    padding: 10px 22px;
    border-radius: 22px;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s;
    font-size: 13px;
    opacity: 0.8;
}

.contact-btn:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.whatsapp-btn {
    background: rgba(37, 211, 102, 0.8);
    color: white;
    box-shadow: 0 2px 8px rgba(37, 211, 102, 0.2);
}

.email-btn {
    background: rgba(107, 114, 128, 0.8);
    color: white;
    box-shadow: 0 2px 8px rgba(107, 114, 128, 0.2);
}

/* ======================================
   📱 MOBILE RESPONSIVE - MIGLIORATO E OTTIMIZZATO
   ====================================== */

@media (max-width: 768px) {
    .hero {
        padding: 25px 20px 15px;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .profile-image {
        width: 200px;
        height: 200px;
    }

    .main-cta {
        padding: 16px 30px;
        font-size: 16px;
        max-width: 320px;
    }

    .quiz-btn,
    .quiz-cta {
        padding: 14px 30px;
        font-size: 14px;
        max-width: 300px;
    }

    /* Quiz Mobile Fixes */
    .quiz-container {
        padding: 15px 12px;
    }

    .quiz-header {
        padding-top: 50px;
        margin-bottom: 25px;
        height: 55px;
    }

    .quiz-question-card {
        padding: 25px 18px;
        margin-bottom: 18px;
    }

    .quiz-question {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .quiz-options {
        gap: 10px;
        margin-bottom: 20px;
    }

    .quiz-option {
        padding: 14px 18px;
        font-size: 14px;
    }

    .quiz-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .quiz-btn-back,
    .quiz-btn-next {
        width: 100%;
        justify-content: center;
        padding: 12px 22px;
    }

    .quiz-results {
        padding: 25px 18px;
    }

    .quiz-actions {
        gap: 10px;
    }

    .quiz-btn,
    .quiz-cta,
    .quiz-restart-btn {
        width: 100%;
        max-width: 280px;
    }
    
    .chat-messages {
        padding: 18px 12px;
    }
    
    .messages-container {
        max-width: 100%;
    }
    
    .message-content {
        max-width: 82%;
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    
    .chat-input-container {
        padding: 18px 12px;
    }
    
    .chat-input-wrapper {
        max-width: 100%;
    }
    
    .chat-input {
        padding: 14px 18px;
        font-size: 15px;
    }
    
    .chat-send {
        padding: 14px 18px;
        min-width: 50px;
    }
    
    .quick-actions {
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 4px;
        max-width: 100%;
    }
    
    .quick-action-btn {
        flex-shrink: 0;
    }
    
    .chat-header-avatar {
        width: 45px;
        height: 45px;
    }
    
    .chat-header-name {
        font-size: 1rem;
    }
    
    .main-cta, .secondary-btn {
        width: 100%;
        max-width: 320px;
    }
    
    .contact-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
    }

    .chat-benefits {
        flex-direction: column;
        gap: 8px;
    }

    .chat-features {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .project-actions {
        gap: 6px;
    }
}

/* Fix per elementi che si sovrappongono */
@media (max-width: 480px) {
    .hero {
        padding: 20px 15px 10px;
    }
    
    .hero h1 {
        font-size: 1.9rem;
    }
    
    .profile-image {
        width: 180px;
        height: 180px;
    }

    .quiz-container {
        padding: 12px 8px;
    }

    .quiz-question-card {
        padding: 20px 12px;
    }

    .quiz-option {
        padding: 12px 14px;
        font-size: 13px;
    }

    .quiz-progress {
        margin-bottom: 25px;
    }

    .quiz-results {
        padding: 20px 12px;
    }
    
    .chat-header {
        padding: 15px;
        height: 65px;
    }
    
    .contact-section {
        padding: 25px 15px 35px;
    }
}

/* ======================================
   🚀 PERFORMANCE OPTIMIZATIONS
   ====================================== */

/* GPU acceleration per elementi che cambiano spesso */
.project-card,
.chat-avatar,
.message {
    will-change: transform;
    transform: translateZ(0);
}

/* Ottimizzazione loading immagini */
.profile-content,
.chat-avatar-content,
.chat-header-avatar,
.project-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Reduce motion per accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .project-card {
        border-width: 3px;
    }
    
    .project-btn-primary,
    .project-btn-chat {
        border: 2px solid currentColor;
    }
}