* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #87CEEB, #98FB98);
    min-height: 100vh;
    padding: 20px;
}

.game-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

header {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 0;
}

.logo-container {
    display: flex;
    justify-content: center;
}

.logo {
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}



.game-area {
    position: relative;
}

.game-ui-overlay {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    pointer-events: none;
}

.coins-display {
    font-size: 1.4em;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 12px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    pointer-events: auto;
}

.audio-controls {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 10;
    display: flex;
    gap: 10px;
    pointer-events: auto;
}

.audio-btn {
    background: rgba(0, 0, 0, 0.3);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2em;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.audio-btn:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

.audio-btn:active {
    transform: scale(0.95);
}

.audio-btn.muted {
    opacity: 0.5;
}

/* Zoom control in bottom right corner */
.zoom-control {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    padding: 8px 12px;
    border-radius: 20px;
    pointer-events: auto;
}

.zoom-label {
    color: white;
    font-size: 1.2em;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.zoom-control input[type="range"] {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    border-radius: 4px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.zoom-control input[type="range"]::-webkit-slider-track {
    background: rgba(255, 255, 255, 0.3);
    height: 4px;
    border-radius: 4px;
}

.zoom-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.zoom-control input[type="range"]::-moz-range-track {
    background: rgba(255, 255, 255, 0.3);
    height: 4px;
    border-radius: 4px;
    border: none;
}

.zoom-control input[type="range"]::-moz-range-thumb {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Volume slider styles */
.volume-slider {
    position: absolute;
    top: 70px;
    left: 20px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    padding: 10px 15px;
    border-radius: 8px;
    display: none;
    z-index: 15;
    pointer-events: auto;
    min-width: 120px;
}

.volume-slider.show {
    display: block;
}

.volume-slider input[type="range"] {
    width: 100px;
    height: 5px;
    background: rgba(255, 255, 255, 0.3);
    outline: none;
    border-radius: 5px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.volume-slider input[type="range"]::-webkit-slider-track {
    background: rgba(255, 255, 255, 0.3);
    height: 5px;
    border-radius: 5px;
}

.volume-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 15px;
    height: 15px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-slider input[type="range"]::-moz-range-track {
    background: rgba(255, 255, 255, 0.3);
    height: 5px;
    border-radius: 5px;
    border: none;
}

.volume-slider input[type="range"]::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.volume-label {
    color: white;
    font-size: 0.8em;
    text-align: center;
    margin-bottom: 5px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}



h1 {
    color: #2E7D32;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.stats {
    display: flex;
    gap: 20px;
    font-size: 1.2em;
    font-weight: bold;
    color: #1B5E20;
}

.game-area {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    position: relative;
}

#phaser-game {
    border: 3px solid #4CAF50;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
    min-height: 600px;
}

#phaser-game canvas {
    display: block;
    cursor: pointer;
}

.controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.action-btn {
    padding: 12px 20px;
    font-size: 1.1em;
    border: none;
    border-radius: 25px;
    background: linear-gradient(45deg, #4CAF50, #66BB6A);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.action-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.blob-collection {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    padding: 15px;
    border: 2px solid #4CAF50;
}

.blob-collection h3 {
    color: #2E7D32;
    margin-bottom: 10px;
    text-align: center;
}

#blob-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.blob-card {
    background: white;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    border: 2px solid #81C784;
    transition: transform 0.2s ease;
}

.blob-card:hover {
    transform: scale(1.05);
}

.blob-emoji {
    font-size: 2em;
    margin-bottom: 5px;
}

.blob-image {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 5px;
    image-rendering: pixelated; /* Keeps pixel art crisp */
}

.blob-name {
    font-weight: bold;
    color: #2E7D32;
    margin-bottom: 3px;
}

.blob-happiness {
    font-size: 0.9em;
    color: #666;
}

.blob-rarity {
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
    margin: 2px 0;
}

.blob-personality {
    font-size: 0.8em;
    color: #666;
    font-style: italic;
    margin: 2px 0;
}

.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.collection-view-btn {
    padding: 8px 12px;
    font-size: 0.9em;
    border: none;
    border-radius: 15px;
    background: linear-gradient(45deg, #FF6B6B, #4ECDC4);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.collection-view-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Modal Styles */
.modal {
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8em;
}

.close {
    color: white;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close:hover {
    color: #FFD700;
}

.collection-stats {
    padding: 20px 30px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

.stat-number {
    font-size: 2em;
    font-weight: bold;
    display: block;
}

.full-collection {
    padding: 30px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.collection-card {
    background: white;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    border: 3px solid #E0E0E0;
    transition: all 0.3s ease;
    position: relative;
}

.collection-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.collection-card.adopted {
    border-color: #FF69B4;
    background: linear-gradient(135deg, #fff5f8 0%, #ffe0e6 100%);
}

.collection-card.adopted::before {
    content: "💖";
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF69B4;
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

/* Offline Progress Modal Styles */
.offline-progress-content {
    max-width: 600px;
}

.offline-progress-body {
    padding: 30px;
    max-height: 400px;
    overflow-y: auto;
}

.offline-summary {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
}

.offline-time {
    font-size: 1.2em;
    margin-bottom: 10px;
}

.coins-earned {
    font-size: 1.8em;
    font-weight: bold;
    color: #FFD700;
    margin: 10px 0;
}

.events-section {
    margin: 20px 0;
}

.events-section h3 {
    color: #2E7D32;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.event-item {
    background: #f8f9fa;
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: 10px;
    border-left: 4px solid #4CAF50;
    font-size: 1.1em;
}

.warning-item {
    background: #fff3cd;
    padding: 12px 15px;
    margin: 8px 0;
    border-radius: 10px;
    border-left: 4px solid #ffc107;
    color: #856404;
    font-size: 1.1em;
}

.modal-footer {
    padding: 20px 30px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 0 0 20px 20px;
}

.modal-footer .action-btn {
    padding: 12px 30px;
    font-size: 1.2em;
}