/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Top Navigation Bar */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 0 30px;
    z-index: 1000;
}

.nav-button {
    background: none;
    border: 2px solid transparent;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    color: #333;
}

body.dark-theme .nav-button {
    color: #fff;
}

.nav-button:hover {
    border-color: #333;
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.05);
}

body.dark-theme .nav-button:hover {
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.nav-theme-toggle:hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, 0.05);
}

body.dark-theme .nav-theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body.dark-theme .modal-content {
    background-color: #3a3a3a;
    color: white;
}

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

.close {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
    transition: color 0.2s ease;
}

.close:hover {
    color: #333;
}

body.dark-theme .close {
    color: #ccc;
}

body.dark-theme .close:hover {
    color: #fff;
}

.modal-content h2 {
    margin-bottom: 20px;
    color: #333;
}

body.dark-theme .modal-content h2 {
    color: #fff;
}

.modal-content p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #666;
}

body.dark-theme .modal-content p {
    color: #ccc;
}

.modal-controls {
    margin-top: 25px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 10px;
}

body.dark-theme .modal-controls {
    background-color: #2a2a2a;
}

.modal-controls ul {
    margin-left: 20px;
    margin-top: 10px;
}

.modal-controls li {
    margin-bottom: 5px;
    color: #555;
}

body.dark-theme .modal-controls li {
    color: #aaa;
}

/* Footer */
.footer {
    position: fixed;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 100;
}

.footer-text {
    font-size: 11px;
    color: rgba(0, 0, 0, 0.3);
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.5px;
}

body.dark-theme .footer-text {
    color: rgba(255, 255, 255, 0.3);
}

body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
    padding-top: 60px;
}

/* Background animation from black to white */
body.background-animate {
    animation: blackToWhite 8s infinite alternate ease-in-out;
}

@keyframes blackToWhite {
    0% {
        background-color: #000000;
    }
    25% {
        background-color: #333333;
    }
    50% {
        background-color: #666666;
    }
    75% {
        background-color: #cccccc;
    }
    100% {
        background-color: #ffffff;
    }
}

body.dark-theme {
    background-color: #2a2a2a;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 20px;
    max-width: 800px;
    width: 100%;
}

/* Navigation Logo */
.nav-logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-logo {
    width: 55px;
    height: 55px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
    cursor: pointer;
    transition: transform 0.2s ease;
    animation: navLogoPulsate 3s ease-in-out infinite;
}

.nav-logo:hover {
    transform: scale(1.1);
}

@keyframes navLogoPulsate {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

/* Dudipap Image Section */
.dudipap-section {
    margin-bottom: 30px;
    margin-top: 20px;
    overflow: visible;
}

.dudipap-img {
    width: 120px;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

/* Simple dudipap rotation animation */
.dudipap-img.dudipap-insane {
    animation: dudipapRotateOnce 3s ease-in-out forwards;
}

@keyframes dudipapRotateOnce {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(180deg);
    }
}



.switch-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

/* Characters Section */
.characters-section {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
    flex-wrap: wrap;
    justify-content: center;
}

.character-slot {
    width: 225px;
    height: 225px;
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.character-slot:hover {
    transform: translateY(-5px);
}

.character-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.character-img.loading {
    opacity: 0.5;
}

/* Insane black and white effects when audio is playing */
.character-slot.audio-effects .character-img {
    animation: insaneEffects 0.8s infinite alternate;
    filter: contrast(200%) brightness(150%) grayscale(100%) invert(0);
}

.character-slot.audio-effects:nth-child(1) .character-img {
    animation: crazyFlash 0.3s infinite, spinWild 2s infinite linear;
}

.character-slot.audio-effects:nth-child(2) .character-img {
    animation: strobeInvert 0.2s infinite, shake 0.1s infinite;
}

.character-slot.audio-effects:nth-child(3) .character-img {
    animation: glitchEffect 0.4s infinite, pulseInsane 0.6s infinite;
}

@keyframes insaneEffects {
    0% { 
        filter: contrast(300%) brightness(200%) grayscale(100%) invert(0) blur(0px);
        transform: scale(1) rotate(0deg);
    }
    25% {
        filter: contrast(500%) brightness(50%) grayscale(0%) invert(1) blur(2px);
        transform: scale(1.1) rotate(5deg);
    }
    50% {
        filter: contrast(800%) brightness(300%) grayscale(100%) invert(0) blur(1px);
        transform: scale(0.9) rotate(-5deg);
    }
    75% {
        filter: contrast(200%) brightness(80%) grayscale(50%) invert(1) blur(3px);
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        filter: contrast(600%) brightness(150%) grayscale(100%) invert(0) blur(0px);
        transform: scale(1) rotate(0deg);
    }
}

@keyframes crazyFlash {
    0%, 50% { filter: invert(0) contrast(400%) brightness(300%); }
    25%, 75% { filter: invert(1) contrast(800%) brightness(50%); }
}

@keyframes spinWild {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(90deg); }
    50% { transform: rotate(180deg); }
    75% { transform: rotate(270deg); }
    100% { transform: rotate(360deg); }
}

@keyframes strobeInvert {
    0% { filter: invert(0) grayscale(100%) contrast(500%); }
    20% { filter: invert(1) grayscale(0%) contrast(800%); }
    40% { filter: invert(0) grayscale(100%) contrast(300%); }
    60% { filter: invert(1) grayscale(50%) contrast(600%); }
    80% { filter: invert(0) grayscale(100%) contrast(400%); }
    100% { filter: invert(1) grayscale(0%) contrast(700%); }
}

@keyframes shake {
    0%, 100% { transform: translateX(0) translateY(0); }
    10% { transform: translateX(-2px) translateY(-1px); }
    20% { transform: translateX(2px) translateY(1px); }
    30% { transform: translateX(-1px) translateY(-2px); }
    40% { transform: translateX(1px) translateY(2px); }
    50% { transform: translateX(-2px) translateY(1px); }
    60% { transform: translateX(2px) translateY(-1px); }
    70% { transform: translateX(-1px) translateY(2px); }
    80% { transform: translateX(1px) translateY(-2px); }
    90% { transform: translateX(-2px) translateY(-1px); }
}

@keyframes glitchEffect {
    0% { 
        filter: invert(0) contrast(200%) hue-rotate(0deg);
        transform: skewX(0deg);
    }
    10% { 
        filter: invert(1) contrast(600%) hue-rotate(90deg);
        transform: skewX(2deg);
    }
    20% { 
        filter: invert(0) contrast(400%) hue-rotate(180deg);
        transform: skewX(-2deg);
    }
    30% { 
        filter: invert(1) contrast(800%) hue-rotate(270deg);
        transform: skewX(1deg);
    }
    40% { 
        filter: invert(0) contrast(300%) hue-rotate(360deg);
        transform: skewX(-1deg);
    }
    50% { 
        filter: invert(1) contrast(500%) hue-rotate(45deg);
        transform: skewX(0deg);
    }
    60% { 
        filter: invert(0) contrast(700%) hue-rotate(135deg);
        transform: skewX(2deg);
    }
    70% { 
        filter: invert(1) contrast(250%) hue-rotate(225deg);
        transform: skewX(-2deg);
    }
    80% { 
        filter: invert(0) contrast(600%) hue-rotate(315deg);
        transform: skewX(1deg);
    }
    90% { 
        filter: invert(1) contrast(400%) hue-rotate(180deg);
        transform: skewX(-1deg);
    }
    100% { 
        filter: invert(0) contrast(200%) hue-rotate(0deg);
        transform: skewX(0deg);
    }
}

@keyframes pulseInsane {
    0% { 
        transform: scale(1);
        filter: brightness(100%) contrast(200%);
    }
    25% { 
        transform: scale(1.15);
        filter: brightness(300%) contrast(500%) invert(1);
    }
    50% { 
        transform: scale(0.85);
        filter: brightness(50%) contrast(800%) invert(0);
    }
    75% { 
        transform: scale(1.1);
        filter: brightness(200%) contrast(400%) invert(1);
    }
    100% { 
        transform: scale(1);
        filter: brightness(100%) contrast(200%) invert(0);
    }
}

body.dark-theme .character-slot {
    background-color: transparent;
}

/* Draw Button */
.draw-section {
    margin-bottom: 40px;
}

.draw-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: transform 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.draw-button:hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, 0.05);
}

.draw-button:active {
    transform: scale(0.95);
}

.draw-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

body.dark-theme .draw-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Social Media Section */
.social-section {
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border-radius: 50%;
    transition: transform 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
}

.social-link:hover {
    transform: scale(1.1);
    background-color: rgba(0, 0, 0, 0.05);
}

.social-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.1));
}

.social-icon.spotify-big {
    width: 55px;
    height: 55px;
}

body.dark-theme .social-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Disabled social media buttons */
.social-link.disabled {
    cursor: default;
    pointer-events: none;
}

.social-link.disabled .social-icon {
    filter: grayscale(100%) opacity(0.4) drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.1));
}

.social-link.disabled:hover {
    transform: none;
    background-color: transparent;
}

body.dark-theme .social-link.disabled:hover {
    background-color: transparent;
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.draw-button.loading .draw-icon {
    animation: spin 1s linear infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .characters-section {
        gap: 20px;
    }
    
    .character-slot {
        width: 180px;
        height: 180px;
    }
    

    
    .social-section {
        gap: 15px;
    }
    
    .social-icon {
        width: 25px;
        height: 25px;
    }
    
    .social-icon.spotify-big {
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .characters-section {
        flex-direction: column;
        gap: 15px;
    }
    
    .character-slot {
        width: 210px;
        height: 210px;
    }
    

}