/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.hero {
    display: flex;
    flex-direction: column;
    gap: clamp(4rem, 8vh, 6rem);
    padding: clamp(5rem, 12vh, 8rem) 1rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    min-height: 100vh;
}

.hero-content {
    z-index: 2;
    position: relative;
    backdrop-filter: blur(8px);
    padding: clamp(3rem, 6vh, 4rem) clamp(2rem, 4vw, 3rem);
    border-radius: 15px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 0, 0, 0.2);
    box-shadow: 0 0 30px rgba(255, 0, 0, 0.15),
                0 10px 20px -10px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    transform: translateY(0);
    transition: transform 0.3s ease;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.glitch-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--text);
    text-shadow: 0 0 10px var(--primary);
    position: relative;
    animation: glitch 2s infinite;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.cyber-text {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 5px var(--accent);
    max-width: 800px;
    margin: 0 auto;
}

.sale-section {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
}

.sale-section {
    width: 90%;
    max-width: 800px;
    margin: 0 auto;
    transform: translateY(0);
    animation: float 6s ease-in-out infinite 1s; /* 1s delay for staggered effect */
}

.sale-info {
    width: 100%;
    backdrop-filter: blur(15px);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: clamp(3rem, 6vh, 5rem) clamp(2rem, 4vw, 3rem);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #3b82f6;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(59, 130, 246, 0.4),
                0 20px 40px -10px rgba(0, 0, 0, 0.3),
                inset 0 0 30px rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
    animation: pulse-glow-blue 3s ease-in-out infinite;
}

@keyframes pulse-glow-blue {
    0%, 100% {
        box-shadow: 0 0 50px rgba(59, 130, 246, 0.4),
                    0 20px 40px -10px rgba(0, 0, 0, 0.3),
                    inset 0 0 30px rgba(59, 130, 246, 0.1);
    }
    50% {
        box-shadow: 0 0 70px rgba(59, 130, 246, 0.6),
                    0 20px 40px -10px rgba(0, 0, 0, 0.3),
                    inset 0 0 50px rgba(59, 130, 246, 0.2);
    }
}

.sale-info::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(59, 130, 246, 0.05)
    );
    pointer-events: none;
}

@media (max-width: 768px) {
    .hero {
        gap: 4rem;
        padding: 8rem 1rem 3rem; /* Increased top padding */
        min-height: auto; /* Remove min-height constraint on mobile */
    }

    .hero-content {
        padding: 2.5rem 1.5rem;
        width: 95%;
        margin-top: 2rem; /* Extra spacing at the top */
    }

    .sale-info {
        padding: 2rem 1.5rem;
        gap: 1rem;
        margin-top: 1rem; /* Extra spacing at the top */
    }

    /* Adjust animation for mobile */
    .hero-content,
    .sale-section {
        animation: float 8s ease-in-out infinite;
        animation-delay: 0s, 1s;
    }

    .sale-status {
        font-size: clamp(1.2rem, 4vw, 1.4rem);
    }

    .total-raised {
        font-size: clamp(1rem, 3.5vw, 1.2rem);
    }

    .contribution-item {
        padding: 0.4rem 0.8rem;
    }

    .wallet {
        font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    }

    .amount {
        font-size: clamp(0.7rem, 2.5vw, 0.8rem);
    }
}

.sale-info::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(59, 130, 246, 0.15),
        transparent
    );
    transform: rotate(45deg);
    animation: shine 3s linear infinite;
}

.sale-status {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #0a0a0a;
    text-shadow: 0 0 15px rgba(59, 130, 246, 0.5), 0 0 30px rgba(59, 130, 246, 0.3);
    letter-spacing: 3px;
    position: relative;
    margin-bottom: 1rem;
}

.sale-status::before,
.sale-status::after {
    content: 'STUDIO WAS ACQUIRED BY QXMP';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.sale-status::before {
    animation: glitch-1 2s infinite;
    color: #3b82f6;
    z-index: -1;
}

.sale-status::after {
    animation: glitch-2 3s infinite;
    color: #60a5fa;
    z-index: -2;
}

.total-raised {
    font-family: 'Orbitron', sans-serif;
    font-size: 1.8rem;
    color: #0a0a0a;
    text-shadow: 0 0 12px rgba(59, 130, 246, 0.3), 0 0 24px rgba(59, 130, 246, 0.2);
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-align: center;
}

/* Add styling for price display */
.total-raised::before {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

.total-raised::after {
    content: '';
    display: block;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, transparent);
    margin-top: 0.5rem;
    opacity: 0.5;
}

.price-value {
    font-weight: 700;
    font-size: 1.6rem;
    padding: 0.2rem 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    display: inline-block;
    margin: 0 0.2rem;
    text-shadow: 0 0 10px #3b82f6;
}

.launch-price {
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    background: rgba(0, 255, 0, 0.1);
    border: 1px solid rgba(0, 255, 0, 0.3);
    position: relative;
}

.launch-price::after {
    content: '↑66%';
    position: absolute;
    top: -1.2rem;
    right: -0.5rem;
    font-size: 0.8rem;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    font-weight: 700;
    animation: pulse-bright 2s infinite;
}

@keyframes glitch-1 {
    0%, 100% { transform: none; opacity: 1; }
    7% { transform: skew(-0.5deg, -0.9deg); opacity: 0.75; }
    10% { transform: none; opacity: 1; }
    27% { transform: none; opacity: 1; }
    30% { transform: skew(0.8deg, -0.1deg); opacity: 0.75; }
    35% { transform: none; opacity: 1; }
}

@keyframes glitch-2 {
    0%, 100% { transform: none; opacity: 0.25; }
    7% { transform: translate(-2px, 3px); opacity: 0.5; }
    10% { transform: none; opacity: 0.25; }
    27% { transform: none; opacity: 0.25; }
    30% { transform: translate(2px, -3px); opacity: 0.5; }
    35% { transform: none; opacity: 0.25; }
}

.contributions-container {
    width: 100%;
    height: 160px; /* Fixed height for 4 items */
    position: relative;
    overflow: hidden;
}

.contribution-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(59, 130, 246, 0.05);
    margin: 0;
    border-radius: 3px;
    height: 40px; /* Fixed height */
    position: absolute;
    width: calc(100% - 2rem); /* Account for padding */
    left: 0;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none; /* Prevent hover during animation */
}

.contribution-item.pos-0 { transform: translateY(0); opacity: 1; top: 0; z-index: 4; pointer-events: auto; }
.contribution-item.pos-1 { transform: translateY(0); opacity: 1; top: 40px; z-index: 3; pointer-events: auto; }
.contribution-item.pos-2 { transform: translateY(0); opacity: 1; top: 80px; z-index: 2; pointer-events: auto; }
.contribution-item.pos-3 { transform: translateY(0); opacity: 1; top: 120px; z-index: 1; pointer-events: auto; }

.contribution-item.removing {
    transform: translateY(-100%);
    opacity: 0;
    z-index: 0;
}

.contribution-item:not(.removing) {
    will-change: transform, opacity;
}

.contribution-item:hover {
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2);
}

.wallet {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    color: #0a0a0a;
    letter-spacing: 1px;
    font-size: 0.9rem;
    opacity: 0.9;
}

.amount {
    font-family: 'Orbitron', sans-serif;
    color: #00ff00;
    text-shadow: 0 0 5px #00ff00;
    font-size: 0.9rem;
    font-weight: 600;
}

@keyframes pulse-bright {
    0% {
        text-shadow: 0 0 10px #3b82f6;
    }
    50% {
        text-shadow: 0 0 20px #3b82f6, 0 0 30px #3b82f6, 0 0 40px #3b82f6;
        color: #60a5fa;
    }
    100% {
        text-shadow: 0 0 10px #3b82f6;
    }
}

@keyframes shine {
    0% {
        transform: rotate(45deg) translateY(-100%);
    }
    100% {
        transform: rotate(45deg) translateY(100%);
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .sale-status {
        font-size: 1.4rem;
    }

    .total-raised {
        font-size: 1.2rem;
        flex-direction: column;
        gap: 0.8rem;
    }

    .price-value {
        font-size: 1.3rem;
        padding: 0.15rem 0.4rem;
    }

    .launch-price::after {
        top: -1rem;
        right: -0.3rem;
        font-size: 0.7rem;
    }

    .contribution-item {
        padding: 0.4rem 0.8rem;
        margin: 0.4rem 0;
    }

    .wallet {
        font-size: 0.8rem;
    }

    .amount {
        font-size: 0.8rem;
    }

    .sale-info {
        padding: 1.5rem;
        gap: 0.8rem;
    }
}

/* Add responsive styles for countdown */
@media (max-width: 768px) {
    .countdown-inline {
        font-size: 2rem;
    }
    
    .sale-label {
        font-size: 0.8rem;
    }
}

.public-sale-cta {
    margin-top: 0.5rem;
    animation: pulse 2s infinite;
}

.cta-button {
    display: inline-block;
    padding: 1.5rem 3rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.2rem;
    text-decoration: none;
    text-transform: uppercase;
    color: #0a0a0a;
    background: transparent;
    border: 2px solid #3b82f6;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 3;
    letter-spacing: 2px;
}

.cta-button:hover {
    color: #ffffff;
    background: #3b82f6;
    box-shadow: 0 0 20px #3b82f6;
}

.cta-button span {
    position: absolute;
    background: #3b82f6;
}

.cta-button span:nth-child(1) {
    width: 100%;
    height: 2px;
    top: 0;
    left: -100%;
    animation: btn-line1 2s linear infinite;
}

.cta-button span:nth-child(2) {
    width: 2px;
    height: 100%;
    top: -100%;
    right: 0;
    animation: btn-line2 2s linear infinite;
}

@keyframes btn-line1 {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

@keyframes btn-line2 {
    0% { top: -100%; }
    50%, 100% { top: 100%; }
}

@keyframes glitch {
    0% {
        text-shadow: 0.05em 0 0 #3b82f6, -0.05em -0.025em 0 #60a5fa;
    }
    14% {
        text-shadow: 0.05em 0 0 #3b82f6, -0.05em -0.025em 0 #60a5fa;
    }
    15% {
        text-shadow: -0.05em -0.025em 0 #3b82f6, 0.025em 0.025em 0 #60a5fa;
    }
    49% {
        text-shadow: -0.05em -0.025em 0 #3b82f6, 0.025em 0.025em 0 #60a5fa;
    }
    50% {
        text-shadow: 0.025em 0.05em 0 #3b82f6, 0.05em 0 0 #60a5fa;
    }
    99% {
        text-shadow: 0.025em 0.05em 0 #3b82f6, 0.05em 0 0 #60a5fa;
    }
    100% {
        text-shadow: -0.025em 0 0 #3b82f6, -0.025em -0.025em 0 #60a5fa;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 20px #3b82f6;
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 30px #3b82f6;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px #3b82f6;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .glitch-title {
        font-size: 2.5rem;
    }

    .cyber-text {
        font-size: 1.2rem;
    }

    .hero-content {
        padding: 1rem;
        margin: 0 1rem;
    }

    .cta-button {
        padding: 1.2rem 2.5rem;
        font-size: 1rem;
    }
}
