/* Fun, Funky, and Moving Italian Brainrot Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(45deg, #ff6b9d, #c44569, #f8b500, #20bf6b, #0fb9b1, #4834d4);
    background-size: 400% 400%;
    animation: gradientDance 8s ease infinite;
    overflow-x: hidden;
    min-height: 100vh;
}

@keyframes gradientDance {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Dancing Background */
.dancing-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(255, 107, 157, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(248, 181, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(72, 52, 212, 0.3) 0%, transparent 50%);
    animation: backgroundPulse 4s ease-in-out infinite;
    z-index: -2;
}

@keyframes backgroundPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(2deg); }
}

/* Canvas */
#characterCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    margin-bottom: 40px;
}

.funky-title {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(3rem, 8vw, 6rem);
    color: #fff;
    text-shadow: 
        4px 4px 0px #ff6b9d,
        8px 8px 0px #4834d4,
        12px 12px 0px #f8b500;
    animation: titleBounce 3s ease-in-out infinite;
    margin-bottom: 20px;
}

@keyframes titleBounce {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.ca-announcement {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(1.2rem, 3vw, 2rem);
    background: linear-gradient(45deg, #ff6b9d, #ffff00, #00ffff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowShift 2s ease-in-out infinite, caGlow 3s ease-in-out infinite;
    margin: 15px 0;
    padding: 10px 25px;
    border: 3px solid;
    border-image: linear-gradient(45deg, #ff6b9d, #ffff00, #00ffff) 1;
    border-radius: 25px;
    display: inline-block;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

@keyframes caGlow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 107, 157, 0.6);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(255, 255, 0, 0.8);
        transform: scale(1.05);
    }
}

.funky-subtitle {
    font-size: 1.4rem;
    color: #fff;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    margin-bottom: 30px;
    animation: subtitleWiggle 2s ease-in-out infinite;
}

@keyframes subtitleWiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(1deg); }
    75% { transform: rotate(-1deg); }
}

.copy-ca-btn {
    background: linear-gradient(45deg, #ff9500, #ffb347);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin: 15px 0;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(255, 149, 0, 0.3);
    font-family: 'Fredoka One', cursive;
}

.copy-ca-btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(255, 149, 0, 0.5);
    background: linear-gradient(45deg, #ffb347, #ff9500);
}

.copy-ca-btn:active {
    transform: translateY(0) scale(1);
}
}

/* Buttons */
.funky-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.bounce-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: buttonFloat 3s ease-in-out infinite;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    font-weight: 400;
}

.bounce-btn.primary {
    background: linear-gradient(45deg, #ff6b9d, #4834d4);
    color: white;
    animation-delay: -0.5s;
}

.bounce-btn.secondary {
    background: linear-gradient(45deg, #f8b500, #20bf6b);
    color: white;
    animation-delay: -1s;
}

.bounce-btn.test-voice {
    background: linear-gradient(45deg, #ff6b9d, #c44569);
    color: white;
    font-size: 1rem;
    animation-delay: -1.5s;
}

.bounce-btn.twitter-btn {
    background: linear-gradient(45deg, #1da1f2, #0d8bd9);
    color: white;
    animation-delay: -2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bounce-btn.tiktok-btn {
    background: linear-gradient(45deg, #ff0050, #ff4081);
    color: white;
    animation-delay: -1.5s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bounce-btn.community-btn {
    background: linear-gradient(45deg, #7289da, #5865f2);
    color: white;
    animation-delay: -2.5s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bounce-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
}

@keyframes buttonFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Section Titles */
.section-title {
    font-family: 'Fredoka One', cursive;
    font-size: clamp(2rem, 5vw, 3.5rem);
    text-align: center;
    margin: 40px 0;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
}

.rainbow-text {
    background: linear-gradient(45deg, #ff6b9d, #4834d4, #f8b500, #20bf6b, #0fb9b1);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowShift 3s ease-in-out infinite;
}

.disco-text {
    color: #fff;
    animation: discoLights 2s linear infinite;
}

@keyframes rainbowShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes discoLights {
    0% { text-shadow: 0 0 10px #ff6b9d; }
    25% { text-shadow: 0 0 10px #4834d4; }
    50% { text-shadow: 0 0 10px #f8b500; }
    75% { text-shadow: 0 0 10px #20bf6b; }
    100% { text-shadow: 0 0 10px #ff6b9d; }
}

/* Characters Grid */
.characters-section {
    margin: 60px 0;
}

.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 20px 0;
}

.character-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: cardFloat 4s ease-in-out infinite;
}

.character-card:nth-child(odd) { animation-delay: -1s; }
.character-card:nth-child(even) { animation-delay: -2s; }

.character-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.character-card:hover::before {
    left: 100%;
}

.character-card:hover {
    transform: translateY(-15px) scale(1.05);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

@keyframes cardFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

.character-image-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 5px solid;
    position: relative;
    animation: imageRotate 8s linear infinite;
}

@keyframes imageRotate {
    from { border-color: #ff6b9d; }
    25% { border-color: #4834d4; }
    50% { border-color: #f8b500; }
    75% { border-color: #20bf6b; }
    to { border-color: #ff6b9d; }
}

.character-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.character-card:hover .character-image {
    transform: scale(1.1);
}

.character-name {
    font-family: 'Fredoka One', cursive;
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 10px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.character-description-text {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.4;
    font-weight: 600;
}

.character-audio-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, #ff6b9d, #4834d4);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    animation: audioPulse 2s ease-in-out infinite;
}

.character-audio-btn:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

@keyframes audioPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
    50% { box-shadow: 0 4px 20px rgba(255,107,157,0.6); }
}

/* Interactions Section */
.interactions-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 60px 0;
}

.interaction-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    animation-duration: 3s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-in-out;
}

.interaction-card.wobble { animation-name: wobble; }
.interaction-card.bounce { animation-name: bounce; animation-delay: -1s; }
.interaction-card.shake { animation-name: shake; animation-delay: -2s; }

@keyframes wobble {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(1deg); }
    75% { transform: rotate(-1deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0px); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

.interaction-card h3 {
    font-family: 'Fredoka One', cursive;
    font-size: 1.5rem;
    color: #333;
    margin-bottom: 20px;
}

.fun-btn {
    font-family: 'Fredoka One', cursive;
    font-size: 1rem;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, #20bf6b, #0fb9b1);
    color: white;
    cursor: pointer;
    margin: 5px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.fun-btn.secondary {
    background: linear-gradient(45deg, #c44569, #ff6b9d);
}

.fun-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* Random Character Display */
.random-character-display {
    margin-top: 20px;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.character-spotlight {
    font-size: 1.1rem;
    color: #666;
    font-weight: 600;
}

/* Generated Image Container */
.generated-image-container {
    margin-top: 20px;
    text-align: center;
    position: relative;
}

.generated-character-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: imageAppear 0.8s ease-out;
}

.image-loading {
    font-family: 'Fredoka One', cursive;
    font-size: 1.2rem;
    color: #4834d4;
    padding: 40px;
    background: linear-gradient(45deg, #ff6b9d, #4834d4, #f8b500);
    background-size: 300% 300%;
    animation: rainbowShift 2s ease-in-out infinite;
    border-radius: 15px;
    margin: 20px 0;
}

@keyframes imageAppear {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

/* Stats Display */
.stats-display {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: 'Fredoka One', cursive;
    font-size: 2rem;
    color: #4834d4;
    animation: numberPulse 2s ease-in-out infinite;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

@keyframes numberPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* About Section */
.about-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px;
    margin: 60px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.funky-text {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.6;
    font-weight: 600;
}

/* Floating Elements */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.float-emoji {
    position: absolute;
    font-size: 2rem;
    animation: floatAround 10s linear infinite;
    opacity: 0.6;
}

.float-emoji:nth-child(1) { top: 10%; left: 10%; animation-delay: 0s; }
.float-emoji:nth-child(2) { top: 20%; right: 10%; animation-delay: -2s; }
.float-emoji:nth-child(3) { top: 70%; left: 5%; animation-delay: -4s; }
.float-emoji:nth-child(4) { top: 60%; right: 20%; animation-delay: -6s; }
.float-emoji:nth-child(5) { top: 40%; left: 50%; animation-delay: -8s; }
.float-emoji:nth-child(6) { top: 80%; right: 40%; animation-delay: -10s; }

@keyframes floatAround {
    0% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(90deg); }
    50% { transform: translateY(0px) rotate(180deg); }
    75% { transform: translateY(-10px) rotate(270deg); }
    100% { transform: translateY(0px) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .funky-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .interactions-section {
        grid-template-columns: 1fr;
    }
    
    .characters-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
    }
    
    .container {
        padding: 15px;
    }
}

/* Hidden by default */
.characters-section {
    display: none;
}

.characters-section.visible {
    display: block;
    animation: slideIn 0.8s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}