/* General Styles */
body {
    margin: 0;
    padding: 20px;
    font-family: 'Press Start 2P', cursive;
    background-color: #ffccff;
    color: #660066;
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M16 8 L8 16 L16 24 L24 16 L16 8" stroke="%23ff66ff" stroke-width="2" fill="%23ff99ff"/></svg>') 16 16, auto !important;
    overflow-x: hidden;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
    position: relative;
}

/* Retro Banner */
.retro-banner {
    text-align: center;
    padding: 20px;
    margin-bottom: 20px;
    background-color: #660066;
    color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(102, 0, 102, 0.3);
}

.banner-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.retro-banner h1 {
    margin: 0;
    font-size: 24px;
    letter-spacing: 2px;
}

/* Music Player Styles */
.music-controls {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(145deg, #ff80ff, #cc66cc);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 
        0 4px 15px rgba(102, 0, 102, 0.4),
        inset 0 -2px 10px rgba(255, 255, 255, 0.2);
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 250px;
}

.music-info {
    color: white;
    font-size: 0.8em;
    text-align: center;
    margin-bottom: 15px;
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 12px;
}

#song-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-size: 1.1em;
}

#time-info {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
}

.music-controls-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
    width: 100%;
}

.music-button {
    width: 45px;
    height: 45px;
    background: linear-gradient(145deg, #ff99ff, #cc66cc);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 4px 8px rgba(0, 0, 0, 0.2),
        inset 0 -2px 5px rgba(0, 0, 0, 0.1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.music-button:hover {
    transform: translateY(-2px);
    background: linear-gradient(145deg, #ffb3ff, #dd77dd);
    box-shadow: 
        0 6px 12px rgba(0, 0, 0, 0.3),
        inset 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.music-button:active {
    transform: translateY(1px);
    box-shadow: 
        0 2px 4px rgba(0, 0, 0, 0.2),
        inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.music-button.playing {
    background: linear-gradient(145deg, #dd77dd, #bb55bb);
    animation: softPulse 2s infinite;
}

.volume-control {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 12px;
}

.volume-control span {
    color: white;
    font-size: 1.1em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.volume-slider {
    flex-grow: 1;
    height: 6px;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    outline: none;
    overflow: hidden;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 
        -100vw 0 0 100vw rgba(255, 255, 255, 0.4),
        0 2px 4px rgba(0, 0, 0, 0.2);
}

.volume-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.volume-slider::-webkit-slider-thumb:hover,
.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
    background: #ffffff;
}

@keyframes softPulse {
    0% { opacity: 1; }
    50% { opacity: 0.8; }
    100% { opacity: 1; }
}

/* Responsive Design for Music Player */
@media (max-width: 600px) {
    .music-controls {
        right: 10px;
        bottom: 10px;
        padding: 15px;
        min-width: 200px;
    }

    .music-info {
        font-size: 0.7em;
    }

    .music-button {
        width: 40px;
        height: 40px;
        font-size: 1em;
    }

    .volume-control {
        padding: 8px;
    }
}
/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(102, 0, 102, 0.2);
}

.intro-text {
    margin: 10px 0;
    font-size: 16px;
    color: #660066;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Status Bars */
.status-bars {
    max-width: 400px;
    margin: 20px auto;
}

.status-label {
    margin-bottom: 5px;
    color: #660066;
    font-size: 0.9em;
}

.status-container {
    width: 100%;
    height: 20px;
    background-color: rgba(255, 255, 255, 0.3);
    border: 2px solid #660066;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.status-bar {
    width: 100%;
    height: 100%;
    background-color: #ff66ff;
    transition: width 0.3s ease;
}

/* Cat Container */
.cat-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    border: 2px dashed #ff66ff;
    padding: 10px;
    overflow: hidden;
}

/* Pet Controls */
.pet-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.action-button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #ff66ff;
    color: white;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9em;
    transition: transform 0.2s;
}

.action-button:hover {
    transform: scale(1.1);
    background-color: #ff33ff;
}

.action-button:active {
    transform: scale(0.9);
}

/* Community Section */
.community-section {
    margin-top: 30px;
    text-align: center;
}

.community-section h2 {
    color: #660066;
    font-size: 1.2em;
    margin-bottom: 15px;
}

.community-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.visitor-count {
    font-size: 0.9em;
    color: #660066;
}

/* Animations */
@keyframes scroll-text {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

@keyframes like-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

#reaction {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    opacity: 0;
    pointer-events: none;
}

#reaction.show {
    animation: float-up 2s ease-out forwards;
}

@keyframes float-up {
    0% {
        transform: translate(-50%, -50%);
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -200%);
        opacity: 0;
    }
}

/* Canvas Styling */
canvas {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    width: 256px;
    height: 256px;
    margin: auto;
    display: block;
}

/* Footer */
.retro-footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8em;
    color: #660066;
}

.social-media-links {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
}

.social-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(to bottom right, #ff99ff, #ff66ff);
    color: #fff;
    text-decoration: none;
    font-size: 1.2em;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.social-button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(255, 102, 255, 0.4);
    background: linear-gradient(to bottom right, #ff66ff, #ff33ff);
}

/* Responsive Design */
@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 10px;
    }

    .retro-banner h1 {
        font-size: 18px;
    }

    .cat-container {
        width: 100%;
        height: auto;
        aspect-ratio: 1;
    }

    .pet-controls {
        flex-direction: column;
    }

    .action-button {
        width: 100%;
    }

    .music-controls {
        right: 10px;
        bottom: 10px;
        padding: 10px;
    }

    .music-info {
        width: 150px;
        font-size: 0.6em;
    }

    .music-button {
        padding: 6px 12px;
        font-size: 0.7em;
    }
}

/* Customization Panel */
.customization-panel {
    position: fixed;
    left: 20px;
    top: 100px;
    width: 180px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 15px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7em;
    border: 2px solid #ff66ff;
}

.customization-panel h2 {
    color: #660066;
    font-size: 1em;
    margin: 10px 0;
}

.customization-panel h3 {
    color: #660066;
    font-size: 0.8em;
    margin: 8px 0;
}

.customization-section {
    margin-bottom: 15px;
}

.customization-section select {
    width: 100%;
    padding: 5px;
    margin: 3px 0;
    border: 2px solid #ff66ff;
    border-radius: 5px;
    background: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8em;
}

.color-picker {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.color-picker label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.color-picker input[type="color"] {
    width: 40px;
    height: 20px;
    border: 2px solid #ff66ff;
    padding: 0;
}

.accessory-toggles {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.accessory-toggles label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.accessory-toggles input[type="checkbox"] {
    width: 12px;
    height: 12px;
}

#randomize {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.9em;
    background: #ff66ff;
    border: none;
    border-radius: 5px;
    color: white;
    cursor: pointer;
}

/* Old mobile styles removed - see comprehensive mobile styles at end of file */

/* Custom Scrollbar Styles */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #ffecff;
    border: 2px solid #ff99ff;
}

::-webkit-scrollbar-thumb {
    background: #ff99ff;
    border: 2px solid #ff66ff;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff66ff;
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #ff99ff #ffecff;
}

/* For when the scrollbar corner is visible */
::-webkit-scrollbar-corner {
    background: #ffecff;
}

/* Custom Cursor Styles */
/* Clickable elements - sparkle/star */
button, 
a, 
select, 
input[type="color"],
input[type="checkbox"],
.customization-panel select,
.like-button,
.social-button,
[role="button"] {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M16 4 L18 14 L28 16 L18 18 L16 28 L14 18 L4 16 L14 14 Z" fill="%23ff66ff"/></svg>') 16 16, pointer !important;
}

/* Text input areas - pencil */
input[type="text"], 
textarea {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path d="M8 24 L16 8 L24 16 L8 24" stroke="%23ff66ff" stroke-width="2" fill="%23ff99ff"/></svg>') 8 24, text !important;
}

.room-container {
    display: none;
}

.room-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 10px;
}

.room-controls select {
    padding: 5px;
    border-radius: 5px;
    border: 2px solid #ff99ff;
    background: #fff;
    color: #666;
    font-family: 'Press Start 2P', cursive;
    font-size: 8px;
}

#petRoom canvas {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
}

/* Game Panel */
.game-panel {
    position: fixed;
    right: 20px;
    top: 20px;
    width: 250px;
    height: 290px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 0 20px rgba(255, 0, 255, 0.3);
    border: 2px solid #ff66ff;
    text-align: center;
}

.game-panel h3 {
    color: #660066;
    font-size: 0.7em;
    margin: 2px 0 5px 0;
}

#game-container {
    width: 220px;
    height: 220px;
    background: rgba(255, 230, 255, 0.5);
    border: 2px solid #ff99ff;
    border-radius: 10px;
    margin: 0 auto 10px auto;
    overflow: hidden;
}

.game-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px;
    margin-top: 3px;
}

#startGameBtn {
    font-size: 0.6em;
    padding: 3px 8px;
}

.score-display {
    font-family: 'Press Start 2P', cursive;
    color: #660066;
    font-size: 0.6em;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .game-panel {
        position: static;
        width: auto;
        margin: 20px 10px;
    }
}

/* Global Chat Styles */
.chat-section {
    background: linear-gradient(135deg, #fff5ff 0%, #ffe6ff 100%);
    border: 3px solid #ff66ff;
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    box-shadow: 0 4px 8px rgba(255, 0, 255, 0.2);
}

.chat-section h3 {
    margin: 0 0 10px 0;
    color: #660066;
    font-size: 0.8em;
    text-align: center;
}

.chat-messages {
    border: 2px solid #ff99ff;
    border-radius: 8px;
    padding: 10px;
    height: 200px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.8);
    margin-bottom: 10px;
    font-size: 0.6em;
    scrollbar-width: thin;
    scrollbar-color: #ff66ff #fff5ff;
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #fff5ff;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ff66ff;
    border-radius: 4px;
}

.chat-message {
    padding: 5px 0;
    border-bottom: 1px solid #ffccff;
    color: #660066;
    word-wrap: break-word;
}

.chat-message:last-child {
    border-bottom: none;
}

.chat-username {
    color: #ff0099;
    font-weight: bold;
}

.chat-text {
    color: #660066;
}

.chat-time {
    color: #999999;
    font-size: 0.8em;
    margin-left: 5px;
}

.chat-empty,
.chat-loading,
.chat-error {
    text-align: center;
    color: #999999;
    padding: 20px;
    font-size: 0.6em;
}

.chat-error {
    color: #ff0000;
}

.chat-input-container {
    display: flex;
    gap: 8px;
}

.chat-input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid #ff99ff;
    border-radius: 6px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6em;
    background: white;
    color: #660066;
    outline: none;
    transition: border-color 0.3s;
}

.chat-input:focus {
    border-color: #ff0099;
    box-shadow: 0 0 5px rgba(255, 0, 153, 0.3);
}

.chat-send-button {
    padding: 8px 15px;
    background: linear-gradient(135deg, #ff66ff 0%, #ff99ff 100%);
    border: 2px solid #ff0099;
    border-radius: 6px;
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.chat-send-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(255, 0, 153, 0.4);
}

.chat-send-button:active {
    transform: scale(0.95);
}

/* Authentication Modal Styles */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ff99ff 0%, #ffccff 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    font-family: 'Press Start 2P', cursive;
}

.auth-container {
    background: white;
    border: 4px solid #660066;
    border-radius: 15px;
    padding: 40px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(102, 0, 102, 0.5);
    text-align: center;
}

.auth-container h1 {
    color: #660066;
    margin: 0 0 30px 0;
    font-size: 1.5em;
}

.auth-form h2 {
    color: #ff0099;
    margin: 0 0 20px 0;
    font-size: 1em;
}

.auth-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid #ff99ff;
    border-radius: 8px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6em;
    background: #fff5ff;
    color: #660066;
    box-sizing: border-box;
    outline: none;
    transition: border-color 0.3s;
}

.auth-input:focus {
    border-color: #ff0099;
    box-shadow: 0 0 8px rgba(255, 0, 153, 0.3);
}

.auth-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #ff66ff 0%, #ff99ff 100%);
    border: 2px solid #ff0099;
    border-radius: 8px;
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 15px;
}

.auth-button:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(255, 0, 153, 0.4);
}

.auth-button:active {
    transform: scale(0.95);
}

.auth-toggle {
    color: #660066;
    font-size: 0.6em;
    margin: 15px 0 0 0;
}

.auth-toggle a {
    color: #ff0099;
    text-decoration: none;
    cursor: pointer;
    font-weight: bold;
}

.auth-toggle a:hover {
    text-decoration: underline;
}

.auth-error {
    background: #ffcccc;
    border: 2px solid #ff0000;
    color: #660000;
    padding: 10px;
    border-radius: 6px;
    margin-top: 15px;
    font-size: 0.6em;
    display: none;
}

/* User Info Bar */
.user-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #fff5ff 0%, #ffe6ff 100%);
    border: 2px solid #ff66ff;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 15px;
    font-size: 0.65em;
    color: #660066;
}

#current-user {
    color: #ff0099;
}

.logout-button {
    padding: 6px 12px;
    background: linear-gradient(135deg, #ff6666 0%, #ff9999 100%);
    border: 2px solid #ff0000;
    border-radius: 6px;
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6em;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.logout-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(255, 0, 0, 0.3);
}

.logout-button:active {
    transform: scale(0.95);
}

/* Enhanced Chat Styles */
.chat-emoji-picker {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    background: white;
    border: 2px solid #ff99ff;
    border-radius: 8px;
    padding: 8px;
    margin-bottom: 10px;
    max-height: 120px;
    overflow-y: auto;
}

.emoji-btn {
    background: #fff5ff;
    border: 1px solid #ffccff;
    border-radius: 4px;
    padding: 5px;
    cursor: pointer;
    font-size: 1.2em;
    transition: all 0.2s;
}

.emoji-btn:hover {
    background: #ffccff;
    transform: scale(1.1);
}

.emoji-toggle-button {
    padding: 8px 12px;
    background: #fff5ff;
    border: 2px solid #ff99ff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    transition: all 0.3s;
}

.emoji-toggle-button:hover {
    background: #ffccff;
}

.chat-message {
    padding: 8px 0;
    border-bottom: 1px solid #ffccff;
    margin-bottom: 8px;
}

.chat-message:last-child {
    border-bottom: none;
}

.chat-message-content {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.6em;
    position: relative;
    padding: 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.5);
}

.chat-message-content.own-message {
    background: rgba(255, 102, 255, 0.15);
    margin-left: 20px;
}

.chat-username {
    color: #ff0099;
    font-weight: bold;
    min-width: 80px;
    word-break: break-word;
}

.chat-text {
    color: #660066;
    flex: 1;
    word-break: break-word;
}

.chat-time {
    color: #999999;
    font-size: 0.8em;
    white-space: nowrap;
    margin-left: auto;
}

.delete-message-btn {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #ff0000;
    color: #ff0000;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8em;
    transition: all 0.2s;
    margin-left: 5px;
}

.delete-message-btn:hover {
    background: rgba(255, 0, 0, 0.4);
}

.chat-reactions {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-top: 4px;
    margin-left: 5px;
}

.reaction-btn {
    background: #fff5ff;
    border: 1px solid #ffccff;
    border-radius: 12px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 0.7em;
    transition: all 0.2s;
}

.reaction-btn:hover {
    background: #ffccff;
    transform: scale(1.1);
}

.add-reaction-btn {
    background: transparent;
    border: 1px dashed #ff99ff;
    border-radius: 12px;
    padding: 2px 6px;
    cursor: pointer;
    font-size: 0.7em;
    transition: all 0.2s;
    color: #ff99ff;
}

.add-reaction-btn:hover {
    border: 1px solid #ff99ff;
    background: rgba(255, 153, 255, 0.1);
}

.reaction-picker {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 3px;
    background: white;
    border: 1px solid #ffccff;
    border-radius: 6px;
    padding: 5px;
    margin-top: 4px;
    margin-left: 5px;
    max-width: 120px;
}

.reaction-picker.active {
    display: grid;
}

.reaction-picker button {
    background: #fff5ff;
    border: 1px solid #ffccff;
    border-radius: 4px;
    padding: 3px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s;
}

.reaction-picker button:hover {
    background: #ffccff;
    transform: scale(1.1);
}

.chat-empty,
.chat-loading,
.chat-error {
    text-align: center;
    color: #999999;
    padding: 20px;
    font-size: 0.6em;
}

.chat-error {
    color: #ff0000;
}

/* ==========================================
   DARK MODE STYLES
   ========================================== */
body.dark-mode {
    background-color: #1a1a2e;
    color: #e0e0e0;
}

body.dark-mode .container {
    background-color: rgba(30, 30, 50, 0.95);
    box-shadow: 0 0 20px rgba(100, 0, 150, 0.4);
}

body.dark-mode .customization-panel,
body.dark-mode .controls-section,
body.dark-mode .chat-section,
body.dark-mode .feature-section {
    background: linear-gradient(135deg, #2a2a4a 0%, #1a1a3a 100%);
    border-color: #4a4a6a;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
    color: #ff99ff;
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background-color: #2a2a4a;
    border-color: #4a4a6a;
    color: #e0e0e0;
}

body.dark-mode .action-button {
    background: linear-gradient(135deg, #6a3a8a 0%, #4a2a6a 100%);
}

body.dark-mode .stat-bar-fill {
    box-shadow: 0 0 10px rgba(255, 0, 255, 0.6);
}

/* ==========================================
   SETTINGS BAR STYLES
   ========================================== */
.settings-bar {
    position: fixed;
    top: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 1000;
}

.settings-btn,
.settings-button {
    padding: 6px 10px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.45em;
    border: 2px solid #cc66cc;
    border-radius: 20px;
    background: linear-gradient(135deg, #ff99ff 0%, #cc66cc 100%);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
    text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
    box-shadow: 0 2px 8px rgba(204, 102, 204, 0.3);
}

.settings-btn:hover,
.settings-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 0, 255, 0.4);
}

body.dark-mode .settings-btn,
body.dark-mode .settings-button {
    background: linear-gradient(135deg, #6a3a8a 0%, #4a2a6a 100%);
    border-color: #8a4aaa;
    color: #e0e0e0;
}

/* ==========================================
   GAME BUTTONS - MATCHING AESTHETIC
   ========================================== */
.game-button {
    padding: 12px 16px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5em;
    border: 2px solid #cc66cc;
    border-radius: 12px;
    background: linear-gradient(135deg, #ff99ff 0%, #ff66ff 100%);
    color: #660066;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 3px 10px rgba(255, 102, 255, 0.3);
}

.game-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 0, 255, 0.4);
    background: linear-gradient(135deg, #ffaaff 0%, #ff77ff 100%);
}

.games-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ==========================================
   SECTION STYLING - CLEAN LAYOUT
   ========================================== */
.achievements-section,
.mini-games-section,
.showcase-section,
.battles-section,
.pet-sitting-section,
.challenges-section,
.profile-section {
    background: linear-gradient(135deg, #fff5ff 0%, #ffe5ff 100%);
    border: 2px solid #ffccff;
    border-radius: 15px;
    padding: 15px;
    margin: 15px 0;
}

.achievements-section h2,
.mini-games-section h2,
.showcase-section h2,
.battles-section h2,
.pet-sitting-section h2,
.challenges-section h2,
.profile-section h2 {
    font-size: 0.8em;
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #ffccff;
    color: #660066;
}

/* Pet Name Section */
.pet-name-section {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.pet-name-input {
    padding: 8px 12px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5em;
    border: 2px solid #ff99ff;
    border-radius: 8px;
    background: white;
    color: #660066;
    min-width: 150px;
}

.pet-name-display {
    font-size: 0.6em;
    color: #ff66ff;
    text-align: center;
    width: 100%;
    margin-top: 5px;
}

/* Streak Section */
.streak-section {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cc 100%);
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 12px 20px;
    margin: 15px 0;
    text-align: center;
}

.streak-display {
    font-size: 0.9em;
    color: #ff6f00;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#streak-count {
    font-size: 1.4em;
    font-weight: bold;
    color: #e65100;
}

.streak-reward {
    font-size: 0.5em;
    color: #4caf50;
    margin-top: 8px;
}

/* ==========================================
   ACHIEVEMENTS STYLES
   ========================================== */
#achievements-container,
.achievements-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    max-height: 250px;
    overflow-y: auto;
    padding: 5px;
}

.achievement {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 8px;
    background: #fff;
    border: 2px solid #eee;
    transition: all 0.3s;
    font-size: 0.9em;
}

.achievement.unlocked {
    border-color: #ffd700;
    background: linear-gradient(135deg, #fff9e6 0%, #fffde7 100%);
    box-shadow: 0 0 8px rgba(255, 215, 0, 0.3);
}

.achievement.locked {
    opacity: 0.5;
    filter: grayscale(60%);
}

.achievement-icon {
    font-size: 1.2em;
}

.achievement-info {
    flex: 1;
    min-width: 0;
}

.achievement-name {
    font-size: 0.5em;
    font-weight: bold;
    color: #660066;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.achievement-desc {
    font-size: 0.4em;
    color: #888;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.achievement-check {
    color: #4caf50;
    font-weight: bold;
    font-size: 0.8em;
}

.achievement-lock {
    font-size: 0.7em;
    opacity: 0.5;
}

/* ==========================================
   MINI GAMES STYLES
   ========================================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.game-card {
    text-align: center;
    padding: 15px;
    background: linear-gradient(135deg, #fff 0%, #ffe5ff 100%);
    border: 2px solid #ff99ff;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.game-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(255, 0, 255, 0.3);
}

.game-icon {
    font-size: 2em;
    margin-bottom: 10px;
}

.game-name {
    font-size: 0.5em;
    color: #660066;
}

/* Game Modal */
.game-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(102, 0, 102, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.game-container,
.game-modal-content {
    background: linear-gradient(135deg, #fff5ff 0%, #ffe5ff 100%);
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    border: 3px solid #ff99ff;
    box-shadow: 0 10px 40px rgba(255, 0, 255, 0.4);
}

.game-container h3 {
    margin: 0 0 15px 0;
    color: #660066;
    font-size: 0.9em;
}

#close-game,
.close-game-btn {
    margin-top: 15px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #ff99ff 0%, #cc66cc 100%);
    border: 2px solid #cc66cc;
    border-radius: 20px;
    color: white;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5em;
    cursor: pointer;
    transition: all 0.3s;
}

#close-game:hover,
.close-game-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 0, 255, 0.4);
}

/* Catch Game */
.catch-area {
    position: relative;
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-radius: 10px;
    overflow: hidden;
}

.fish-target {
    position: absolute;
    font-size: 1.5em;
    cursor: pointer;
    animation: swim 0.5s ease-in-out infinite alternate;
    transition: transform 0.1s;
}

.fish-target:hover {
    transform: scale(1.3);
}

@keyframes swim {
    from { transform: rotate(-10deg); }
    to { transform: rotate(10deg); }
}

/* Memory Game */
.memory-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 10px;
}

.memory-card {
    aspect-ratio: 1;
    background: linear-gradient(135deg, #ff99ff 0%, #ff66ff 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5em;
    cursor: pointer;
    transition: all 0.3s;
}

.memory-card.flipped {
    background: #fff;
    transform: rotateY(180deg);
}

/* Clicker Game */
.clicker-btn {
    font-size: 4em;
    padding: 20px 40px;
    border: none;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff99ff 0%, #ff66ff 100%);
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 5px 20px rgba(255, 0, 255, 0.4);
}

.clicker-btn:hover {
    transform: scale(1.1);
}

/* ==========================================
   PET SHOWCASE / LEADERBOARD STYLES
   ========================================== */
.showcase-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 15px;
}

.showcase-tab {
    flex: 1;
    padding: 10px;
    background: #fff;
    border: 2px solid #ff99ff;
    border-radius: 8px 8px 0 0;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5em;
    cursor: pointer;
    transition: all 0.3s;
}

.showcase-tab.active {
    background: linear-gradient(135deg, #ff99ff 0%, #ff66ff 100%);
    color: white;
}

.leaderboard-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 8px;
}

.leaderboard-item .rank {
    font-size: 0.8em;
    font-weight: bold;
    color: #ffd700;
    width: 40px;
}

.leaderboard-item .rank:nth-child(1) { color: #ffd700; }
.leaderboard-item:nth-child(2) .rank { color: #c0c0c0; }
.leaderboard-item:nth-child(3) .rank { color: #cd7f32; }

.leaderboard-item .name {
    flex: 1;
    font-size: 0.6em;
}

.leaderboard-item .score {
    font-size: 0.6em;
    color: #ff66ff;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.gallery-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #ff99ff;
}

.gallery-item img {
    width: 100%;
    height: 80px;
    object-fit: contain;
    background: #fff5ff;
}

.gallery-info {
    padding: 8px;
    font-size: 0.4em;
    text-align: center;
}

.gallery-info button {
    margin-top: 5px;
    padding: 5px 10px;
    background: #ff99ff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.8em;
}

/* ==========================================
   PET BATTLES STYLES
   ========================================== */
.battle-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.6em;
}

.battle-stat {
    display: flex;
    align-items: center;
    gap: 5px;
}

#battle-arena {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    min-height: 150px;
}

.battle-display {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 20px;
}

.battler {
    text-align: center;
}

.battler-cat {
    font-size: 3em;
    animation: battleBounce 0.5s ease-in-out infinite alternate;
}

@keyframes battleBounce {
    from { transform: translateY(0); }
    to { transform: translateY(-10px); }
}

.vs {
    font-size: 1.5em;
    font-weight: bold;
    color: #ff0000;
}

.battle-moves {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.battle-moves button {
    padding: 10px 15px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.5em;
    border: 2px solid #660066;
    border-radius: 8px;
    background: linear-gradient(135deg, #ff99ff 0%, #ff66ff 100%);
    cursor: pointer;
    transition: all 0.3s;
}

.battle-moves button:hover {
    transform: scale(1.1);
}

/* ==========================================
   PET SITTING STYLES
   ========================================== */
.pet-sitting-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 2px solid #ffccff;
    border-radius: 8px;
    margin-bottom: 10px;
}

.sitting-info {
    font-size: 0.5em;
}

/* ==========================================
   COMMUNITY CHALLENGES STYLES
   ========================================== */
.challenge-card {
    background: #fff;
    border: 2px solid #ff99ff;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
}

.challenge-card.completed {
    border-color: #4caf50;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.challenge-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.6em;
}

.completed-badge {
    background: #4caf50;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.8em;
}

.challenge-card p {
    font-size: 0.5em;
    color: #666;
    margin: 0 0 10px 0;
}

.challenge-progress-bar {
    height: 10px;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 8px;
}

.challenge-progress {
    height: 100%;
    background: linear-gradient(90deg, #ff99ff 0%, #ff66ff 100%);
    transition: width 0.3s;
}

.challenge-footer {
    display: flex;
    justify-content: space-between;
    font-size: 0.45em;
    color: #888;
}

.challenge-reward {
    color: #4caf50;
}

/* ==========================================
   USER PROFILE STYLES
   ========================================== */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.profile-stat {
    background: #fff;
    border: 2px solid #ff99ff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.stat-icon {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 1em;
    font-weight: bold;
    color: #ff66ff;
}

.stat-label {
    font-size: 0.4em;
    color: #888;
    margin-top: 5px;
}

/* ==========================================
   FRIENDS SYSTEM STYLES
   ========================================== */
.friends-section {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #ff99ff;
    border-radius: 10px;
}

.friends-section h3 {
    font-size: 0.8em;
    color: #660066;
    margin: 0 0 15px 0;
    text-align: center;
}

.add-friend-container {
    display: flex;
    gap: 8px;
    margin-bottom: 15px;
}

.friend-input {
    flex: 1;
    padding: 10px;
    border: 2px solid #ff99ff;
    border-radius: 8px;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.6em;
    background: white;
    color: #660066;
    outline: none;
}

.friend-input:focus {
    border-color: #ff0099;
}

.friend-btn {
    padding: 10px 15px;
    font-size: 0.6em;
    white-space: nowrap;
}

.friend-requests {
    margin-bottom: 15px;
}

.friend-request-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: linear-gradient(135deg, #fff5ff 0%, #ffe6ff 100%);
    border: 2px solid #ffcc00;
    border-radius: 8px;
    margin-bottom: 8px;
}

.friend-request-info {
    font-size: 0.6em;
    color: #660066;
}

.friend-request-actions {
    display: flex;
    gap: 5px;
}

.friend-request-actions button {
    padding: 5px 10px;
    font-size: 0.5em;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
}

.accept-btn {
    background: #66ff66;
    color: #006600;
}

.decline-btn {
    background: #ff6666;
    color: #660000;
}

.friends-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.friend-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    background: #fff;
    border: 2px solid #ff99ff;
    border-radius: 8px;
    text-align: center;
}

.friend-avatar {
    font-size: 1.5em;
    margin-bottom: 5px;
}

.friend-name {
    font-size: 0.55em;
    color: #660066;
    word-break: break-word;
}

.friend-status {
    font-size: 0.4em;
    color: #66cc66;
    margin-top: 3px;
}

.friend-status.offline {
    color: #999;
}

/* ==========================================
   USER PROFILE POPUP STYLES
   ========================================== */
.user-profile-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(3px);
}

.user-profile-content {
    background: linear-gradient(135deg, #fff5ff 0%, #ffe6ff 100%);
    border: 3px solid #ff66ff;
    border-radius: 15px;
    padding: 25px;
    max-width: 350px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 30px rgba(255, 0, 255, 0.3);
    animation: popupSlide 0.3s ease;
}

@keyframes popupSlide {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close-popup {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff6666;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 1em;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-popup:hover {
    background: #ff3333;
}

.profile-header {
    text-align: center;
    margin-bottom: 20px;
}

.profile-avatar {
    font-size: 3em;
    margin-bottom: 10px;
}

.profile-header h3 {
    color: #660066;
    font-size: 0.9em;
    margin: 0;
}

.profile-popup-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 20px;
}

.popup-stat {
    background: white;
    border: 2px solid #ff99ff;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
}

.popup-stat-value {
    display: block;
    font-size: 1em;
    color: #ff66ff;
    font-weight: bold;
}

.popup-stat-label {
    display: block;
    font-size: 0.4em;
    color: #888;
    margin-top: 5px;
}

.profile-popup-actions {
    text-align: center;
}

.profile-popup-actions .action-button {
    width: 100%;
}

.popup-status {
    text-align: center;
    font-size: 0.6em;
    margin-top: 10px;
    color: #660066;
}

.chat-username {
    cursor: pointer;
    transition: color 0.2s;
}

.chat-username:hover {
    color: #ff00ff;
    text-decoration: underline;
}

.remove-friend-btn {
    margin-top: 5px;
    padding: 3px 8px;
    font-size: 0.4em;
    background: #ffcccc;
    color: #660000;
    border: 1px solid #ff9999;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Press Start 2P', cursive;
}

.no-friends-message {
    grid-column: 1 / -1;
    text-align: center;
    font-size: 0.6em;
    color: #999;
    padding: 20px;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */
@media (max-width: 600px) {
    .settings-bar {
        flex-direction: column;
        right: 5px;
    }
    
    .settings-btn {
        font-size: 0.4em;
        padding: 6px 8px;
    }
    
    .games-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .battle-display {
        flex-direction: column;
        gap: 10px;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   MOBILE LAYOUT - COMPREHENSIVE REDESIGN
   ========================================== */
@media (max-width: 768px) {
    /* Base adjustments */
    body {
        padding: 5px;
        font-size: 12px;
    }
    
    .container {
        display: flex;
        flex-direction: column;
        padding: 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Ordering - Cat section at the TOP */
    .retro-banner { order: 1; }
    .cat-section { order: 2; }
    .pet-controls { order: 3; }
    .pet-name-section { order: 4; }
    .streak-section { order: 5; }
    .customization-panel { order: 6; }
    .achievements-section { order: 7; }
    .mini-games-section { order: 8; }
    .showcase-section { order: 9; }
    .battles-section { order: 10; }
    .pet-sitting-section { order: 11; }
    .challenges-section { order: 12; }
    .profile-section { order: 13; }
    .community-section { order: 14; }
    .music-controls { order: 15; }
    .welcome-section { display: none; } /* Hide on mobile for cleaner look */
    
    /* Banner - Smaller */
    .retro-banner {
        padding: 10px;
        margin-bottom: 10px;
    }
    
    .retro-banner h1 {
        font-size: 14px;
        letter-spacing: 1px;
    }
    
    .banner-content {
        gap: 8px;
    }
    
    /* Cat Section - Prominent at top */
    .cat-section {
        width: 100%;
        margin: 0 auto;
    }
    
    .cat-container {
        width: 100%;
        height: 220px;
        margin: 10px auto;
        border-radius: 15px;
    }
    
    /* Status bars - More compact */
    .status-bars {
        width: 100%;
        max-width: 100%;
        margin: 10px auto;
    }
    
    .status-label {
        font-size: 0.7em;
        margin-bottom: 3px;
    }
    
    .status-container {
        height: 16px;
        margin-bottom: 10px;
    }
    
    /* Pet controls - Grid layout for better touch targets */
    .pet-controls {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        width: 100%;
        margin: 10px 0;
    }
    
    .action-button {
        padding: 12px 8px;
        font-size: 0.6em;
        width: 100%;
        border-radius: 10px;
    }
    
    /* Pet name section */
    .pet-name-section {
        width: 100%;
        margin: 10px 0;
    }
    
    .pet-name-input {
        width: 100%;
        font-size: 0.7em;
        padding: 10px;
        box-sizing: border-box;
    }
    
    /* Streak section */
    .streak-section {
        width: 100%;
        text-align: center;
        padding: 10px;
        margin: 10px 0;
    }
    
    .streak-display {
        font-size: 0.8em;
    }
    
    /* Customization Panel - Collapsible look on mobile */
    .customization-panel {
        position: relative;
        left: auto;
        top: auto;
        width: 100%;
        max-height: none;
        margin: 10px 0;
        padding: 15px;
        box-sizing: border-box;
        font-size: 0.7em;
    }
    
    .customization-panel h2 {
        font-size: 0.9em;
        margin: 10px 0 5px 0;
    }
    
    .customization-panel h3 {
        font-size: 0.75em;
        margin: 8px 0 5px 0;
    }
    
    .customization-section {
        margin-bottom: 10px;
    }
    
    .customization-panel select {
        width: 100%;
        font-size: 0.8em;
        padding: 8px;
        margin-bottom: 8px;
    }
    
    .color-picker {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px;
        align-items: center;
    }
    
    .color-picker label {
        font-size: 0.7em;
    }
    
    .color-picker input[type="color"] {
        width: 50px;
        height: 30px;
        padding: 0;
        border: 2px solid #ff99ff;
        border-radius: 5px;
        cursor: pointer;
        -webkit-appearance: none;
        appearance: none;
    }
    
    .color-picker input[type="color"]::-webkit-color-swatch-wrapper {
        padding: 2px;
    }
    
    .color-picker input[type="color"]::-webkit-color-swatch {
        border-radius: 3px;
        border: none;
    }
    
    .accessory-toggles {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 5px;
    }
    
    .accessory-toggles label {
        font-size: 0.65em;
        padding: 6px;
    }
    
    /* Achievements section */
    .achievements-section {
        width: 100%;
        margin: 10px 0;
        padding: 10px;
    }
    
    .achievements-section h2 {
        font-size: 0.9em;
    }
    
    .achievements-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .achievement-badge {
        padding: 8px;
        font-size: 0.55em;
    }
    
    /* Mini games section */
    .mini-games-section {
        width: 100%;
        margin: 10px 0;
        padding: 10px;
    }
    
    .mini-games-section h2 {
        font-size: 0.9em;
    }
    
    .games-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    
    .game-button {
        padding: 12px 8px;
        font-size: 0.6em;
    }
    
    /* Showcase/Gallery section */
    .showcase-section {
        width: 100%;
        margin: 10px 0;
        padding: 10px;
    }
    
    .showcase-section h2 {
        font-size: 0.9em;
    }
    
    .showcase-tabs {
        display: flex;
        gap: 5px;
    }
    
    .showcase-tab {
        flex: 1;
        font-size: 0.55em;
        padding: 8px;
    }
    
    .leaderboard-list {
        font-size: 0.65em;
    }
    
    .leaderboard-item {
        padding: 8px;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .gallery-item {
        font-size: 0.5em;
    }
    
    /* Battles section */
    .battles-section {
        width: 100%;
        margin: 10px 0;
        padding: 10px;
    }
    
    .battles-section h2 {
        font-size: 0.9em;
    }
    
    .battle-description {
        font-size: 0.6em;
    }
    
    .battle-btn {
        width: 100%;
    }
    
    .battle-arena {
        padding: 10px;
        font-size: 0.7em;
    }
    
    .battle-stats {
        font-size: 0.6em;
        gap: 15px;
    }
    
    /* Pet sitting section */
    .pet-sitting-section {
        width: 100%;
        margin: 10px 0;
        padding: 10px;
        box-sizing: border-box;
    }
    
    .pet-sitting-section h2 {
        font-size: 0.9em;
    }
    
    .pet-sitting-section p {
        font-size: 0.6em;
    }
    
    .pet-sitting-card {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 10px;
        font-size: 0.6em;
        text-align: center;
    }
    
    .pet-sitting-card .sitting-info {
        font-size: 0.7em;
        line-height: 1.4;
    }
    
    .pet-sitting-card .action-button {
        width: 100%;
        margin-top: 5px;
    }
    
    /* Challenges section */
    .challenges-section {
        width: 100%;
        margin: 10px 0;
        padding: 10px;
    }
    
    .challenges-section h2 {
        font-size: 0.9em;
    }
    
    .challenge-card {
        padding: 10px;
        font-size: 0.6em;
    }
    
    /* Profile section */
    .profile-section {
        width: 100%;
        margin: 10px 0;
        padding: 10px;
    }
    
    .profile-section h2 {
        font-size: 0.9em;
    }
    
    .profile-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .stat-item {
        padding: 10px;
    }
    
    .stat-value {
        font-size: 0.9em;
    }
    
    .stat-label {
        font-size: 0.5em;
    }
    
    /* Community/Chat section */
    .community-section {
        width: 100%;
        margin: 10px 0;
    }
    
    .user-info-bar {
        flex-direction: column;
        gap: 8px;
        text-align: center;
        font-size: 0.6em;
    }
    
    .logout-button {
        width: 100%;
    }
    
    .chat-section {
        padding: 10px;
    }
    
    .chat-section h3 {
        font-size: 0.7em;
    }
    
    .chat-messages {
        height: 150px;
        font-size: 0.55em;
    }
    
    .chat-input-container {
        flex-direction: column;
        gap: 8px;
    }
    
    .chat-input-container input {
        width: 100%;
        font-size: 0.7em;
        box-sizing: border-box;
    }
    
    .chat-input-container button {
        width: 100%;
    }
    
    .chat-input {
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    .chat-section {
        overflow: hidden;
    }
    
    /* Music controls - Bottom floating, more compact */
    .music-controls {
        position: fixed;
        bottom: 10px;
        right: 10px;
        left: 10px;
        width: auto;
        min-width: auto;
        padding: 10px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        z-index: 1000;
    }
    
    .music-info {
        width: 100%;
        font-size: 0.55em;
        padding: 6px;
        margin-bottom: 5px;
    }
    
    #song-title {
        font-size: 0.9em;
    }
    
    .music-controls-buttons {
        gap: 10px;
        margin-bottom: 8px;
    }
    
    .music-button {
        width: 36px;
        height: 36px;
        font-size: 0.9em;
    }
    
    .volume-control {
        width: 100%;
        padding: 5px;
    }
    
    .volume-control input[type="range"] {
        width: 100%;
    }
    
    /* Settings bar */
    .settings-bar {
        position: fixed;
        top: 5px;
        right: 5px;
        left: auto;
        flex-direction: row;
        gap: 5px;
        z-index: 1001;
    }
    
    .settings-btn {
        font-size: 0.5em;
        padding: 6px 10px;
    }
    
    /* Game modal */
    .game-modal {
        padding: 10px;
    }
    
    .game-container {
        width: 95%;
        max-height: 80vh;
        padding: 10px;
    }
    
    #game-area {
        max-height: 60vh;
    }
    
    #close-game {
        font-size: 0.7em;
        padding: 10px;
    }
    
    /* Auth modal */
    .auth-container {
        width: 95%;
        padding: 15px;
    }
    
    .auth-container h1 {
        font-size: 1em;
    }
    
    .auth-container h2 {
        font-size: 0.8em;
    }
    
    .auth-input {
        font-size: 0.7em;
        padding: 10px;
    }
    
    .auth-button {
        font-size: 0.7em;
        padding: 12px;
    }
    
    /* Friends section mobile */
    .friends-section {
        padding: 10px;
    }
    
    .friends-section h3 {
        font-size: 0.7em;
    }
    
    .add-friend-container {
        flex-direction: column;
    }
    
    .friend-input {
        width: 100%;
        box-sizing: border-box;
    }
    
    .friend-btn {
        width: 100%;
    }
    
    .friends-list {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .friend-card {
        padding: 8px;
    }
    
    .friend-name {
        font-size: 0.5em;
    }
    
    .friend-request-card {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    /* User profile popup mobile */
    .user-profile-content {
        padding: 15px;
        max-width: 95%;
    }
    
    .profile-avatar {
        font-size: 2em;
    }
    
    .profile-header h3 {
        font-size: 0.7em;
    }
    
    .profile-popup-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .popup-stat {
        padding: 8px;
    }
    
    .popup-stat-value {
        font-size: 0.8em;
    }
    
    .popup-stat-label {
        font-size: 0.35em;
    }
    
    /* Footer - Add spacing for fixed music controls */
    .retro-footer {
        margin-bottom: 120px;
    }
    
    /* General spacing fix at bottom for music player */
    .container {
        padding-bottom: 130px;
    }
}