* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Arial', sans-serif;
  background: #FFFFFF;
  height: 100vh;
  overflow: hidden;
  cursor: grab;
}

body:active {
  cursor: grabbing;
}

#game-container {
  width: 100vw;
  height: 100vh;
  transform-origin: center center;
  transition: transform 0.1s ease-out;
  position: relative;
}

.game-element {
  position: absolute;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border: 1px solid #E0E0E0;
  padding: 20px;
  font-size: 16px;
  color: #333;
  transition: all 0.2s ease-out;
  cursor: pointer;
}

#header {
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #ff6b6b;
  color: white;
  font-size: 24px;
  font-weight: bold;
  z-index: 100;
}

#nav-menu {
  top: 100px;
  left: 20px;
  background: #4ecdc4;
  width: 200px;
}

#main-content {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #45b7d1;
  width: 300px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: white;
}

#sidebar {
  top: 200px;
  right: 20px;
  background: #f9ca24;
  width: 180px;
  height: 150px;
}

#footer {
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #6c5ce7;
  color: white;
  width: 400px;
  text-align: center;
}

#score-display {
  position: absolute;
  color: #333;
  font-size: 18px;
  font-weight: bold;
  background: rgba(255,255,255,0.95);
  border: 2px solid #4CAF50;
  padding: 12px 20px;
  border-radius: 10px;
  z-index: 1001;
  box-shadow: 0 2px 15px rgba(0,0,0,0.15);
  min-width: 120px;
  text-align: center;
  transition: all 0.2s ease-out;
  cursor: pointer;
}

#health-display {
  position: absolute;
  color: #333;
  font-size: 16px;
  font-weight: bold;
  background: rgba(255,255,255,0.9);
  border: 1px solid #E0E0E0;
  padding: 15px;
  border-radius: 15px;
  z-index: 1000;
  min-width: 200px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  transition: all 0.2s ease-out;
  cursor: pointer;
}

#health-label {
  margin-bottom: 5px;
  font-size: 14px;
}

#health-bar-container {
  position: relative;
  background: #F5F5F5;
  border-radius: 10px;
  height: 20px;
  overflow: hidden;
  border: 1px solid #E0E0E0;
}

#health-bar {
  background: #4CAF50;
  height: 100%;
  width: 100%;
  border-radius: 10px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

#health-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
  color: #333;
  font-weight: bold;
  z-index: 1;
}


#game-over {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #f8f9fa;
  color: #333;
  text-align: center;
  font-family: 'Courier New', monospace;
  display: none;
  z-index: 2000;
  padding: 50px;
  margin: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

#game-over.show {
  display: flex;
}

#error-code {
  font-size: 120px;
  font-weight: bold;
  color: #dc3545;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

#game-over h2 {
  font-size: 28px;
  margin-bottom: 20px;
  color: #495057;
}

#game-over p {
  font-size: 16px;
  margin-bottom: 15px;
  line-height: 1.5;
}

#error-details {
  background: #e9ecef;
  padding: 20px;
  border-radius: 5px;
  margin: 20px 0;
  text-align: left;
  font-size: 14px;
  color: #6c757d;
}

#error-details p {
  margin-bottom: 5px;
}

#game-over button {
  background: #007bff;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 20px;
  transition: background 0.3s;
}

#game-over button:hover {
  background: #0056b3;
}

#start-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 3000;
}

#start-screen h1 {
  font-size: 48px;
  margin-bottom: 20px;
  text-align: center;
}

#start-screen p {
  font-size: 24px;
  margin-bottom: 40px;
  text-align: center;
}

#start-button {
  font-size: 24px;
  padding: 15px 30px;
  background: #ff6b6b;
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.3s;
}

#start-button:hover {
  background: #ff5252;
}

.popup {
  position: absolute;
  background: #ff9ff3;
  border: 3px solid #ff6b6b;
  border-radius: 12px;
  padding: 15px;
  font-size: 14px;
  z-index: 500;
  animation: popIn 0.3s ease-out;
  word-wrap: break-word;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-small {
  width: 120px;
  height: 80px;
  font-size: 12px;
  padding: 8px;
  border-width: 2px;
}

.popup-medium {
  width: 200px;
  height: 120px;
  font-size: 14px;
  padding: 15px;
}

.popup-large {
  width: 300px;
  height: 150px;
  font-size: 16px;
  padding: 20px;
  border-width: 4px;
  background: linear-gradient(45deg, #ff9ff3, #ffb3ff);
  font-weight: bold;
}

@keyframes popIn {
  from { transform: scale(0); }
  to { transform: scale(1); }
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #2d3436;
  color: white;
  padding: 15px;
  text-align: center;
  z-index: 800;
  transform: translateY(100%);
  transition: transform 0.3s ease-out;
}

.cookie-banner.show {
  transform: translateY(0);
}

.pigeon {
  position: absolute;
  font-size: 30px;
  z-index: 600;
  animation: fly 2s ease-in-out;
}

@keyframes fly {
  0% { transform: translateX(-100px); }
  50% { transform: translateX(0) rotate(10deg); }
  100% { transform: translateX(100px); }
}

.spinning {
  animation: spin 3s linear infinite;
  transform-origin: 25% 25%;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.popup-ad {
  position: fixed;
  background: linear-gradient(45deg, #ff0000, #ff6600);
  border: 5px solid #ffff00;
  border-radius: 15px;
  padding: 30px;
  color: white;
  font-weight: bold;
  z-index: 1500;
  box-shadow: 0 0 30px rgba(255,0,0,0.8);
  animation: blink 0.5s infinite;
  min-width: 350px;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0.7; }
}

.popup-ad button {
  margin-top: 20px;
  padding: 25px 50px;
  background: #00ff00;
  border: 3px solid #ffff00;
  border-radius: 10px;
  cursor: pointer;
  font-weight: bold;
  font-size: 20px;
  color: #000;
  animation: pulse 1s infinite;
  transition: all 0.3s ease;
  width: 60%;
  height: 50%;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-ad button:hover {
  transform: scale(1.1);
  background: #00cc00;
}

.physics-ad {
  border: 4px solid #ff0080 !important;
  box-shadow: 0 0 40px rgba(255, 0, 128, 0.6) !important;
  animation: physicsGlow 2s infinite !important;
}

@keyframes physicsGlow {
  0%, 100% { box-shadow: 0 0 40px rgba(255, 0, 128, 0.6); }
  50% { box-shadow: 0 0 60px rgba(255, 0, 128, 0.9); }
}

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

.despawn-warning {
  animation: despawnBlink 0.5s infinite !important;
  border: 3px solid #ff4444 !important;
}

@keyframes despawnBlink {
  0%, 50% { 
    opacity: 1; 
    box-shadow: 0 0 20px rgba(255, 68, 68, 0.8);
  }
  51%, 100% { 
    opacity: 0.4; 
    box-shadow: 0 0 40px rgba(255, 68, 68, 1);
  }
}

.notification {
  background: linear-gradient(135deg, #2196F3 0%, #1976D2 100%);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  color: white;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  animation: notificationSlide 0.3s ease-out;
}

.notification:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 25px rgba(0,0,0,0.4);
}

.notification-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.notification-title {
  font-weight: 600;
  font-size: 14px;
}

.notification-close {
  background: rgba(255,255,255,0.2);
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  font-weight: bold;
  transition: background 0.2s;
}

.notification-close:hover {
  background: rgba(255,255,255,0.3);
}

.notification-body {
  padding: 8px 16px 12px 16px;
  font-size: 13px;
  line-height: 1.4;
  opacity: 0.9;
}

.notification-small {
  width: 280px;
  min-height: 70px;
}

.notification-medium {
  width: 320px;
  min-height: 90px;
}

.notification-large {
  width: 380px;
  min-height: 110px;
}

.notification-large .notification-title {
  font-size: 15px;
}

.notification-large .notification-body {
  font-size: 14px;
}

@keyframes notificationSlide {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.dvd-logo {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  pointer-events: none;
  z-index: 200;
}

.dvd-logo img {
  filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}