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

:root {
    --primary-gradient-start: #0f0c29;
    --primary-gradient-mid: #302b63;
    --primary-gradient-end: #24243e;
    --accent: #ff6b6b;
    --accent-light: #ff9a9a;
    --white: #ffffff;
    --text-light: #f0f0f0;
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 60px rgba(255, 107, 107, 0.4);
}

html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    color: #333333;
    overflow-x: hidden;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.page-wrapper {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.hero-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.hero-link {
    display: block;
    width: 100%;
    max-width: 900px;
    text-decoration: none;
    cursor: pointer;
}

.hero-content {
    position: relative;
    width: 100%;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transform: perspective(1200px) rotateX(0deg) rotateY(0deg);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.hero-link:hover .hero-content {
    transform: perspective(1200px) rotateX(5deg) rotateY(5deg) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 107, 107, 0.3);
}

.hero-image-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-image {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.6s cubic-bezier(0.25, 0.45, 0.45, 0.95);
    filter: brightness(1) saturate(1.1) contrast(0.95);
    opacity: 0.85;
    animation: floatGentle 6s ease-in-out infinite;
}

@keyframes floatGentle {
    0%, 100% { transform: translateY(0) rotateX(0deg); }
    25% { transform: translateY(-8px) rotateX(1deg); }
    50% { transform: translateY(-4px) rotateX(0deg); }
    75% { transform: translateY(-12px) rotateX(-1deg); }
}

.hero-link:hover .hero-image {
    filter: brightness(1.1) saturate(1.2) contrast(1.05);
    transform: scale(1.08);
    opacity: 1;
    animation-play-state: paused;
}

.hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.hero-link:hover .hero-image::after {
    opacity: 1;
}

.coming-soon {
    position: relative;
    width: 100%;
    text-align: center;
    margin-top: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 8px;
    text-transform: uppercase;
    color: rgba(0, 0, 0, 0.3);
    text-shadow: 0 0 15px rgba(0, 0, 0, 0.3), 0 0 30px rgba(255, 107, 107, 0.4);
    pointer-events: none;
    animation: blink 2.5s step-end infinite;
}

@keyframes blink {
    0%, 49% { opacity: 0.15; }
    50%, 100% { opacity: 0.8; }
}

.magnetic-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 107, 107, 0.15) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hero-link:hover .magnetic-overlay {
    opacity: 1;
}

.glitch-container {
    position: absolute;
    bottom: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 1rem;
    z-index: 10;
}

.glitch-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    animation: pulse 2s infinite ease-in-out;
}

.glitch-dot:nth-child(1) { animation-delay: 0s; }
.glitch-dot:nth-child(2) { animation-delay: 0.3s; }
.glitch-dot:nth-child(3) { animation-delay: 0.6s; }

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

.footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2rem 1rem;
}

.sponsor-label {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #666;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.sponsor-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.sponsor-link {
    display: block;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.25, 0.45, 0.45, 0.95);
    position: relative;
}

.sponsor-link:hover {
    transform: scale(1.1);
}

.sponsor-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 107, 107, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.sponsor-link:hover::before {
    width: 280px;
    height: 280px;
}

.sponsor-logo {
    transition: filter 0.4s ease;
    border-radius: 12px;
    max-height: 80px;
    width: auto;
}

.sponsor-link:hover .sponsor-logo {
    filter: brightness(1.1);
}

.giornale-affari {
    height: 80px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

.bernava {
    height: 80px;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

.visit-counter {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: 'Courier New', Courier, monospace;
}

.counter-label {
    font-size: 0.8rem;
    color: #888;
    letter-spacing: 2px;
    text-transform: lowercase;
}

.counter-number {
    font-size: 1.2rem;
    font-weight: 700;
    color: #ff6b6b;
    font-family: 'Courier New', Courier, monospace;
}


@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.02); }
}

/* Responsive design */

/* Animated multicolored border */
.border-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    pointer-events: none;
    box-shadow: 
        inset 0 -2px 0 0 rgba(255, 0, 0, 0.35),
        inset 0 2px 0 0 rgba(255, 217, 0, 0.35),
        inset -2px 0 0 0 rgba(0, 255, 0, 0.35),
        inset 2px 0 0 0 rgba(0, 255, 255, 0.35);
    animation: borderFlow 6s linear infinite;
}

@keyframes borderFlow {
    0% {
        box-shadow: 
            inset 0 -2px 0 0 rgba(255, 0, 0, 0.35),
            inset 0 2px 0 0 rgba(255, 217, 0, 0.35),
            inset -2px 0 0 0 rgba(0, 255, 0, 0.35),
            inset 2px 0 0 0 rgba(0, 255, 255, 0.35);
    }
    25% {
        box-shadow: 
            inset 0 -2px 0 0 rgba(255, 217, 0, 0.35),
            inset 0 2px 0 0 rgba(0, 255, 0, 0.35),
            inset -2px 0 0 0 rgba(0, 255, 255, 0.35),
            inset 2px 0 0 0 rgba(255, 0, 255, 0.35);
    }
    50% {
        box-shadow: 
            inset 0 -2px 0 0 rgba(0, 255, 0, 0.35),
            inset 0 2px 0 0 rgba(0, 255, 255, 0.35),
            inset -2px 0 0 0 rgba(255, 0, 255, 0.35),
            inset 2px 0 0 0 rgba(255, 0, 0, 0.35);
    }
    75% {
        box-shadow: 
            inset 0 -2px 0 0 rgba(0, 255, 255, 0.35),
            inset 0 2px 0 0 rgba(255, 0, 255, 0.35),
            inset -2px 0 0 0 rgba(255, 0, 0, 0.35),
            inset 2px 0 0 0 rgba(255, 217, 0, 0.35);
    }
    100% {
        box-shadow: 
            inset 0 -2px 0 0 rgba(255, 0, 0, 0.35),
            inset 0 2px 0 0 rgba(255, 217, 0, 0.35),
            inset -2px 0 0 0 rgba(0, 255, 0, 0.35),
            inset 2px 0 0 0 rgba(0, 255, 255, 0.35);
    }
}
@media (max-width: 1024px) {
    .hero-link {
        max-width: 700px;
    }

    :root {
        --shadow-heavy: 0 20px 40px -12px rgba(0, 0, 0, 0.4);
    }

    .hero-link:hover .hero-content {
        transform: perspective(1200px) rotateX(3deg) rotateY(3deg) scale(1.01);
    }

    .sponsor-logo {
        height: 70px;
    }
}

@media (max-width: 768px) {
    .hero-link {
        max-width: 100%;
    }

    .hero-content {
        border-radius: 16px;
    }

    .hero-link:hover .hero-content {
        transform: scale(1.01);
    }

    .glitch-container {
        bottom: 0.5rem;
        gap: 0.6rem;
    }

    .glitch-dot {
        width: 8px;
        height: 8px;
    }

    .footer {
        padding: 1.5rem 0.5rem;
    }

    .sponsor-logo {
        height: 70px;
    }

    .sponsor-link:hover {
        transform: scale(1.1);
    }

    .sponsor-link:hover::before {
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 480px) {
    .hero-container {
        padding: 0.5rem;
    }

    .hero-link {
        max-width: 100%;
    }

    .hero-content {
        border-radius: 14px;
    }

    .hero-link:hover .hero-content {
        transform: scale(1);
    }

    .hero-link:hover .hero-image {
        transform: none;
        filter: none;
    }

    .glitch-container {
        display: none;
    }

    .coming-soon {
        font-size: 1.2rem;
        letter-spacing: 4px;
        margin-top: 1rem;
    }

    .footer {
        padding: 1.2rem 0.3rem;
    }

    .sponsor-logo {
        height: 55px;
    }

    .sponsor-link:hover {
        transform: scale(1.08);
    }

    .sponsor-link:hover::before {
        width: 180px;
        height: 180px;
    }

    .counter-label {
        font-size: 0.7rem;
    }

    .counter-number {
        font-size: 1rem;
    }
}

@media (max-width: 375px) {
    .sponsor-logo {
        height: 50px;
    }
}
