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

:root {
  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --font-serif: "Playfair Display", serif;
}

body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-container {
  position: fixed;
  inset: 0;
  overflow: hidden;
  transition: background-color 1s;
  background-color: #f4f4f5;
}

.app-container.silent {
  background-color: #09090b;
}

.background-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  user-select: none;
  display: none;
}

.background-noise.active {
  display: block;
}

.background-noise-content {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1rem;
  color: #a1a1aa;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

.message-container {
  position: absolute;
  inset: 0;
  z-index: 55;
  pointer-events: none;
}

.screen-shake {
  position: fixed;
  inset: 0;
  pointer-events: none;
  border: 10px solid rgba(220, 38, 38, 0.1);
  z-index: [100];
  display: none;
}

.screen-shake.active {
  display: block;
  animation: shake 0.1s infinite;
}

@keyframes shake {
  0%, 100% {
    transform: translate(0, 0);
  }
  25% {
    transform: translate(var(--shake-x, 0), var(--shake-y, 0));
  }
  50% {
    transform: translate(calc(var(--shake-x, 0) * -0.5), calc(var(--shake-y, 0) * -0.5));
  }
  75% {
    transform: translate(calc(var(--shake-x, 0) * 0.5), calc(var(--shake-y, 0) * 0.5));
  }
}

.message-popup {
  position: absolute;
  z-index: 60;
  background: white;
  border: 2px solid black;
  box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 1);
  padding: 1rem;
  max-width: 20rem;
  animation: popupIn 0.3s ease-out forwards;
  pointer-events: auto;
  cursor: pointer;
}

@media (max-width: 640px) {
  .message-popup {
    max-width: 16rem;
    padding: 0.75rem;
    font-size: 0.875rem;
  }

  .message-header {
    margin-bottom: 0.375rem;
  }

  .message-text {
    font-size: 0.75rem;
    line-height: 1.5;
  }

  .message-boss {
    font-size: 0.5rem;
  }
}

@media (max-width: 480px) {
  .message-popup {
    max-width: 14rem;
    padding: 0.625rem;
  }

  .message-text {
    font-size: 0.7rem;
  }
}

@keyframes popupIn {
  0% {
    transform: scale(0.5) translateY(20px);
    opacity: 0;
  }
  100% {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.message-popup.exiting {
  animation: popupOut 0.3s ease-in forwards;
}

@keyframes popupOut {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

.message-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid #e4e4e7;
}

.alert-icon {
  color: #dc2626;
}

.message-boss {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #71717a;
}

.message-text {
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.625;
  color: #18181b;
}

.main-panel {
  position: relative;
  z-index: 50;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.noise-mode {
  width: 100%;
  max-width: 28rem;
  background: white;
  border: 4px solid black;
  box-shadow: 12px 12px 0px 0px rgba(0, 0, 0, 1);
  padding: 2rem;
  text-align: center;
  position: relative;
  z-index: 80;
}

.silent-mode {
  text-align: center;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.silence-content {
  text-align: center;
}

.silence-timer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 12rem;
  height: 12rem;
  border-radius: 9999px;
  border: 1px solid #27272a;
  background: rgba(24, 24, 27, 0.5);
  backdrop-filter: blur(12px);
  margin: 0 auto 2rem;
  animation: pulse 2s ease-in-out infinite;
}

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

.silence-icon {
  color: #52525b;
  margin-bottom: 0.5rem;
}

.silence-time {
  font-size: 3rem;
  font-weight: 300;
  font-family: var(--font-mono);
  color: white;
}

.silence-label {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #71717a;
  margin-top: 0.5rem;
}

.silence-quote {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.25rem;
  color: #a1a1aa;
  margin-bottom: 0.5rem;
}

.silence-info {
  font-size: 0.875rem;
  font-family: var(--font-mono);
  color: #52525b;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.title-section {
  text-align: left;
}

.main-title {
  font-size: 1.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 1.1;
  color: #18181b;
}

.subtitle {
  font-size: 0.625rem;
  font-weight: 700;
  color: #a1a1aa;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

.mute-btn {
  padding: 0.5rem;
  border: 2px solid black;
  background: white;
  cursor: pointer;
  transition: background-color 0.15s;
}

.mute-btn:hover {
  background-color: #f4f4f5;
}

.content-section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: relative;
  z-index: 90;
}

.pressure-bar-container {
  width: 100%;
  height: 0.5rem;
  background-color: #f4f4f5;
  border: 1px solid black;
  overflow: hidden;
}

.pressure-bar {
  height: 100%;
  background-color: #dc2626;
  width: 0%;
  transition: width 0.3s ease-out;
}

.input-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #71717a;
  text-align: left;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #a1a1aa;
}

.wage-input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid black;
  font-size: 1.5rem;
  font-family: var(--font-mono);
  outline: none;
  transition: background-color 0.15s;
}

.wage-input:focus {
  background-color: #fefce8;
}

.buy-silence-btn {
  width: 100%;
  padding: 1.5rem;
  background-color: #dc2626;
  color: white;
  border: 4px solid black;
  box-shadow: 6px 6px 0px 0px rgba(0, 0, 0, 1);
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  position: relative;
  z-index: 100;
}

.buy-silence-btn:hover {
  transform: scale(1.02);
}

.buy-silence-btn:active {
  transform: scale(0.95);
  box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 1);
}

.btn-main-text {
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: transform 0.15s;
}

.buy-silence-btn:hover .btn-main-text {
  transform: scale(1.1);
}

.btn-sub-text {
  font-size: 0.625rem;
  font-weight: 700;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  padding-top: 1rem;
}

.stat-card {
  padding: 0.75rem;
  border: 2px solid #f4f4f5;
  text-align: left;
}

.stat-header {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: #a1a1aa;
  margin-bottom: 0.25rem;
}

.stat-header span {
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
}

.stat-value {
  font-size: 1.125rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: #18181b;
}

.footer {
  position: fixed;
  bottom: 1rem;
  left: 1rem;
  right: 1rem;
  z-index: [60];
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
  transition: opacity 0.5s;
}

.footer.silent {
  opacity: 0.3;
}

.status-badge {
  background: black;
  color: white;
  padding: 0.5rem;
  font-size: 0.625rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: -0.025em;
}

.status-critical {
  color: #ef4444;
  animation: criticalPulse 1s ease-in-out infinite;
}

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

.footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.alert-badge {
  background: #facc15;
  color: black;
  padding: 0.25rem 0.75rem;
  border: 2px solid black;
  font-weight: 700;
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-badge svg {
  fill: currentColor;
}

.version-badge {
  background: white;
  border: 2px solid black;
  padding: 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.animate-pulse {
  animation: criticalPulse 1s ease-in-out infinite;
}

.fired-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.5s ease-out;
}

.fired-content {
  text-align: center;
  padding: 3rem;
  background: #dc2626;
  border: 4px solid #fef08a;
  box-shadow: 0 0 50px rgba(220, 38, 38, 0.8);
  max-width: 500px;
  animation: shake 0.5s ease-in-out;
}

.fired-title {
  font-size: 3rem;
  font-weight: 900;
  color: #fef08a;
  text-transform: uppercase;
  margin-bottom: 2rem;
  text-shadow: 2px 2px 0px #000;
}

.fired-text {
  font-size: 1.25rem;
  color: white;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

.fired-btn {
  margin-top: 2rem;
  padding: 1rem 2rem;
  background: #fef08a;
  color: #dc2626;
  border: 3px solid #000;
  font-size: 1.25rem;
  font-weight: 900;
  cursor: pointer;
  transition: all 0.2s;
}

.fired-btn:hover {
  transform: scale(1.1);
  box-shadow: 6px 6px 0px #000;
}

.center-text {
  position: fixed;
  font-size: 2rem;
  font-weight: 900;
  color: #ef4444;
  text-transform: uppercase;
  text-shadow: 2px 2px 0px #000;
  z-index: 100;
  pointer-events: none;
  animation: centerTextPulse 0.5s ease-in-out infinite;
  white-space: nowrap;
}

@keyframes centerTextPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

@media (max-width: 640px) {
  .main-panel {
    padding: 0.75rem;
  }

  .noise-mode {
    padding: 1.25rem;
    max-width: 100%;
    border-width: 3px;
    box-shadow: 8px 8px 0px 0px rgba(0, 0, 0, 1);
  }

  .main-title {
    font-size: 1.125rem;
  }

  .subtitle {
    font-size: 0.5rem;
  }

  .panel-header {
    margin-bottom: 1.5rem;
  }

  .content-section {
    gap: 1rem;
  }

  .wage-input {
    padding: 0.75rem 0.75rem 0.75rem 2.5rem;
    font-size: 1.25rem;
  }

  .input-icon {
    left: 0.75rem;
  }

  .buy-silence-btn {
    padding: 1.25rem;
    border-width: 3px;
    box-shadow: 4px 4px 0px 0px rgba(0, 0, 0, 1);
  }

  .btn-main-text {
    font-size: 1rem;
  }

  .btn-sub-text {
    font-size: 0.5rem;
  }

  .stats-grid {
    gap: 0.75rem;
  }

  .stat-card {
    padding: 0.5rem;
  }

  .stat-value {
    font-size: 1rem;
  }

  .silence-timer {
    width: 8rem;
    height: 8rem;
  }

  .silence-time {
    font-size: 2rem;
  }

  .silence-quote {
    font-size: 1rem;
  }

  .footer {
    bottom: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
  }

  .status-badge,
  .version-badge {
    font-size: 0.5rem;
    padding: 0.375rem;
  }

  .alert-badge {
    font-size: 0.5rem;
    padding: 0.25rem 0.5rem;
  }

  .fired-modal {
    padding: 1rem;
  }

  .fired-content {
    padding: 2rem 1.5rem;
    border-width: 3px;
  }

  .fired-title {
    font-size: 2rem;
  }

  .fired-text {
    font-size: 1rem;
  }

  .fired-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .noise-mode {
    padding: 1rem;
  }

  .main-title {
    font-size: 1rem;
  }

  .wage-input {
    font-size: 1.125rem;
  }

  .buy-silence-btn {
    padding: 1rem;
  }

  .btn-main-text {
    font-size: 0.875rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}
