* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 50%, #0a0e27 100%);
    background-attachment: fixed;
    color: #fff;
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

/* Animated background particles (da Opzione A) */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(168, 85, 247, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 80%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    animation: float-bg 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes float-bg {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding-bottom: 40px;
    position: relative;
    z-index: 1;
}

/* ============================================
    HEADER - H1 STILE ORIGINALE
    ============================================ */
.header {
    text-align: center;
    margin-bottom: 35px;
    animation: fadeInDown 0.6s ease;
}

.header h1 {
    color: #ffffff;
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    padding: 2rem 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    font-size: 2rem;
    margin: 0 auto 1rem auto;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid #ffa600;
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
    word-wrap: break-word;
}

.subtitle {
    text-align: center;
    color: #ccc;
    font-size: 1.1rem;
    margin-bottom: 0;
    font-weight: 300;
}

/* ============================================
    HERO CARD - REGISTRATI IN PEDANA (da Opzione B)
    ============================================ */
.hero-card {
    position: relative;
    background: linear-gradient(135deg,
        rgba(0, 255, 136, 0.15) 0%,
        rgba(0, 204, 102, 0.1) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 2px solid rgba(0, 255, 136, 0.3);
    border-radius: 24px;
    padding: 32px 24px;
    margin-bottom: 24px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow:
        0 10px 40px rgba(0, 255, 136, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.8s ease 0.2s backwards;
}

.hero-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        rgba(0, 255, 136, 0.1),
        rgba(0, 204, 102, 0.05));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hero-card:hover::before {
    opacity: 1;
}

.hero-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    border-radius: 24px;
    z-index: -1;
    opacity: 0;
    filter: blur(20px);
    transition: opacity 0.4s ease;
}

.hero-card:hover::after {
    opacity: 0.5;
}

.hero-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(0, 255, 136, 0.6);
    box-shadow:
        0 20px 60px rgba(0, 255, 136, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.hero-card:active {
    transform: translateY(-4px) scale(1.01);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 20px;
}

.hero-icon {
    flex-shrink: 0;
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    box-shadow:
        0 10px 30px rgba(0, 255, 136, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

.hero-text h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 255, 136, 0.3);
}

.hero-text p {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.5;
    font-weight: 500;
}

.hero-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #00ff88, #00cc66);
    color: #000;
    font-size: 0.7rem;
    font-weight: 900;
    padding: 6px 12px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 255, 136, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ============================================
    SECTION TITLES (Opzionali)
    ============================================ */
.section-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    margin-top: 8px;
    padding-left: 4px;
    animation: fadeInUp 0.6s ease backwards;
}

.section-title:nth-of-type(1) { animation-delay: 0.3s; }
.section-title:nth-of-type(2) { animation-delay: 0.7s; }
.section-title:nth-of-type(3) { animation-delay: 1.1s; }

/* ============================================
    GRID 3 COLONNE - CARD PICCOLE
    ============================================ */
.card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.grid-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    animation: fadeInUp 0.6s ease backwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Stagger animation Gruppo 1 */
.card-grid:nth-of-type(1) .grid-card:nth-child(1) { animation-delay: 0.3s; }
.card-grid:nth-of-type(1) .grid-card:nth-child(2) { animation-delay: 0.4s; }
.card-grid:nth-of-type(1) .grid-card:nth-child(3) { animation-delay: 0.5s; }

/* Stagger animation Gruppo 2 */
.card-grid:nth-of-type(2) .grid-card:nth-child(1) { animation-delay: 0.7s; }
.card-grid:nth-of-type(2) .grid-card:nth-child(2) { animation-delay: 0.8s; }
.card-grid:nth-of-type(2) .grid-card:nth-child(3) { animation-delay: 0.9s; }

/* Stagger animation Gruppo 3 - Analisi IA */
.card-grid:nth-of-type(3) .grid-card:nth-child(1) { animation-delay: 1.1s; }

.grid-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
        var(--card-color-start),
        var(--card-color-end));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-card:hover::before {
    opacity: 0.15;
}

.grid-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg,
        var(--card-color-start),
        var(--card-color-end));
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    filter: blur(15px);
    transition: opacity 0.3s ease;
}

.grid-card:hover::after {
    opacity: 0.5;
}

.grid-card:hover {
    transform: translateY(-6px);
    border-color: var(--card-border);
    box-shadow:
        0 12px 40px var(--card-shadow),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.grid-card:active {
    transform: translateY(-3px);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg,
        var(--card-color-start),
        var(--card-color-end));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 12px;
    box-shadow:
        0 6px 20px var(--card-shadow),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
}

.grid-card:hover .card-icon {
    transform: scale(1.1) rotate(5deg);
}

.card-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
    color: #fff;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

.card-description {
    font-size: 0.75rem;
    color: #94a3b8;
    line-height: 1.4;
    position: relative;
    z-index: 1;
}

/* Badge per card */
.grid-card .badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg,
        var(--card-color-start),
        var(--card-color-end));
    color: #fff;
    font-size: 0.6rem;
    font-weight: 900;
    padding: 3px 7px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px var(--card-shadow);
    z-index: 2;
}

/* ============================================
    COLOR VARIANTS
    ============================================ */

/* BLU - Sessione Singola */
.grid-card.blue {
    --card-color-start: rgba(59, 130, 246, 0.4);
    --card-color-end: rgba(37, 99, 235, 0.3);
    --card-border: rgba(59, 130, 246, 0.4);
    --card-shadow: rgba(59, 130, 246, 0.3);
}

/* ROSSO - Serie Manuale */
.grid-card.red {
    --card-color-start: rgba(239, 68, 68, 0.4);
    --card-color-end: rgba(220, 38, 38, 0.3);
    --card-border: rgba(239, 68, 68, 0.4);
    --card-shadow: rgba(239, 68, 68, 0.3);
}

/* VIOLA - Sessioni Multiple */
.grid-card.purple {
    --card-color-start: rgba(168, 85, 247, 0.4);
    --card-color-end: rgba(147, 51, 234, 0.3);
    --card-border: rgba(168, 85, 247, 0.4);
    --card-shadow: rgba(168, 85, 247, 0.3);
}

/* AMBRA - Modifica Sessioni */
.grid-card.amber {
    --card-color-start: rgba(245, 158, 11, 0.4);
    --card-color-end: rgba(217, 119, 6, 0.3);
    --card-border: rgba(245, 158, 11, 0.4);
    --card-shadow: rgba(245, 158, 11, 0.3);
}

/* CYAN - Importa Serie */
.grid-card.cyan {
    --card-color-start: rgba(6, 182, 212, 0.4);
    --card-color-end: rgba(8, 145, 178, 0.3);
    --card-border: rgba(6, 182, 212, 0.4);
    --card-shadow: rgba(6, 182, 212, 0.3);
}

/* LIME - ON-AIR */
.grid-card.lime {
    --card-color-start: rgba(132, 204, 22, 0.4);
    --card-color-end: rgba(101, 163, 13, 0.3);
    --card-border: rgba(132, 204, 22, 0.4);
    --card-shadow: rgba(132, 204, 22, 0.3);
}

/* ============================================
    ARANCIONE - ANALISI IA (FULL-WIDTH)
    ============================================ */
.grid-card.orange-gradient {
    background: linear-gradient(135deg, #ffa600, #ffcc00);
    position: relative;
    overflow: hidden;
    --card-color-start: #ffa600;
    --card-color-end: #ffcc00;
    --card-border: rgba(255, 166, 0, 0.6);
    --card-shadow: rgba(255, 166, 0, 0.4);
}

.grid-card.orange-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(255,255,255,0.2), transparent 70%);
    opacity: 1;
    pointer-events: none;
}

.grid-card.orange-gradient:hover::before {
    opacity: 1;
}

.grid-card.orange-gradient .card-icon {
    background: rgba(255, 255, 255, 0.2);
    font-size: 3rem;
    width: 60px;
    height: 60px;
    animation: ai-pulse 2s infinite;
}

.grid-card.orange-gradient .card-title,
.grid-card.orange-gradient .card-description {
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.grid-card.full-width {
    grid-column: 1 / -1;
    min-height: 120px;
    padding: 28px 20px;
}

.ai-badge {
    background: white !important;
    color: #ffa600 !important;
    font-weight: 900 !important;
    animation: badge-bounce 2s infinite;
    box-shadow: 0 2px 8px rgba(255, 166, 0, 0.4) !important;
}

@keyframes ai-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

@keyframes badge-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* ============================================
    ANIMATIONS
    ============================================ */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
    RESPONSIVE
    ============================================ */
@media (max-width: 600px) {
    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .grid-card {
        padding: 18px 12px;
    }

    .card-icon {
        width: 42px;
        height: 42px;
        font-size: 22px;
        margin-bottom: 10px;
    }

    .card-title {
        font-size: 0.85rem;
    }

    .card-description {
        font-size: 0.7rem;
    }

    .hero-card {
        padding: 28px 20px;
    }

    .hero-icon {
        width: 60px;
        height: 60px;
        font-size: 30px;
    }

    .hero-text h2 {
        font-size: 1.3rem;
    }

    .hero-text p {
        font-size: 0.85rem;
    }

    .grid-card.orange-gradient .card-icon {
        font-size: 2.5rem;
        width: 52px;
        height: 52px;
    }

    .grid-card.full-width {
        min-height: 110px;
        padding: 24px 18px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .header h1 {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .card-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .grid-card {
        padding: 16px 10px;
        border-radius: 16px;
    }

    .card-icon {
        width: 38px;
        height: 38px;
        font-size: 20px;
        margin-bottom: 8px;
        border-radius: 12px;
    }

    .card-title {
        font-size: 0.8rem;
    }

    .card-description {
        font-size: 0.65rem;
    }

    .section-title {
        font-size: 0.75rem;
        margin-bottom: 10px;
    }

    .hero-card {
        padding: 24px 18px;
    }

    .hero-icon {
        width: 55px;
        height: 55px;
        font-size: 28px;
    }

    .hero-text h2 {
        font-size: 1.2rem;
    }

    .hero-text p {
        font-size: 0.8rem;
    }

    .grid-card.orange-gradient .card-icon {
        font-size: 2.2rem;
        width: 48px;
        height: 48px;
    }

    .grid-card.full-width {
        min-height: 100px;
        padding: 22px 16px;
    }
}

/* ============================================
    POPUP
    ============================================ */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none;
    z-index: 9998;
}

.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    padding: 40px 30px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    max-width: 90%;
    width: 400px;
    text-align: center;
    display: none;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.popup-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.popup p {
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 600;
}

.popup button {
    background: linear-gradient(135deg, #ffa600, #ff6b00);
    color: #000;
    border: none;
    padding: 14px 40px;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(255, 166, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.popup button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 166, 0, 0.6);
}

.popup-tips {
    width: 450px;
    max-width: 95%;
}

.tip-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.tip-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffa600;
    margin-bottom: 15px;
}

.tip-content {
    text-align: left;
    color: #cbd5e1;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.email-highlight {
    color: #ffa600;
    font-weight: 700;
}

.popup-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, #ffa600, #ff6b00);
    color: #000;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1);
}

.popup-coming-soon {
    width: 380px;
}

.coming-soon-icon {
    font-size: 70px;
    margin-bottom: 20px;
}