:root {
    --primary-color: #FF69B4;
    --secondary-color: #FFB6C1;
    --accent-color: #FF1493;
    --text-color: #FFF;
    --background-color: #1a1a1a;
    --shadow-color: rgba(255, 105, 180, 0.3);
    --glass-background: rgba(40, 40, 40, 0.95);
    --lcd-background: #98FB98;
    --lcd-text: #006400;
    --pixel-border: 4px;
    --pixel-shadow: -2px -2px 0 #111, 2px 2px 0 #fff;
    --checkerboard-size: 20px;
    /* Tamanho dos quadrados do xadrez */
    --checkerboard-color: rgba(255, 105, 180, 0.03);
    /* Cor rosa bem suave */
    --focus-outline: 3px solid #FF1493;
    --focus-ring-color: rgba(255, 20, 147, 0.5);
}

/* Reset e estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: linear-gradient(315deg,
            #1a1a1a,
            #2d1f3d,
            #1f2d3d,
            #1a1a1a);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-family: 'Segoe UI', sans-serif;
    padding: 1rem;
    color: var(--text-color);
    overflow-x: hidden;
}

/* Efeito xadrez */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(45deg, rgba(255, 192, 203, 0.05) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(255, 192, 203, 0.05) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(255, 192, 203, 0.05) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(255, 192, 203, 0.05) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    pointer-events: none;
    z-index: 0;
    animation: checkerboardAnimation 30s linear infinite;
}

/* Animação do padrão xadrez */
@keyframes checkerboardAnimation {
    0% {
        background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    }

    100% {
        background-position: -20px -20px, -20px -10px, -10px -30px, -30px -20px;
    }
}

/* Background animado */
@keyframes gradientAnimation {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes starTwinkle {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.8;
    }
}

/* Efeito de estrelas */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255, 105, 180, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 20, 147, 0.1) 0%, transparent 50%),
        radial-gradient(2px 2px at calc(var(--star-x, 10%) + 15%) calc(var(--star-y, 10%) + 15%), rgba(255, 255, 255, 0.8) 50%, transparent 100%),
        radial-gradient(2px 2px at calc(var(--star-x, 30%) + 35%) calc(var(--star-y, 30%) + 35%), rgba(255, 255, 255, 0.8) 50%, transparent 100%),
        radial-gradient(2px 2px at calc(var(--star-x, 50%) + 55%) calc(var(--star-y, 50%) + 55%), rgba(255, 255, 255, 0.8) 50%, transparent 100%),
        radial-gradient(2px 2px at calc(var(--star-x, 70%) + 75%) calc(var(--star-y, 70%) + 75%), rgba(255, 255, 255, 0.8) 50%, transparent 100%);
    pointer-events: none;
    animation: starTwinkle 3s ease-in-out infinite;
    z-index: 0;
}

/* Efeito de brilho suave */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        repeating-linear-gradient(45deg,
            rgba(255, 105, 180, 0.02) 0px,
            rgba(255, 105, 180, 0.02) 1px,
            transparent 1px,
            transparent 10px);
    pointer-events: none;
    z-index: 1;
}

.container {
    max-width: 280px;
    width: 100%;
    transform-style: preserve-3d;
    perspective: 1000px;
    margin: auto 0;
    image-rendering: pixelated;
    box-shadow: var(--pixel-shadow);
    position: relative;
    flex-shrink: 0;
}

.visualizer-container {
    background: var(--glass-background);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: var(--pixel-border) solid #000;
    box-shadow:
        inset -2px -2px 0 #111,
        inset 2px 2px 0 rgba(255, 255, 255, 0.3);
    padding: 0.8rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Header Kawaii */
.header {
    text-align: center;
    margin-bottom: 0.8rem;
    position: relative;
    background: linear-gradient(145deg, #2a2a2a, #1a1a1a);
    border-radius: 12px;
    padding: 0.6rem;
    border: 1px solid var(--primary-color);
}

.title {
    font-size: 1rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
    letter-spacing: 1px;
    margin-bottom: 0.8rem;
}

/* Display LCD */
.lcd-display {
    background-color: var(--lcd-background);
    border: 4px solid #2d3436;
    image-rendering: pixelated;
    box-shadow:
        inset -2px -2px 0px #111,
        inset 2px 2px 0px #eee;
    position: relative;
}

.lcd-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0.1) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 2px 2px;
    pointer-events: none;
}

.lcd-screen {
    font-family: 'LCD', monospace;
    color: var(--lcd-text);
    font-size: 0.9rem;
    text-shadow: none;
    text-align: center;
    position: relative;
    animation: subtle-pulse 3s infinite;
}

.lcd-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(0deg,
            rgba(0, 0, 0, 0.05) 0px,
            rgba(0, 0, 0, 0.05) 1px,
            transparent 1px,
            transparent 2px);
    pointer-events: none;
}

/* Player Container */
.playlist-container {
    background: rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid var(--shadow-color);
    position: relative;
    overflow: hidden;
    box-shadow:
        inset 1px 1px 1px rgba(255, 255, 255, 0.1),
        inset -1px -1px 1px rgba(0, 0, 0, 0.2),
        0 2px 4px rgba(0, 0, 0, 0.2);
}

.now-playing {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    /* Aumentado para dar mais espaço entre a imagem e o texto */
    margin-bottom: 0.8rem;
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    border: 2px solid var(--shadow-color);
}

#track-artwork {
    image-rendering: pixelated;
    border: 4px solid #000;
    box-shadow:
        -2px -2px 0px #111,
        2px 2px 0px #fff;
    width: 60px;
    /* Tamanho fixo para melhor controle */
    height: 60px;
    /* Mantém proporção quadrada */
    border-radius: 4px;
    /* Borda levemente arredondada mas mantendo estilo pixel */
    object-fit: cover;
    /* Garante que a imagem cubra todo o espaço */
    image-rendering: pixelated;
    /* Reforça o efeito pixel art */
    transition: transform 0.3s ease;
}

#track-artwork:hover {
    transform: scale(1.05);
    box-shadow:
        -3px -3px 0px #111,
        3px 3px 0px #fff,
        0 0 10px var(--primary-color);
}

.track-info {
    flex: 1;
    min-width: 0;
    padding: 0.4rem;
}

#track-name {
    font-size: 0.9rem;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: var(--primary-color);
    text-shadow: 1px 1px 0px #000;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#track-artist {
    font-size: 0.8rem;
    color: var(--text-color);
    opacity: 0.9;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Novos estilos para os controles */
.controls-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding: 0.4rem;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(255, 105, 180, 0.15);
}

.control-buttons {
    display: flex;
    justify-content: center;
    gap: 0.8rem;
    margin-bottom: 0.4rem;
}

.control-btn {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    background: linear-gradient(145deg, var(--primary-color), var(--accent-color));
    color: white;
    border: 3px solid #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    image-rendering: pixelated;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s;
    outline: none;
}

.control-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(145deg, var(--accent-color), var(--primary-color));
}

.control-btn:active {
    transform: scale(0.95) translateY(0);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.control-btn:focus-visible::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: var(--focus-outline);
    border-radius: inherit;
    animation: focusRing 2s ease-in-out infinite;
}

@keyframes focusRing {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Ajuste do espaçamento dos controles */
.controls-wrapper {
    padding: 0.6rem;
    display: flex;
    justify-content: center;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    border: 1px solid rgba(255, 105, 180, 0.15);
}

/* Volume Control aprimorado */
.volume-control {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem;
    position: relative;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: background-color 0.2s ease;
    width: 100%;
}

.volume-control:hover {
    background: rgba(0, 0, 0, 0.2);
}

.volume-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.volume-icon:hover {
    transform: scale(1.1);
}

.volume-icon-svg {
    fill: var(--primary-color);
    opacity: 0.85;
    transition: all 0.2s ease;
    filter: drop-shadow(0 0 2px rgba(255, 105, 180, 0.5));
}

.volume-icon:hover .volume-icon-svg {
    opacity: 1;
    fill: var(--accent-color);
    filter: drop-shadow(0 0 3px rgba(255, 105, 180, 0.7));
}

#volume-control {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, var(--primary-color) var(--volume-percent, 70%), rgba(255, 255, 255, 0.1) var(--volume-percent, 70%));
    border-radius: 3px;
    position: relative;
    cursor: pointer;
    transition: height 0.2s ease;
}

#volume-control:hover {
    height: 8px;
}

#volume-control::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(255, 105, 180, 0.5);
    transition: all 0.2s ease;
    margin-top: -5px;
}

#volume-control:hover::-webkit-slider-thumb {
    width: 18px;
    height: 18px;
    background: var(--accent-color);
    transform: scale(1.1);
    box-shadow: 0 0 8px rgba(255, 105, 180, 0.7);
}

/* Tooltip e efeitos do volume */
#volume-control[data-tooltip] {
    position: relative;
}

#volume-control[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.3rem 0.6rem;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

#volume-control:hover[data-tooltip]::after {
    opacity: 1;
}

.volume-control:focus-within {
    outline: 1px solid var(--primary-color);
    box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.2);
}

.volume-icon:focus {
    outline: none;
    transform: scale(1.1);
}

.volume-icon:focus .volume-icon-svg {
    fill: var(--accent-color);
    filter: drop-shadow(0 0 3px rgba(255, 105, 180, 0.7));
}

/* Visualizer aprimorado */
.visualizer-container-bottom {
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    padding: 1rem 0.5rem;
    margin-top: 1rem;
    border: 1px solid rgba(255, 105, 180, 0.2);
    overflow: hidden;
    min-height: 80px;
    border: var(--pixel-border) solid #000;
    box-shadow:
        inset -2px -2px 0 #111,
        inset 2px 2px 0 rgba(255, 255, 255, 0.3);
    image-rendering: pixelated;
}

.visualizer-display {
    height: 64px;
    display: flex;
    align-items: flex-end;
    gap: 2px;
    padding: 4px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.visualizer-bar {
    flex: 1;
    min-height: 2px;
    background: var(--primary-color);
    box-shadow: 0 0 4px var(--primary-color);
    transition: height 0.1s step-end;
    position: relative;
}

.visualizer-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
}

.visualizer-reflection {
    height: 16px;
    background: linear-gradient(to bottom,
            rgba(255, 105, 180, 0.2),
            transparent);
    transform: scaleY(-1);
    margin-top: 2px;
    image-rendering: pixelated;
    opacity: 0.7;
}

/* Grid de fundo para efeito pixel */
.visualizer-container-bottom::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 4px 4px;
    pointer-events: none;
}

/* Efeito de brilho nos cantos */
.retro-corner::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 50%;
    animation: cornerGlow 2s infinite alternate;
}

@keyframes cornerGlow {
    0% {
        box-shadow: 0 0 2px var(--accent-color);
        opacity: 0.5;
    }

    100% {
        box-shadow: 0 0 8px var(--accent-color);
        opacity: 1;
    }
}

/* Efeitos sutis */
@keyframes subtle-pulse {
    0% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.8;
    }
}

/* Responsividade */
@media (max-width: 480px) {
    .container {
        max-width: 320px;
        padding: 0.5rem;
    }

    .visualizer-container {
        padding: 0.6rem;
    }

    .control-buttons {
        gap: 0.6rem;
    }

    .control-btn {
        width: 32px;
        height: 32px;
    }

    #track-artwork {
        width: 50px;
        height: 50px;
    }

    .now-playing {
        padding: 0.5rem;
        gap: 0.6rem;
    }

    .track-info {
        padding: 0.3rem;
    }

    #track-name {
        font-size: 0.85rem;
    }

    #track-artist {
        font-size: 0.75rem;
    }
}

@media (max-width: 360px) {
    .container {
        max-width: 280px;
        padding: 0.3rem;
    }

    .visualizer-container {
        padding: 0.4rem;
    }

    .control-buttons {
        gap: 0.4rem;
    }

    .control-btn {
        width: 28px;
        height: 28px;
    }

    #track-artwork {
        width: 45px;
        height: 45px;
    }

    .lcd-display {
        height: 40px;
        padding: 0.3rem;
    }

    .now-playing {
        padding: 0.4rem;
        gap: 0.5rem;
    }

    .track-info {
        padding: 0.2rem;
    }

    #track-name {
        font-size: 0.8rem;
    }

    #track-artist {
        font-size: 0.7rem;
        opacity: 0.85;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .container {
        max-width: 400px;
    }

    .visualizer-container {
        padding: 1.2rem;
    }

    .control-buttons {
        gap: 1rem;
    }

    #visualizer {
        height: 70px;
    }
}

@media (orientation: landscape) and (max-height: 500px) {
    .container {
        padding: 0.5rem;
    }

    .visualizer-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .header {
        grid-column: 1 / -1;
        margin-bottom: 0.5rem;
    }

    .playlist-container {
        margin-bottom: 0;
    }

    #visualizer {
        height: 100%;
        margin-top: 0;
    }
}

@media (min-width: 769px) {
    .container {
        max-width: 480px;
    }

    .controls-wrapper {
        padding: 1rem;
    }

    .volume-control {
        padding: 0.5rem;
        gap: 0.6rem;
    }

    #volume-control {
        height: 8px;
    }

    #volume-control:hover {
        height: 10px;
    }

    #volume-control::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }

    #volume-control:hover::-webkit-slider-thumb {
        width: 22px;
        height: 22px;
    }

    .volume-icon {
        width: 28px;
        height: 28px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 580px;
    }

    .controls-wrapper {
        padding: 1.2rem;
    }

    .volume-control {
        padding: 0.6rem;
        gap: 0.8rem;
    }

    #volume-control {
        height: 10px;
    }

    #volume-control:hover {
        height: 12px;
    }

    #volume-control::-webkit-slider-thumb {
        width: 24px;
        height: 24px;
        margin-top: -7px;
    }

    #volume-control:hover::-webkit-slider-thumb {
        width: 26px;
        height: 26px;
    }

    .volume-icon {
        width: 32px;
        height: 32px;
    }
}

/* Elementos Pixel Art */
.lcd-display {
    background-color: var(--lcd-background);
    border: 4px solid #2d3436;
    image-rendering: pixelated;
    box-shadow:
        inset -2px -2px 0px #111,
        inset 2px 2px 0px #eee;
    position: relative;
}

.lcd-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(90deg, rgba(0, 0, 0, 0.1) 1px, transparent 1px),
        linear-gradient(0deg, rgba(0, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 2px 2px;
    pointer-events: none;
}

.control-btn {
    width: 28px;
    height: 28px;
    font-size: 0.9rem;
    background: linear-gradient(145deg, var(--primary-color), var(--accent-color));
    color: white;
    border: 3px solid #000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    image-rendering: pixelated;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s;
    outline: none;
}

.pixel-border {
    position: relative;
    border: none;
    padding: 4px;
}

.pixel-border::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid var(--primary-color);
    clip-path: polygon(0 2px, 2px 2px, 2px 0,
            calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px,
            100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%,
            2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px));
}

/* Animação de scanline para efeito retrô */
@keyframes scanline {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

.lcd-screen::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.1),
            rgba(255, 255, 255, 0.3));
    animation: scanline 2s linear infinite;
    pointer-events: none;
}

/* Estilo Pixel Art para o Container */
.container {
    image-rendering: pixelated;
    box-shadow: var(--pixel-shadow);
    position: relative;
}

.visualizer-container {
    border: var(--pixel-border) solid #000;
    box-shadow:
        inset -2px -2px 0 #111,
        inset 2px 2px 0 rgba(255, 255, 255, 0.3);
}

/* Texto Estilo Pixel */
.kawaii-text {
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    text-shadow: 2px 2px 0 #000;
}

.kawaii-text::after {
    content: '♪ Mp3 Music ♪';
    position: absolute;
    top: 1px;
    left: 1px;
    color: var(--accent-color);
    z-index: -1;
}

/* Display LCD Melhorado */
.lcd-text {
    font-family: 'Courier New', monospace;
    color: var(--lcd-text);
    text-shadow: 1px 1px 0 rgba(0, 255, 0, 0.2);
    position: relative;
}

/* Botões Pixel Art */
.control-btn {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s;
}

.control-btn:active {
    transform: translate(2px, 2px);
}

/* Efeito de Glitch */
@keyframes glitch {
    0% {
        transform: translate(0);
    }

    20% {
        transform: translate(-2px, 2px);
    }

    40% {
        transform: translate(-2px, -2px);
    }

    60% {
        transform: translate(2px, 2px);
    }

    80% {
        transform: translate(2px, -2px);
    }

    100% {
        transform: translate(0);
    }
}

.title:hover .kawaii-text {
    animation: glitch 0.2s ease-in-out infinite;
}

/* Footer Styles */
.pixel-footer {
    width: 100%;
    padding: 0.8rem;
    margin-top: auto;
    background: var(--glass-background);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 2px solid var(--shadow-color);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
    image-rendering: pixelated;
    position: relative;
    overflow: visible;
}

.credits-container {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.credits-title {
    font-size: 0.9rem;
    color: var(--primary-color);
    text-shadow: 1px 1px 0 #000;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.credits-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
    padding: 0.6rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    border: 1px solid var(--shadow-color);
    font-size: 0.8rem;
}

.credit-item {
    font-size: 0.75rem;
    line-height: 1.3;
    padding: 0.3rem;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

.credit-item:hover {
    background: rgba(0, 0, 0, 0.2);
}

.credit-item a {
    color: #FF1493;
    /* Cor mais contrastante */
    text-decoration: underline;
    /* Melhor indicação visual */
}

.developer-credit {
    margin-top: 0.8rem;
    padding: 0.4rem;
    border-top: 1px solid var(--shadow-color);
    font-family: 'Courier New', monospace;
}

.developer-credit p {
    font-size: 0.85rem;
    color: var(--primary-color);
    text-shadow: 1px 1px 0 #000;
    margin: 0.2rem 0;
}

.developer-credit .year {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Gifs decorativos do footer */
.footer-gif {
    position: absolute;
    bottom: 100%;
    width: 64px;
    height: 64px;
    image-rendering: pixelated;
    filter: drop-shadow(0 0 5px var(--shadow-color));
    animation: gif-glow 2s ease-in-out infinite;
    margin-bottom: 8px;
    /* Espaço entre os gifs e o footer */
}

.footer-gif-left {
    left: 20px;
}

.footer-gif-right {
    right: 20px;
}

@keyframes gif-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 3px var(--shadow-color));
    }

    50% {
        filter: drop-shadow(0 0 8px var(--primary-color));
    }
}

/* Ajuste responsivo para os gifs */
@media (max-width: 768px) {
    .footer-gif {
        width: 48px;
        height: 48px;
    }
}

@media (max-width: 480px) {
    .footer-gif {
        width: 40px;
        height: 40px;
    }

    .footer-gif-left {
        left: 10px;
    }

    .footer-gif-right {
        right: 10px;
    }
}

/* Responsividade do Footer */
@media (max-width: 480px) {
    .pixel-footer {
        padding: 0.6rem;
    }

    .credits-title {
        font-size: 0.85rem;
    }

    .credits-list {
        padding: 0.4rem;
    }

    .credit-item {
        font-size: 0.7rem;
        padding: 0.25rem;
    }

    .developer-credit p {
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .pixel-footer {
        padding: 0.5rem;
    }

    .credits-list {
        gap: 0.3rem;
        padding: 0.3rem;
    }

    .credits-title {
        font-size: 0.8rem;
    }

    .credit-item {
        font-size: 0.65rem;
        padding: 0.2rem;
    }

    .developer-credit p {
        font-size: 0.75rem;
    }
}

/* Melhorias de acessibilidade */
:root {
    --primary-color: #FF69B4;
    --secondary-color: #FFB6C1;
    --accent-color: #FF1493;
    --text-color: #FFF;
    --background-color: #1a1a1a;
    --focus-outline: 3px solid #FF1493;
    --focus-ring-color: rgba(255, 20, 147, 0.5);
    --pixel-border: 4px;
    --pixel-shadow: -2px -2px 0 #111, 2px 2px 0 #fff;
    --checkerboard-size: 20px;
    --checkerboard-color: rgba(255, 105, 180, 0.03);
}

/* Melhor indicação de foco */
button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: var(--focus-outline);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px var(--focus-ring-color);
}

/* Melhorar contraste */
.credit-item a {
    color: #FF1493;
    text-decoration: underline;
}

.control-btn:focus-visible::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: var(--focus-outline);
    border-radius: inherit;
    animation: focusRing 2s ease-in-out infinite;
}

@keyframes focusRing {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Otimização de performance */
.visualizer-container-bottom,
.retro-corner::after {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduzir impacto de pseudo-elementos */
body::before,
body::after {
    pointer-events: none;
    z-index: -1;
}