/* Base styles */
body {
    font-family: 'Inter', sans-serif;
    color: #fff;
    background-color: rgb(0 0 0);
    background-image: 
        linear-gradient(rgba(50, 50, 50, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(50, 50, 50, 0.3) 1px, transparent 1px),
        radial-gradient(circle at 25% 25%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(252, 213, 53, 0.05) 0%, transparent 50%);
    background-size: 20px 20px, 20px 20px, 100% 100%, 100% 100%;
    background-position: center center;
    overflow-x: hidden; /* Prevent horizontal scrollbar */
    margin: 0;
    padding: 0;
}

/* Initially hide main content, show full-screen animation */
body.initial-state {
    overflow: hidden;
}

body.initial-state .hide-content {
    opacity: 0;
    transform: translateY(20px);
    visibility: hidden;
}

/* Initially hide all content, only show animation */
.initial-hidden {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
}

/* Animation container - modify to normal flow layout element */
.animation-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    transition: opacity 0.8s ease-out;
    position: relative;
    z-index: 10;
}

/* Initial state - fixed in viewport center */
body.initial-state .animation-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Return to normal document flow after animation */
body:not(.initial-state) .animation-container {
    position: relative;
    margin-top: 80px;
    margin-bottom: 40px;
}

/* Transition effect for showing content */
.hide-content {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hide-content.show-content {
    opacity: 1;
    transform: translateY(0);
}

/* SVG Logo styles */
.logo-svg {
    width: 100%;
    height: auto;
}

/* Initial and final styles for model title text */
.model-title-word {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
    display: inline-block;
    color: transparent;
}

.model-title-word.final {
    opacity: 1;
    transform: translateY(0);
    color: #f0f0f0;
    font-size: 14px;
    font-weight: 500;
}

/* VS section container styles - part of animation-container */
#vs-section {
    width: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-out;
    margin-top: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

#vs-section.show-content {
    opacity: 1;
}

/* VS content area layout */
.vs-content-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem; /* Gap between cards */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
}

/* Base styles for VS left and right content */
.vs-left-side, .vs-right-side {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(252, 213, 53, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Adjust card layout */
.vs-left-side {
    margin-right: 0;
}

.vs-right-side {
    margin-left: 0;
}

/* Mobile VS container styles */
.mobile-vs-container {
    display: none;
    align-items: center;
    justify-content: center;
    margin: -2.5rem 0; /* Reduce top and bottom margins to bring cards closer */
    position: absolute; /* Change to absolute positioning */
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 20; /* Ensure it's on top */
    width: 100%;
}

/* VS circle container styles and animation */
.vs-circle {
    width: 5rem;
    height: 5rem;
    background-color: rgba(252, 213, 53, 0.1);
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(252, 213, 53, 0.1);
    border: 1px solid rgba(252, 213, 53, 0.3);
    transform: scale(1) rotate(0deg);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 10; /* Ensure VS is on top */
}

.vs-circle span {
    font-size: 1.875rem;
    font-weight: 700;
    color: #FCD535;
    transform: translateY(2px); /* Fine-tune text vertical centering */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* VS wobble animation - adjust to a more moderate rhythm */
@keyframes vs-wobble {
    0% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
    25% {
        transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
    }
    50% {
        transform: translate(-50%, -50%) scale(1) rotate(-5deg);
    }
    75% {
        transform: translate(-50%, -50%) scale(1.1) rotate(3deg);
    }
    100% {
        transform: translate(-50%, -50%) scale(1) rotate(0deg);
    }
}

/* VS circle appearance and continuous animation - adjust to a more moderate time */
.vs-circle.show {
    animation: vs-appear 0.5s ease-out forwards, vs-wobble 3s ease-in-out 0.5s infinite;
}

@keyframes vs-appear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.7) rotate(0deg);
    }
    70% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.2) rotate(5deg);
    }
    85% {
        transform: translate(-50%, -50%) scale(1.1) rotate(-3deg);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.18) rotate(3deg);
    }
}

/* Card SVG icon styles */
.card-icon {
    position: absolute;
    top: 0;
    width: 4rem;
    height: 4rem;
    opacity: 0.1;
}

.vs-left-side .card-icon {
    left: 0;
}

.vs-right-side .card-icon {
    right: 0;
}

/* Card title styles */
.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #FCD535;
    margin-bottom: 0.5rem;
}

/* Card content styles */
.card-content {
    font-size: 0.875rem;
    color: #d1d5db;
}

/* Mobile adaptation */
@media (max-width: 768px) {
    .vs-content-container {
        grid-template-columns: 1fr;
        gap: 3rem; /* Add gap between cards */
        padding: 1rem 0.5rem;
        position: relative;
        min-height: auto;
    }
    
    .mobile-vs-container {
        display: flex;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
        z-index: 30;
    }
    
    /* Reset previous negative margins to have normal spacing between cards */
    .vs-left-side {
        margin-bottom: 0;
        margin-top: 0;
    }
    
    .vs-right-side {
        margin-top: 0;
        margin-bottom: 0;
    }
    
    /* Adjust VS circle size to cover edges of both cards */
    .vs-circle {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 5.5rem;
        height: 5.5rem;
        margin: 0;
        z-index: 20;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .vs-circle.show {
        animation: vs-appear-mobile 0.5s ease-out forwards, vs-wobble-mobile 3s ease-in-out 0.5s infinite;
    }
    
    @keyframes vs-appear-mobile {
        0% {
            opacity: 0;
            transform: scale(0.8) rotate(0deg);
        }
        100% {
            opacity: 1;
            transform: scale(1) rotate(0deg);
        }
    }
    
    /* Control VS display and hide on mobile */
    #vs-section > .vs-circle {
        display: none; /* Hide outer VS circle */
    }
}

/* Cyber grid background effect */
.cyber-grid {
    background-image: 
        linear-gradient(rgba(70, 70, 70, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(70, 70, 70, 0.5) 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: center center;
    background-color: rgb(0 0 0);
}

/* Logo underline */
.logo-underline {
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease-out;
}

/* Header slide-down animation */
.header-slide-down {
    transform: translateY(-100%);
    transition: transform 0.6s ease-out;
}

.header-slide-down.visible {
    transform: translateY(0);
}

/* Token table styling */
.token-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.token-table th {
    text-align: left;
    padding: 16px;
    background-color: rgb(0 0 0 / 0.5);
    font-weight: 600;
    color: #94a3b8;
    font-size: 0.875rem;
}

.token-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    font-size: 0.9375rem;
}

.token-table tr:last-child td {
    border-bottom: none;
}

.token-table tr:hover {
    background-color: rgba(252, 213, 53, 0.03);
}

.token-row {
    transition: all 0.2s ease-in-out;
}

/* SVG Path animation */
.animate-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw 2s ease-in forwards;
    fill: transparent;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* Animation for scaling the underline */
@keyframes scaleX {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

/* Animation for sliding up text */
@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Animation delays */
.animation-delay-100 {
    transition-delay: 0.1s;
}

.animation-delay-200 {
    transition-delay: 0.2s;
}

.animation-delay-300 {
    transition-delay: 0.3s;
}

.animation-delay-400 {
    transition-delay: 0.4s;
}

.animation-delay-500 {
    transition-delay: 0.5s;
}

/* Card hover effects */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(252, 213, 53, 0.1);
}

/* Glow effects for buttons and elements */
.glow-effect {
    box-shadow: 0 0 15px rgba(252, 213, 53, 0.2);
}

.glow-text {
    text-shadow: 0 0 10px rgba(252, 213, 53, 0.4);
}

/* Unify all background colors */
.bg-black\/20, .bg-black\/10, .bg-black\/30, .bg-black\/40, .bg-gradient-to-b, .bg-black\/60 {
    background-color: rgb(0 0 0 / 0.5) !important;
    background-image: none !important;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .token-table th, .token-table td {
        padding: 10px;
    }
    
    .token-column-mobile-hide {
        display: none;
    }
}

/* Activity banner styles */
#activity-banner {
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transform-origin: top;
    opacity: 0;
}

/* Hero section height control */
.hero-section {
    min-height: 100vh;
    padding-top: 80px; /* Reserve space for top navigation bar */
    padding-bottom: 23rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Content starts from top */
    align-items: center;
}

/* Ensure content section starts below viewport */
.content-sections {
    padding-top: 2rem;
    margin-top: 20vh; /* Increase top margin to see content after scrolling */
}

/* VS left and right slide-in animations */
.vs-left-side {
    transform: translateX(-100px);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.8s ease-out;
}

.vs-right-side {
    transform: translateX(100px);
    opacity: 0;
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.8s ease-out;
}

/* VS section slide-in final styles */
.vs-slide-in-final {
    transform: translateX(0) !important;
    opacity: 1 !important;
}

/* Retain old class names for compatibility */
.vs-slide-in {
    transform: translateX(0);
    opacity: 1;
}

/* Ensure animation container displays correctly on small screens */
@media (max-width: 768px) {
    .animation-container {
        max-width: 95%;
    }
    
    body:not(.initial-state) .animation-container {
        margin-top: 60px;
    }
}

/* Mobile animations */
@keyframes vs-wobble-mobile {
    0% {
        transform: scale(1) rotate(0deg);
    }
    25% {
        transform: scale(1.2) rotate(5deg);
    }
    50% {
        transform: scale(1) rotate(-5deg);
    }
    75% {
        transform: scale(1.1) rotate(3deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

/* Add scale pulse animation effect */
@keyframes scale-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.15);
    }
    100% {
        transform: scale(1);
    }
}

.animate-scale-pulse {
    animation: scale-pulse 3s ease-in-out infinite;
}

/* Add arrow up wobble animation */
@keyframes arrow-up-wobble {
    0% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-8px);
    }
    50% {
        transform: translateY(0);
    }
    75% {
        transform: translateY(-4px);
    }
    100% {
        transform: translateY(0);
    }
}

/* Add arrow down wobble animation */
@keyframes arrow-down-wobble {
    0% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(8px);
    }
    50% {
        transform: translateY(0);
    }
    75% {
        transform: translateY(4px);
    }
    100% {
        transform: translateY(0);
    }
}

.animate-arrow-up {
    animation: arrow-up-wobble 3s ease-in-out infinite;
}

.animate-arrow-down {
    animation: arrow-down-wobble 3s ease-in-out infinite;
}

/* Optimize rotation animation effect - change to left-right wobble */
@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(15deg);
    }
    50% {
        transform: rotate(0deg);
    }
    75% {
        transform: rotate(-15deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes rotate-reverse {
    0% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-15deg);
    }
    50% {
        transform: rotate(0deg);
    }
    75% {
        transform: rotate(15deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

/* Base rotation animation */
.animate-rotation {
    animation: rotate 3s ease-in-out infinite;
    display: inline-block;
    vertical-align: middle;
    transform-origin: center;
}

/* Adjust wobble effect for title icon in "How to Participate" section */
#how-to-join .text-center .animate-rotation {
    margin-right: 0.5rem;
    margin-bottom: 0.125rem;
    animation: rotate 5s ease-in-out infinite;
}

/* Adjust wobble speed for step icons */
.step-container .animate-rotation {
    color: #FCD535;
}

/* Adjust wobble effect for each card title icon in "How to Participate" */
#how-to-join h3 .animate-rotation {
    animation: rotate 3s ease-in-out infinite;
    transform-origin: center;
    filter: drop-shadow(0 0 3px rgba(252, 213, 53, 0.5));
}

/* Set different wobble directions for first and third card icons */
#how-to-join div:nth-child(odd) h3 .animate-rotation {
    animation: rotate-reverse 3s ease-in-out infinite;
}

/* Set slightly different wobble speeds for second and fourth card icons */
#how-to-join div:nth-child(even) h3 .animate-rotation {
    animation: rotate 3.5s ease-in-out infinite;
}

/* Add pause wobble effect on hover */
#how-to-join .group:hover h3 .animate-rotation {
    animation-play-state: paused;
}

/* Set different wobble animation delays for each card */
#how-to-join div:nth-child(1) h3 .animate-rotation {
    animation-delay: 0s;
}

#how-to-join div:nth-child(2) h3 .animate-rotation {
    animation-delay: 0.5s;
}

#how-to-join div:nth-child(3) h3 .animate-rotation {
    animation-delay: 1s;
}

#how-to-join div:nth-child(4) h3 .animate-rotation {
    animation-delay: 1.5s;
}

/* Add interaction effects for step cards */
#how-to-join .group {
    transition: all 0.5s ease;
    backdrop-filter: blur(5px);
}

#how-to-join .group:hover {
    transform: translateY(-10px) scale(1.05);
    box-shadow: 0 15px 30px rgba(252, 213, 53, 0.2);
    z-index: 10;
}

/* Add number circle scale effect */
@keyframes number-scale {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Set number circle animation to clean scale, remove any interference */
#how-to-join .w-16.h-16.rounded-full {
    animation: number-scale 3s ease-in-out infinite;
    box-shadow: none !important;
    transition: none !important;
    opacity: 1 !important;
}

/* Set different animation delays for different steps */
#how-to-join div:nth-child(1) .w-16.h-16.rounded-full {
    animation-delay: 0s;
}

#how-to-join div:nth-child(2) .w-16.h-16.rounded-full {
    animation-delay: 0.7s;
}

#how-to-join div:nth-child(3) .w-16.h-16.rounded-full {
    animation-delay: 1.4s;
}

#how-to-join div:nth-child(4) .w-16.h-16.rounded-full {
    animation-delay: 2.1s;
}

/* Ensure no other animations interfere */
#how-to-join .animate-pulse {
    animation: none !important;
    opacity: 1 !important;
}

/* Remove any animations from card backgrounds */
#how-to-join .bg-gradient-to-br .bg-gradient-to-br {
    animation: none !important;
    opacity: 0.1 !important;
    transition: none !important;
}

/* FAQ section styles */
#faq .faq-question {
    transition: all 0.3s ease;
}

#faq .faq-question:hover h3 {
    color: #fff;
}

#faq .faq-toggle {
    transition: all 0.3s ease;
}

#faq .faq-question:hover .faq-toggle {
    transform: scale(1.2);
}

#faq .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

#faq .faq-answer.hidden {
    max-height: 0;
    margin-top: 0;
    opacity: 0;
}

#faq .faq-answer:not(.hidden) {
    max-height: 500px;
    margin-top: 0.75rem;
    opacity: 1;
}

#faq .group {
    transition: all 0.3s ease;
}

#faq .group:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(252, 213, 53, 0.1);
}

/* Make icon wobble next to FAQ title */
#faq .text-center .animate-rotation {
    animation: rotate 5s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(252, 213, 53, 0.2));
}

