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

body {
  width: 350px;
  min-height: 500px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #D4A574 0%, #8B6F47 100%);
  color: #333;
}

.container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
}

.header h1 {
  font-size: 24px;
  font-weight: 700;
  color: white;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Mode Toggle */
.mode-toggle {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.1);
}

.mode-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  transition: all 0.3s ease;
}

.mode-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.mode-btn.active {
  background: white;
  color: #8B6F47;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Mode Content */
.mode-content {
  flex: 1;
  background: rgba(255, 255, 255, 0.95);
  padding: 16px;
  border-radius: 16px 16px 0 0;
  margin-top: 8px;
}

/* Popup Mode Styles */
.session-label {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #8B6F47;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.timer-display {
  font-size: 48px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  color: #333;
  text-align: center;
  margin-bottom: 12px;
}

.progress-container {
  width: 100%;
  height: 6px;
  background: rgba(139, 111, 71, 0.2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4CAF50, #8BC34A);
  border-radius: 3px;
  transition: width 1s linear;
  width: 0%;
  box-shadow: 0 0 8px rgba(76, 175, 80, 0.5);
}

.animation-container {
  width: 200px;
  height: 200px;
  margin: 0 auto 16px;
  background: #f5f5f5;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#bearAnimation {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.controls {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-start {
  background: #4CAF50;
  color: white;
}

.btn-pause {
  background: #FF9800;
  color: white;
}

.btn-reset {
  background: #757575;
  color: white;
}

.btn-skip {
  background: #F44336;
  color: white;
}

.level-section {
  padding: 12px;
  background: rgba(139, 111, 71, 0.1);
  border-radius: 8px;
}

.level-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 12px;
}

.level-label {
  font-weight: 700;
  color: #8B6F47;
}

.sessions-progress {
  color: #666;
}

.level-progress-bar {
  width: 100%;
  height: 6px;
  background: rgba(139, 111, 71, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.level-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #8B6F47, #D4A574);
  border-radius: 3px;
  transition: width 0.5s ease;
  width: 0%;
}

/* Floating Mode Styles */
.floating-info {
  background: #e3f2fd;
  padding: 16px;
  border-radius: 8px;
  margin-bottom: 16px;
}

.info-text {
  font-size: 13px;
  line-height: 1.6;
  color: #1976d2;
  margin-bottom: 8px;
}

.info-text:last-child {
  margin-bottom: 0;
}

.floating-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  background: #f5f5f5;
  border-radius: 8px;
  margin-bottom: 16px;
}

.status-indicator {
  font-size: 20px;
  color: #757575;
}

.status-indicator.active {
  color: #4CAF50;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

#statusText {
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.btn-inject {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #4CAF50, #45a049);
  color: white;
  font-size: 14px;
  margin-bottom: 12px;
}

.btn-remove {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #F44336, #da190b);
  color: white;
  font-size: 14px;
  margin-bottom: 12px;
}

.floating-note {
  text-align: center;
  padding: 12px;
  background: #fff9c4;
  border-radius: 8px;
  color: #f57f17;
}

/* Footer */
.footer {
  text-align: center;
  padding: 12px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
}

/* Pulsing effect */
.timer-display.pulsing {
  animation: timerPulse 1s ease-in-out infinite;
}

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