:root {
    --primary-start: #5DBCEB;
    --primary-end: #3669BB;
    --text-dark: #ffffff;
    --text-light: rgba(255, 255, 255, 0.8);
    --white: #ffffff;
    --glass-border: rgba(255, 255, 255, 0.2);
}

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

body {
    font-family: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -2;
    background-image: url('assets/images/fallback_image.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.desktop-video {
    display: block;
}

.mobile-video {
    display: none;
}

/* Gradient Overlay */
.gradient-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(to top,
            #111314 20%,
            rgba(17, 19, 20, 0.3) 100%);
}

.container {
    background: rgba(30, 30, 30, 0.25);
    backdrop-filter: blur(48px);
    -webkit-backdrop-filter: blur(48px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
    border-radius: 24px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.logo {
    max-width: 230px;
    margin: 0 auto 20px;
}

.title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    margin-bottom: 40px;
    font-weight: 400;
}

.wallet-input {
    width: 100%;
    padding: 18px 24px;
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: 'Menlo', 'Monaco', monospace;
    margin-bottom: 20px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    color: var(--white);
}

.wallet-input::placeholder {
    color: var(--text-light);
    font-family: 'Instrument Sans', sans-serif;
}

.wallet-input:focus {
    outline: none;
    border-color: var(--primary-start);
    background-color: rgba(0, 0, 0, 0.3);
}

.check-btn {
    width: 100%;
    padding: 18px 24px;
    background-color: #3669BB;
    color: white;
    border: none;
    border-radius: 1000px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.check-btn:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
    opacity: 0.9;
}

.check-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
    display: none;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.results,
.not-eligible {
    margin-top: 40px;
    display: none;
    text-align: left;
}

.results.show,
.not-eligible.show {
    display: block;
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.total-allocation {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: white;
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.total-number {
    font-size: 3.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.token-icon {
    width: 40px;
    height: 40px;
}

.campaigns-list {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    padding: 14px 20px 20px 20px;
    border: 1px solid var(--glass-border);
}

.campaign-item {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 15px;
    padding: 16px 8px;
    margin-top: 6px;
    border-bottom: 1px solid var(--glass-border);
}

.campaign-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.campaign-name {
    font-weight: 600;
    color: var(--text-dark);
}

.black-text {
    color: #000000;
    text-shadow: 0px 0px 8px rgba(255, 255, 255, 0.5), 0px 0px 2px rgba(255, 255, 255, 0.7);
    -webkit-text-stroke: 0.5px rgba(255, 255, 255, 0.3);
}

.gold-text {
    color: #FFD700;
    text-shadow:
        0 0 5px rgba(255, 215, 0, 0.8),
        0 0 10px rgba(255, 215, 0, 0.6),
        0 0 15px rgba(255, 215, 0, 0.4),
        0 0 20px rgba(255, 215, 0, 0.2);
    background: linear-gradient(135deg, #FFD700, #DAA520, #FFD700);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.silver-text {
    color: #C0C0C0;
    text-shadow:
        0 0 5px rgba(192, 192, 192, 0.8),
        0 0 10px rgba(192, 192, 192, 0.6);
    background: linear-gradient(135deg, #E0E0E0, #C0C0C0, #A8A8A8, #C0C0C0, #E0E0E0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.campaign-tokens {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 8px;
}

.campaign-tokens .token-icon {
    width: 20px;
    height: 20px;
}

.not-eligible {
    text-align: center;
    padding: 40px 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.not-eligible-icon {
    margin-bottom: 15px;
}

.not-eligible-icon img {
    width: 6rem;
}

.not-eligible h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.not-eligible p {
    color: var(--text-light);
    line-height: 1.6;
}

.not-eligible a {
    color: var(--primary-start);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.3s ease;
    border: 1px solid var(--primary-start);
    padding: 10px 20px;
    border-radius: 12px;
    display: inline-block;
    margin-top: 15px;
}

.not-eligible a:hover {
    opacity: 0.8;
    background-color: rgba(93, 188, 235, 0.1);
}

.error-message {
    color: #ffc4c4;
    margin-top: 15px;
    font-weight: 600;
    display: none;
}

.powered-by {
    margin-top: 30px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
}

.powered-by span {
    font-size: 0.8rem;
    color: var(--text-light);
    opacity: 0.7;
}

.powered-by img {
    height: 20px;
    opacity: 0.7;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.powered-by a:hover img {
    transform: scale(1.08);
}

/* Badge Vesting - DEVE STARE QUI FUORI DAI MEDIA QUERY */
.vesting-badge {
    display: inline-block;
    background: linear-gradient(135deg, rgba(93, 188, 235, 0.3), rgba(54, 105, 187, 0.4));
    border: 1px solid rgba(93, 188, 235, 0.5);
    color: #5DBCEB;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    /*cursor: help;*/
    position: relative;
    transition: all 0.3s ease;
    margin-left: 8px;
    vertical-align: middle;
}

.vesting-badge:hover {
    background: linear-gradient(135deg, rgba(93, 188, 235, 0.4), rgba(54, 105, 187, 0.5));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 188, 235, 0.3);
}

/* Tooltip */
.vesting-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    border: 1px solid rgba(93, 188, 235, 0.3);
    z-index: 1000;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.vesting-badge::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.95);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.vesting-badge:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-12px);
}

.vesting-badge:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

@media (max-width: 768px) {
    .desktop-video {
        display: none;
    }

    .mobile-video {
        display: block;
    }

    .container {
        padding: 30px 20px;
        margin: 15px;
    }

    .title {
        font-size: 1.6rem;
    }

    .total-number {
        font-size: 2.5rem;
    }

    .powered-by {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body {
        align-items: flex-start;
        padding: 40px 0;
    }

    .logo {
        max-width: 180px;
    }

    .total-number {
        font-size: 2.2rem;
        gap: 10px;
    }

    .token-icon {
        width: 30px;
        height: 30px;
    }

    .not-eligible-icon img {
        width: 5rem;
    }

    .check-btn {
        padding: 16px;
        font-size: 1rem;
    }

    /* Responsive per badge vesting su mobile */
    .vesting-badge {
        font-size: 0.65rem;
        padding: 3px 10px;
        margin-left: 6px;
    }

    .vesting-badge::after {
        font-size: 0.7rem;
        white-space: normal;
        width: 200px;
        text-align: center;
    }
}
