:root {
    /* Colors extracted from logo - gold/yellow theme */
    --primary-color: #FFD700;
    --secondary-color: #FFA500;
    --dark-bg: #1a1a2e;
    --light-bg: #16213e;
    --accent: #0f3460;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Fredoka', 'Comic Sans MS', cursive, sans-serif;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #5a6300 50%, var(--light-bg) 100%);
    background-attachment: fixed;
    color: #fff;
    overflow-x: hidden;
}

/* Animated background particles */
.bg-animation {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0.6;
    animation: float 15s infinite ease-in-out;
    will-change: transform;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    25% {
        transform: translateY(-100px) translateX(50px);
    }
    50% {
        transform: translateY(-200px) translateX(-50px);
    }
    75% {
        transform: translateY(-100px) translateX(100px);
    }
}

/* Rain animation background */
.rain-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.15;
    background-image: url('rain.jpg');
    background-repeat: repeat;
    background-size: cover;
    animation: rainFall 20s linear infinite;
    pointer-events: none;
    will-change: background-position;
}

@keyframes rainFall {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 0 1000px;
    }
}

/* Mobile optimization for animations */
@media (max-width: 768px) {
    .rain-bg {
        opacity: 0.08;
        background-size: 150% auto;
        animation: rainFallMobile 30s linear infinite;
    }
    
    .particle {
        width: 3px;
        height: 3px;
        opacity: 0.4;
    }
    
    @keyframes rainFallMobile {
        0% {
            background-position: 0 0;
        }
        100% {
            background-position: 0 500px;
        }
    }
}

/* Reduce animations on low-performance devices */
@media (prefers-reduced-motion: reduce) {
    .rain-bg,
    .particle {
        animation: none;
    }
    
    .bg-animation {
        display: none;
    }
}

/* Header Section */
header {
    padding: 20px 0;
    background: rgba(26, 26, 46, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.logo-swap-container {
    position: relative;
    width: 80px;
    height: 80px;
}

.logo-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
}

.logo-swap {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: scale(0.8) rotate(-180deg);
    transition: all 0.8s ease-in-out;
    animation: pulse 2s infinite;
}

.logo-swap.active {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    z-index: 1;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 215, 0, 0.8);
    }
}

.brand-name {
    font-family: 'Luckiest Guy', cursive;
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    letter-spacing: 2px;
}

/* Hero Section */
.hero-section {
    padding: 80px 0;
    text-align: center;
}

.hero-title {
    font-family: 'Bangers', cursive;
    font-size: 4rem;
    font-weight: bold;
    margin-bottom: 20px;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FFD700);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s infinite;
    letter-spacing: 3px;
}

@keyframes shimmer {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero-subtitle {
    font-family: 'Fredoka', cursive;
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #ddd;
    font-weight: 500;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
}

.social-btn {
    font-family: 'Fredoka', cursive;
    padding: 15px 40px;
    font-size: 1.2rem;
    border-radius: 50px;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.twitter-btn {
    background: linear-gradient(135deg, #1DA1F2, #0d8bd9);
}

.telegram-btn {
    background: linear-gradient(135deg, #0088cc, #006699);
}

.social-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
    color: #fff;
}

/* Floating Four Meme */
.floating-meme {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    animation: floatMeme 3s ease-in-out infinite;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.floating-meme img {
    width: 150px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.4);
    border: 3px solid var(--primary-color);
}

.floating-meme:hover {
    transform: scale(1.1) rotate(5deg);
}

@keyframes floatMeme {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* DEX Screener Section */
.dex-section {
    padding: 60px 0;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    margin: 40px 0;
    border-radius: 20px;
}

.section-title {
    font-family: 'Chewy', cursive;
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    letter-spacing: 2px;
}

.dex-container {
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

.dex-iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 20px;
}

/* Contract Address Section */
.contract-section {
    padding: 60px 0;
    text-align: center;
}

.contract-container {
    max-width: 800px;
    margin: 0 auto;
}

.contract-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px 30px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 10px 50px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.contract-box:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 15px 60px rgba(255, 215, 0, 0.5);
    transform: translateY(-5px);
}

.contract-label {
    font-family: 'Chewy', cursive;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.contract-address-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.contract-address {
    font-family: 'Courier New', monospace;
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    font-size: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 215, 0, 0.5);
    border-radius: 10px;
    color: #fff;
    text-align: center;
    outline: none;
    transition: all 0.3s ease;
}

.contract-address:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.copy-btn {
    font-family: 'Fredoka', cursive;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: bold;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 10px;
    color: var(--dark-bg);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.copy-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(255, 215, 0, 0.5);
}

.copy-btn:active {
    transform: translateY(-1px);
}

.copy-btn.copied {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    animation: copySuccess 0.3s ease;
}

@keyframes copySuccess {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.contract-info {
    font-family: 'Fredoka', cursive;
    font-size: 0.9rem;
    color: #ddd;
    margin-top: 15px;
    opacity: 0.8;
}

/* Mobile responsive for contract section */
@media (max-width: 768px) {
    .contract-box {
        padding: 30px 20px;
    }
    
    .contract-label {
        font-size: 1.3rem;
    }
    
    .contract-address-wrapper {
        flex-direction: column;
    }
    
    .contract-address {
        font-size: 0.85rem;
        padding: 12px 15px;
        min-width: 100%;
        word-break: break-all;
    }
    
    .copy-btn {
        width: 100%;
        justify-content: center;
        padding: 12px 25px;
    }
}

/* Gallery Section */
.gallery-section {
    padding: 80px 0;
    background: rgba(255, 255, 255, 0.02);
}

.gallery-section .row {
    padding: 20px 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    border: 3px solid var(--primary-color);
    box-shadow: 0 10px 30px rgba(255, 215, 0, 0.3);
    transition: all 0.4s ease;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 50px rgba(255, 215, 0, 0.6);
    border-color: var(--secondary-color);
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
    aspect-ratio: 1 / 1;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

/* Gallery Grid Spacing */
.gallery-section .g-4 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

/* Gallery responsive */
@media (min-width: 992px) {
    .gallery-item {
        height: 300px;
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .gallery-item {
        height: 280px;
    }
}

@media (max-width: 767px) {
    .gallery-section {
        padding: 60px 0;
    }
    
    .gallery-item {
        height: auto;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .gallery-img {
        width: 100%;
        height: auto;
        max-width: 400px;
        max-height: 400px;
    }
}

@media (max-width: 576px) {
    .gallery-section .g-4 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
}

/* Footer */
footer {
    background: rgba(26, 26, 46, 0.9);
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

.footer-text {
    font-family: 'Fredoka', cursive;
    color: #ddd;
    margin: 10px 0;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .brand-name {
        font-size: 2rem;
    }
    
    .floating-meme {
        bottom: 20px;
        right: 20px;
    }
    
    .floating-meme img {
        width: 100px;
    }
    
    .social-links {
        flex-direction: column;
        align-items: center;
    }
    
    .dex-iframe {
        height: 400px;
    }
}
