/*
 * Detective Game - macOS Theme
 * Based on macOS Human Interface Guidelines
 */

/* ===========================
   Global Styles & Variables
   =========================== */
html {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  width: 100%;
  height: 100%;
  margin: 0;
  color: var(--text-color);
  background: #ECECEC;
  background-image: url('background.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  font-family: "Kosugi", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  --accent-color-h: 211;
  --accent-color-s: 97%;
  --accent-color-l: 53%;
  --text-color: rgba(0, 0, 0, 0.8);
  --selection-background: hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) + 35%));
  
  /* Game-specific variables */
  --radius: 8px;
  --radius-sm: 4px;
  --radius-lg: 12px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --border: #e5dfd8;
}

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

::selection {
  background: var(--selection-background);
}

/* ===========================
   Typography
   =========================== */
h2 {
  margin: 24px 0 12px 0;
  font-size: 36px;
  font-weight: 300;
  line-height: 1.2;
}

h3 {
  margin: 20px 0 12px 0;
  font-size: 24px;
  font-weight: 300;
  line-height: 1.2;
}

h4 {
  margin: 20px 0 12px 0;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.1;
}

h5 {
  margin: 10px 0 8px 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.1;
}

p {
  margin-bottom: 1rem;
}

p:last-child {
  margin-bottom: 0;
}

/* ===========================
   Scrollbars
   =========================== */
::-webkit-scrollbar {
  max-width: 6px;
  max-height: 6px;
  background: none;
}

::-webkit-scrollbar-track {
  border-radius: 25px;
}

::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 25px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.6);
}

::-webkit-scrollbar-corner {
  display: none;
}

/* ===========================
   Buttons (macOS Style)
   =========================== */
.btn,
button:not(.window-close-button) {
  min-height: 32px;
  padding: 6px 20px;
  color: var(--text-color);
  background: #ffffff;
  border: 1px solid #ACACAC;
  border-radius: 6px;
  font-family: "Kosugi", sans-serif;
  font-size: 15px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.15s ease;
  outline: none;
}

.btn:hover,
button:not(.window-close-button):hover {
  background: #f5f5f5;
  border-color: #999;
}

.btn:focus,
button:not(.window-close-button):focus {
  box-shadow: 0 0 0px 3px hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) + 20%));
  z-index: 1;
}

.btn:active,
button:not(.window-close-button):active {
  background: #e8e8e8;
}

.btn-primary,
button.btn-primary {
  color: white;
  border-color: hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) - 8%));
  background: linear-gradient(to bottom,
    hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) + 15%)),
    hsl(var(--accent-color-h), var(--accent-color-s), var(--accent-color-l))
  );
}

.btn-primary:hover,
button.btn-primary:hover {
  background: linear-gradient(to bottom,
    hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) + 18%)),
    hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) + 3%))
  );
}

.btn-primary:active,
button.btn-primary:active {
  border-color: hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) - 12%));
  background: linear-gradient(to bottom,
    hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) + 5%)),
    hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) - 7%))
  );
}

.btn-large {
  min-height: 38px;
  padding: 8px 28px;
  font-size: 16px;
  font-weight: 500;
}

.btn-secondary {
  background: #f0f0f0;
  border-color: #B0B0B0;
}

.btn[disabled],
button[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===========================
   Form Elements (macOS Style)
   =========================== */
input[type="text"],
input[type="number"],
select,
textarea {
  border: 1px solid #BFBFBF;
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  font-family: "Kosugi", sans-serif;
  font-size: 15px;
  background: white;
  color: var(--text-color);
  outline: none;
  transition: all 0.15s ease;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
  outline: 3px solid hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) + 20%));
  border-color: hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) - 3%));
}

textarea {
  min-height: 100px;
  padding: 8px 10px;
  resize: vertical;
  font-family: inherit;
}

select {
  padding-right: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  appearance: none;
}

.select-input,
.textarea-input {
  width: 100%;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 6px;
  font-size: 14px;
}

/* ===========================
   Desktop Interface
   =========================== */
.desktop {
  width: 100vw;
  height: 100vh;
  padding-top: 40px;
  margin: 0;
  position: relative;
}

/* ===========================
   Desktop Folders
   =========================== */
.desktop-folders {
  position: fixed;
  left: 2rem;
  top: calc(40px + 2rem);
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 2rem;
  max-height: calc(100vh - 40px - 4rem);
  max-width: 600px;
  align-content: flex-start;
  z-index: 50;
}

.folder-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: transform 0.15s ease;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
}

.folder-item:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.folder-item.opening {
  animation: folderOpen 0.3s ease;
}

@keyframes folderOpen {
  0% {
    transform: scale(1.05);
  }
  50% {
    transform: scale(0.95);
  }
  100% {
    transform: scale(1.05);
  }
}

.folder-icon-img {
  width: 64px;
  height: 64px;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.4));
}

.donate-icon-wrapper {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.4));
}

.folder-label {
  color: white;
  font-weight: 600;
  font-size: 13px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
  text-align: center;
  max-width: 100px;
  word-wrap: break-word;
}

/* ===========================
   Screen Management
   =========================== */
.screen {
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

.screen.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ===========================
   Mobile Warning
   =========================== */
.mobile-warning {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.mobile-warning-content {
  background: white;
  border-radius: 16px;
  padding: 2.5rem 2rem;
  max-width: 90%;
  width: 400px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: mobileWarningSlideUp 0.4s ease-out;
}

@keyframes mobileWarningSlideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.mobile-warning-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
}

.mobile-warning-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 1rem 0;
}

.mobile-warning-text {
  font-size: 16px;
  color: #4a4a4a;
  line-height: 1.5;
  margin: 0 0 0.75rem 0;
}

.mobile-warning-subtext {
  font-size: 14px;
  color: #888;
  line-height: 1.4;
  margin: 0 0 1.5rem 0;
}

.mobile-continue-btn {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Kosugi", sans-serif;
}

.mobile-continue-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.mobile-continue-btn:active {
  transform: translateY(0);
}

/* Show mobile warning on small screens */
@media (max-width: 768px) {
  .mobile-warning {
    display: flex;
  }
}

/* ===========================
   Login Screen
   =========================== */
#login-screen {
  position: fixed;
  width: 100vw;
  height: 100vh;
  top: 0;
  left: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 4rem;
  padding-top: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  z-index: 10000;
}

#login-screen.logged-in {
  align-items: center;
  padding-bottom: 0;
  padding-top: 40px;
  background: transparent;
  backdrop-filter: none;
  z-index: auto;
  pointer-events: none;
}

#login-screen.logged-in mac-window {
  pointer-events: auto;
}

.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 2.5rem 3rem;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.5);
  animation: loginSlideUp 0.5s ease-out;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.login-panel.hidden {
  opacity: 0;
  transform: translateY(30px);
  pointer-events: none;
}

@keyframes loginSlideUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.login-avatar-icon {
  width: 80px;
  height: 80px;
  font-size: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, 
    hsl(var(--accent-color-h), var(--accent-color-s), var(--accent-color-l)),
    hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) - 15%))
  );
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.login-instruction {
  font-size: 16px;
  color: rgba(0, 0, 0, 0.7);
  margin: -0.5rem 0 -0.5rem 0;
  text-align: center;
  font-weight: 500;
}

.login-email-input {
  width: 320px;
  padding: 14px 20px;
  font-size: 15px;
  text-align: center;
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  background: white;
  transition: all 0.2s ease;
}

.login-email-input:focus {
  outline: none;
  border-color: hsl(var(--accent-color-h), var(--accent-color-s), var(--accent-color-l));
  box-shadow: 0 0 0 4px hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) + 20%));
}

.login-panel .btn {
  width: 320px;
  padding: 14px 20px;
  font-size: 16px;
  border-radius: 12px;
}

/* ===========================
   Top Navbar
   =========================== */
.top-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 9998;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-os-title {
  color: white;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Actions Menu */
.actions-menu-container {
  position: relative;
}

.navbar-actions-btn {
  background: transparent !important;
  border: none !important;
  color: white !important;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0 !important;
  margin: 0;
  outline: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.navbar-actions-btn:hover,
.navbar-actions-btn:focus,
.navbar-actions-btn:active {
  background: transparent !important;
  border: none !important;
  color: white !important;
  padding: 0 !important;
  box-shadow: none;
  outline: none;
}

.actions-menu-arrow {
  color: rgba(255, 255, 255, 0.7);
  font-size: 9px;
}

.actions-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 0, 0, 0.1);
  min-width: 180px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 9999;
  pointer-events: none;
}

.actions-dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.actions-dropdown-item {
  display: flex;
  align-items: center;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}

.actions-dropdown-item:hover {
  background: hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) + 35%));
}

.actions-dropdown-item:active {
  background: hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) + 30%));
}

.actions-dropdown-text {
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.8);
}

.user-menu-container {
  position: relative;
}

.navbar-user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}

.navbar-user-info:hover {
  opacity: 0.8;
}

.navbar-user-info:active {
  transform: scale(0.98);
}

.navbar-divider {
  width: 1px;
  height: 24px;
  background: rgba(255, 255, 255, 0.3);
}

.user-avatar {
  display: none;
}

.user-email {
  font-size: 13px;
  font-weight: 500;
  color: white;
  white-space: nowrap;
}

.user-menu-arrow {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.7);
  transition: transform 0.2s ease;
}

.navbar-user-info.active .user-menu-arrow {
  transform: rotate(180deg);
}

.user-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 0, 0, 0.1);
  min-width: 140px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
  z-index: 9999;
  pointer-events: none;
}

.user-dropdown-menu.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s ease;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}

.user-dropdown-item:hover {
  background: hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) + 35%));
}

.user-dropdown-item:active {
  background: hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) + 30%));
}

.user-dropdown-icon {
  font-size: 14px;
}

.user-dropdown-text {
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.8);
}

/* ===========================
   Welcome Screen
   =========================== */
.start-screen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-content {
  text-align: center;
  padding: 1.5rem;
}

.welcome-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

.welcome-content h2 {
  margin-bottom: 1rem;
  color: var(--text-color);
  font-size: 32px;
  font-weight: 300;
}

.welcome-text {
  font-size: 15px;
  margin-bottom: 1.5rem;
  color: rgba(0, 0, 0, 0.7);
  line-height: 1.6;
}

.welcome-subtext {
  font-size: 14px;
  margin-bottom: 2rem;
  color: rgba(0, 0, 0, 0.6);
  font-style: italic;
  line-height: 1.5;
}

/* ===========================
   Loading Screen
   =========================== */
.loading-screen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  z-index: 9999;
}

.loading-window-content {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#loading-window {
  z-index: 9999 !important;
}

#loading-window[active] {
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
}

.win98-dialog-body {
  padding: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.win98-loading-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
  animation: hourglassRotate 2s linear infinite;
}

@keyframes hourglassRotate {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(180deg); }
}

.win98-loading-content {
  flex: 1;
}

.win98-loading-text,
.win98-dialog-text {
  font-family: "Kosugi", sans-serif;
  font-size: 0.95rem;
  color: rgba(0, 0, 0, 0.8);
  margin: 0 0 1rem 0;
  font-weight: 400;
}

.win98-loading-subtext,
.win98-dialog-subtext {
  font-family: "Kosugi", sans-serif;
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.7);
  margin: 0.75rem 0 0 0;
}

/* Modern Loading Styles */
.loading-window-content {
  min-width: 400px;
}

.modern-loading-body {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
}

.modern-loading-icon {
  font-size: 3rem;
  animation: spin 2s linear infinite;
}

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

.modern-loading-content {
  flex: 1;
  min-width: 0;
}

.modern-loading-text {
  font-size: 18px;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.9);
  margin: 0 0 1rem 0;
}

.modern-progress-container {
  margin: 1rem 0;
}

.modern-progress-bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.modern-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, 
    hsl(var(--accent-color-h), var(--accent-color-s), var(--accent-color-l)),
    hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) + 10%))
  );
  border-radius: 10px;
  width: 0%;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.modern-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.modern-loading-subtext {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.6);
  margin: 0.5rem 0 0 0;
}

/* Keep old Win98 styles for evidence download */
.win98-progress-container {
  margin: 0.5rem 0;
}

.win98-progress-bar {
  height: 24px;
  background: #ffffff;
  border: 2px solid;
  border-color: #808080 #ffffff #ffffff #808080;
  padding: 2px;
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.1);
}

.win98-progress-fill {
  height: 100%;
  background: #000080;
  background-image: 
    repeating-linear-gradient(
      90deg,
      #000080 0px,
      #000080 8px,
      #0000a0 8px,
      #0000a0 10px,
      #000080 10px,
      #000080 18px,
      transparent 18px,
      transparent 20px
    );
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: inset -1px -1px 0 rgba(0, 0, 0, 0.2);
}

/* ===========================
   Evidence Download Status
   =========================== */
.loading-status-win98 {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
}

.win98-dialog {
  background: #c0c0c0;
  border: 2px solid;
  border-color: #ffffff #808080 #808080 #ffffff;
  padding: 1.5rem;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.3);
  min-width: 400px;
  display: flex;
  gap: 1rem;
}

.win98-dialog-icon {
  font-size: 2.5rem;
  flex-shrink: 0;
}

.win98-dialog-content {
  flex: 1;
}

/* ===========================
   Briefing Window Content
   =========================== */
.briefing-content {
  max-width: 700px;
  margin: 0 auto;
}

.case-hook-window {
  font-size: 1.3rem;
  color: rgba(0, 0, 0, 0.8);
  font-style: italic;
  margin-bottom: 2rem;
  text-align: center;
  line-height: 1.5;
}

.briefing-section {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.briefing-section:last-child {
  border-bottom: none;
}

.briefing-section h3 {
  font-size: 20px;
  margin-bottom: 1rem;
  color: var(--text-color);
  font-weight: 500;
}

.briefing-meta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  background: #f0f0f0;
  color: rgba(0, 0, 0, 0.7);
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid #d0d0d0;
}

/* ===========================
   Evidence Gallery
   =========================== */
.evidence-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 1rem 0;
}

.evidence-item {
  cursor: pointer;
  transition: transform 0.15s ease;
}

.evidence-item:hover {
  transform: translateY(-4px);
}

.evidence-item:active {
  transform: translateY(-2px);
}

.evidence-item-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  margin-bottom: 0.75rem;
  background: #f5f5f5;
  border: 1px solid #d0d0d0;
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.evidence-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef3 100%);
  animation: placeholderPulse 2s ease-in-out infinite;
}

.placeholder-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  opacity: 0.5;
}

.placeholder-text {
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

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

.evidence-item-caption {
  text-align: center;
}

.evidence-item-id {
  font-weight: 600;
  color: hsl(var(--accent-color-h), var(--accent-color-s), var(--accent-color-l));
  font-size: 14px;
}

.evidence-item-title {
  font-size: 15px;
  color: var(--text-color);
  font-weight: 500;
  margin-top: 0.25rem;
}

.evidence-item-category {
  font-size: 12px;
  color: rgba(0, 0, 0, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
}

/* ===========================
   Evidence Viewer Window
   =========================== */
.evidence-viewer-window {
  width: 900px;
  height: 650px;
}

.evidence-viewer-content {
  padding: 1rem;
}

.evidence-viewer-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
  height: 100%;
}

.evidence-viewer-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid #d0d0d0;
}

.evidence-viewer-image {
  max-width: 100%;
  max-height: 550px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
}

.evidence-viewer-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow-y: auto;
}

.evidence-viewer-title {
  font-size: 22px;
  color: var(--text-color);
  margin: 0;
  font-weight: 500;
}

.evidence-viewer-reveals {
  color: rgba(0, 0, 0, 0.7);
  line-height: 1.6;
  font-size: 15px;
}

.evidence-viewer-details {
  background: #f5f5f5;
  padding: 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid #d0d0d0;
}

.evidence-viewer-details p {
  margin-bottom: 0.75rem;
  font-size: 14px;
}

.evidence-viewer-details p:last-child {
  margin-bottom: 0;
}

.evidence-category-tag {
  display: inline-block;
  padding: 6px 12px;
  background: hsl(var(--accent-color-h), var(--accent-color-s), var(--accent-color-l));
  color: white;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  align-self: flex-start;
}

/* ===========================
   Suspects Grid
   =========================== */
.suspects-grid,
.suspects-grid-window {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
  padding: 1rem 0;
}

.suspect-card {
  background: #f5f5f5;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  border: 1px solid #d0d0d0;
}

.suspect-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.suspect-image-container {
  width: 100%;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  overflow: hidden;
  background: #e0e0e0;
  aspect-ratio: 1 / 1;
}

.suspect-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
  animation: fadeIn 0.5s ease-in;
}

.suspect-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef3 100%);
  animation: placeholderPulse 2s ease-in-out infinite;
}

.suspect-placeholder-icon {
  font-size: 2rem;
  margin-bottom: 0.25rem;
  opacity: 0.4;
}

.suspect-placeholder-text {
  font-size: 11px;
  color: #666;
  font-weight: 500;
  text-align: center;
  padding: 0 1rem;
}

.suspect-card:hover .suspect-image {
  transform: scale(1.05);
}

.suspect-card h4 {
  font-size: 20px;
  margin-bottom: 0.5rem;
  color: var(--text-color);
  font-weight: 500;
}

.suspect-relationship {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.6);
  font-style: italic;
  margin-bottom: 1rem;
}

.suspect-section {
  margin-bottom: 1rem;
}

.suspect-section:last-child {
  margin-bottom: 0;
}

.suspect-section strong {
  display: block;
  color: var(--text-color);
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 14px;
}

.suspect-section p {
  font-size: 14px;
  color: rgba(0, 0, 0, 0.7);
}

.quirks-list {
  list-style: none;
  padding-left: 0;
}

.quirks-list li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 0.5rem;
  color: rgba(0, 0, 0, 0.7);
  font-size: 14px;
}

.quirks-list li::before {
  content: '•';
  position: absolute;
  left: 0.5rem;
  color: hsl(var(--accent-color-h), var(--accent-color-s), var(--accent-color-l));
}

/* ===========================
   Solution Form
   =========================== */
.form-group {
  margin-bottom: 1.5rem;
}

.form-hint {
  color: rgba(0, 0, 0, 0.6);
  margin-bottom: 1.5rem;
  font-size: 14px;
}

/* ===========================
   Government-Style Form (USA.gov)
   =========================== */
.gov-form {
  padding: 2rem;
  background: #ffffff;
  font-family: "Kosugi", sans-serif;
}

.gov-form-header {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #005EA2;
}

.gov-form-title {
  font-size: 28px;
  font-weight: 700;
  color: #1B1B1B;
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.gov-form-subtitle {
  font-size: 16px;
  color: #565C65;
  margin: 0;
  line-height: 1.5;
}

/* Government Alert */
.gov-alert {
  display: flex;
  padding: 1rem;
  margin-bottom: 2rem;
  border-left: 4px solid;
  border-radius: 4px;
  background: #f0f0f0;
}

.gov-alert-info {
  border-left-color: #005EA2;
  background: #E7F6F8;
}

.gov-alert-icon {
  font-size: 24px;
  margin-right: 1rem;
  flex-shrink: 0;
}

.gov-alert-body {
  flex: 1;
}

.gov-alert-text {
  margin: 0;
  font-size: 15px;
  color: #1B1B1B;
  line-height: 1.5;
}

/* Government Form Group */
.gov-form-group {
  margin-bottom: 2rem;
}

.gov-label {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: #1B1B1B;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.gov-label-required {
  color: #E52207;
  font-weight: 700;
}

.gov-hint-text {
  display: block;
  font-size: 14px;
  color: #565C65;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

/* Government Input */
.gov-input {
  width: 100%;
  height: 44px;
  padding: 0.5rem 0.75rem;
  font-family: "Kosugi", sans-serif;
  font-size: 16px;
  color: #1B1B1B;
  background-color: #ffffff;
  border: 2px solid #565C65;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.gov-input:hover {
  border-color: #1B1B1B;
}

.gov-input:focus {
  outline: 4px solid #2491FF;
  outline-offset: 2px;
  border-color: #005EA2;
}

.gov-input::placeholder {
  color: #71767A;
}

/* Government Select */
.gov-select {
  width: 100%;
  max-width: 100%;
  height: 44px;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem;
  font-family: "Kosugi", sans-serif;
  font-size: 16px;
  color: #1B1B1B;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath fill='%23565C65' d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 16px;
  border: 2px solid #565C65;
  border-radius: 4px;
  appearance: none;
  cursor: pointer;
  transition: all 0.15s ease;
}

.gov-select:hover {
  border-color: #1B1B1B;
}

.gov-select:focus {
  outline: 4px solid #2491FF;
  outline-offset: 2px;
  border-color: #005EA2;
}

/* Government Textarea */
.gov-textarea {
  width: 100%;
  padding: 0.75rem;
  font-family: "Kosugi", sans-serif;
  font-size: 16px;
  color: #1B1B1B;
  line-height: 1.5;
  background-color: #ffffff;
  border: 2px solid #565C65;
  border-radius: 4px;
  resize: vertical;
  min-height: 120px;
  transition: all 0.15s ease;
}

.gov-textarea:hover {
  border-color: #1B1B1B;
}

.gov-textarea:focus {
  outline: 4px solid #2491FF;
  outline-offset: 2px;
  border-color: #005EA2;
}

.gov-textarea::placeholder {
  color: #71767A;
}

.gov-character-count {
  display: block;
  font-size: 13px;
  color: #565C65;
  margin-top: 0.5rem;
}

/* Government Buttons */
.gov-button-group {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.gov-button {
  padding: 0.75rem 1.5rem;
  font-family: "Kosugi", sans-serif;
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  text-decoration: none;
  border-radius: 4px;
  border: 0;
  cursor: pointer;
  transition: all 0.15s ease;
  min-width: 180px;
}

.gov-button-primary {
  color: #ffffff;
  background-color: #005EA2;
}

.gov-button-primary:hover {
  background-color: #1A4480;
}

.gov-button-primary:active {
  background-color: #162E51;
}

.gov-button-primary:focus {
  outline: 4px solid #2491FF;
  outline-offset: 2px;
}

.gov-button-outline {
  color: #005EA2;
  background-color: transparent;
  border: 2px solid #005EA2;
}

.gov-button-outline:hover {
  color: #1A4480;
  border-color: #1A4480;
  background-color: rgba(0, 94, 162, 0.05);
}

.gov-button-outline:active {
  color: #162E51;
  border-color: #162E51;
}

.gov-button-outline:focus {
  outline: 4px solid #2491FF;
  outline-offset: 2px;
}

/* ===========================
   Custom Context Menu
   =========================== */
.context-menu {
  position: fixed;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  padding: 4px 0;
  min-width: 200px;
  z-index: 10000;
  display: none;
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.context-menu.active {
  display: block;
  animation: contextMenuShow 0.15s ease-out;
}

@keyframes contextMenuShow {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 0.1s ease;
  user-select: none;
}

.context-menu-item:hover {
  background: hsl(var(--accent-color-h), var(--accent-color-s), var(--accent-color-l));
  color: white;
}

.context-menu-item:active {
  background: hsl(var(--accent-color-h), var(--accent-color-s), calc(var(--accent-color-l) - 10%));
}

.context-menu-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.context-menu-label {
  font-family: "Kosugi", sans-serif;
  font-size: 14px;
  flex: 1;
}

.context-menu-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.1);
  margin: 4px 0;
}

/* ===========================
   About Window Content
   =========================== */
.about-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  min-height: 150px;
}

.about-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.about-avatar {
  width: 150px;
  height: 150px;
  object-fit: cover;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.about-message {
  text-align: center;
}

.about-message p {
  font-size: 17px;
  line-height: 1.6;
  color: rgba(0, 0, 0, 0.8);
  margin: 0 0 0.5rem 0;
}

.about-message p:last-child {
  margin-bottom: 0;
}

.about-email {
  font-size: 15px;
  font-weight: 500;
  margin-top: 1rem !important;
}

.about-email a {
  color: #005EA2;
  text-decoration: none;
  transition: all 0.2s ease;
}

.about-email a:hover {
  color: #1A4480;
  text-decoration: underline;
}

.about-email a:active {
  color: #162E51;
}

#about-window {
  left: calc(50% - 225px) !important;
  top: calc(50% - 240px) !important;
}

#feedback-window {
  left: calc(50% - 300px) !important;
  top: calc(50% - 275px) !important;
}

/* Ensure new windows start with proper z-index */
mac-window[active] {
  z-index: 100;
}

/* Shake animation for already-open windows */
mac-window.shake {
  animation: windowShake 0.4s ease-in-out;
}

@keyframes windowShake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-8px); }
  20%, 40%, 60%, 80% { transform: translateX(8px); }
}

/* ===========================
   MacWindow Component Styles
   =========================== */
/* MacWindow styles are handled by the web component's shadow DOM */

/* ===========================
   Responsive Design
   =========================== */

/* Large tablets and small desktops (1024px - 1280px) */
@media (max-width: 1280px) {
  mac-window[width] {
    max-width: 90vw !important;
  }
  
  mac-window[height] {
    max-height: calc(90vh - 40px) !important;
  }
}

/* Tablets (768px - 1023px) */
@media (max-width: 1023px) {
  mac-window {
    max-width: 92vw !important;
    max-height: calc(85vh - 40px) !important;
  }
  
  mac-window[width="900px"],
  mac-window[width="700px"] {
    width: 90vw !important;
  }
  
  mac-window[height="650px"],
  mac-window[height="600px"] {
    height: calc(80vh - 40px) !important;
  }
}

/* Mobile and small tablets (max-width: 768px) */
@media (max-width: 768px) {
  .desktop-folders {
    left: 1rem;
    top: calc(40px + 1rem);
    gap: 1rem;
    max-height: calc(100vh - 40px - 2rem);
  }
  
  .folder-icon-img {
    width: 48px;
    height: 48px;
  }
  
  .donate-icon-wrapper {
    width: 48px;
    height: 48px;
    font-size: 36px;
  }
  
  .folder-label {
    font-size: 11px;
  }
  
  .evidence-gallery {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
  }
  
  .suspects-grid,
  .suspects-grid-window {
    grid-template-columns: 1fr;
  }
  
  .evidence-viewer-body {
    grid-template-columns: 1fr;
  }
  
  mac-window {
    width: 95vw !important;
    max-width: 95vw !important;
    height: calc(90vh - 40px) !important;
    max-height: calc(90vh - 40px) !important;
    left: 2.5vw !important;
    top: calc(40px + 2vh) !important;
  }
  
  .briefing-content,
  .notes-content,
  .solution-form {
    padding: 1rem;
  }
  
  .gov-form {
    padding: 1.5rem;
  }
  
  .gov-form-title {
    font-size: 24px;
  }
  
  .gov-button-group {
    flex-direction: column;
  }
  
  .gov-button {
    width: 100%;
    min-width: 100%;
  }
}

/* Small mobile (max-width: 480px) */
@media (max-width: 480px) {
  .top-navbar {
    padding: 0 0.5rem;
  }
  
  .navbar-left {
    gap: 0.5rem;
  }
  
  .navbar-os-title {
    font-size: 12px;
  }
  
  .navbar-right {
    gap: 0.5rem;
  }
  
  .navbar-user-info {
    gap: 0.25rem;
  }
  
  .navbar-divider {
    height: 20px;
  }
  
  .user-email {
    font-size: 11px;
  }
  
  .timer-display {
    font-size: 14px;
    min-width: 50px;
  }
  
  .timer-label {
    font-size: 12px;
  }
  
  mac-window {
    width: 98vw !important;
    max-width: 98vw !important;
    height: calc(92vh - 40px) !important;
    max-height: calc(92vh - 40px) !important;
    left: 1vw !important;
    top: calc(40px + 1vh) !important;
  }
  
  .desktop-folders {
    left: 0.5rem;
    top: calc(40px + 0.5rem);
    gap: 0.75rem;
  }
  
  .gov-form {
    padding: 1rem;
  }
  
  .gov-form-title {
    font-size: 20px;
  }
  
  .gov-label {
    font-size: 15px;
  }
  
  .gov-select,
  .gov-textarea {
    font-size: 14px;
  }
}

/* Height-based responsive design for windows and folders */
@media (max-height: 800px) {
  mac-window {
    max-height: calc(85vh - 40px) !important;
  }
  
  mac-window[height="650px"],
  mac-window[height="600px"] {
    height: calc(80vh - 40px) !important;
  }
}

@media (max-height: 700px) {
  .desktop-folders {
    max-height: calc(100vh - 40px - 3rem);
    gap: 1.5rem;
  }
  
  .folder-icon-img {
    width: 56px;
    height: 56px;
  }
  
  .donate-icon-wrapper {
    width: 56px;
    height: 56px;
    font-size: 42px;
  }
  
  mac-window {
    max-height: calc(80vh - 40px) !important;
  }
  
  mac-window[height="650px"],
  mac-window[height="600px"] {
    height: calc(75vh - 40px) !important;
  }
}

@media (max-height: 600px) {
  mac-window {
    max-height: calc(85vh - 40px) !important;
  }
  
  mac-window[height="650px"],
  mac-window[height="600px"],
  mac-window[height="500px"] {
    height: calc(80vh - 40px) !important;
  }
}

@media (max-height: 500px) {
  .desktop-folders {
    max-height: calc(100vh - 40px - 2rem);
    gap: 1rem;
  }
  
  .folder-icon-img {
    width: 48px;
    height: 48px;
  }
  
  .donate-icon-wrapper {
    width: 48px;
    height: 48px;
    font-size: 36px;
  }
  
  .folder-label {
    font-size: 11px;
  }
  
  mac-window {
    max-height: calc(90vh - 40px) !important;
  }
  
  mac-window[height] {
    height: calc(85vh - 40px) !important;
  }
}

/* Combined small width and height (landscape phones, small windows) */
@media (max-width: 768px) and (max-height: 600px) {
  mac-window {
    width: 98vw !important;
    height: calc(92vh - 40px) !important;
    max-width: 98vw !important;
    max-height: calc(92vh - 40px) !important;
    left: 1vw !important;
    top: calc(40px + 1vh) !important;
  }
  
  .desktop-folders {
    gap: 0.75rem;
    max-height: calc(100vh - 40px - 1.5rem);
  }
  
  .folder-icon-img {
    width: 40px;
    height: 40px;
  }
  
  .donate-icon-wrapper {
    width: 40px;
    height: 40px;
    font-size: 30px;
  }
  
  .folder-label {
    font-size: 10px;
  }
}

/* ===========================
   Utility Classes
   =========================== */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* ===========================
   Cover Image Styles
   =========================== */
.case-cover-image {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  object-fit: cover;
  max-height: 400px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeIn 0.5s ease-in;
}

.case-cover-image:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

.cover-image-container {
  margin: 1rem 0;
  overflow: hidden;
  border-radius: 8px;
}

.cover-image-placeholder {
  width: 100%;
  height: 300px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f7fa 0%, #e8eef3 100%);
  border-radius: 8px;
  animation: placeholderPulse 2s ease-in-out infinite;
}

.cover-placeholder-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.cover-placeholder-text {
  font-size: 15px;
  color: #666;
  font-weight: 500;
  text-align: center;
}

/* ===========================
   Notes Window Styles
   =========================== */
.notes-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
}

.notes-header {
  margin-bottom: 1rem;
}

.notes-textarea {
  flex: 1;
  width: 100%;
  padding: 1rem;
  border: 2px solid #d0d0d0;
  border-radius: var(--radius);
  font-family: "Kosugi", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  resize: none;
  background: white;
  color: var(--text-color);
  transition: border-color 0.2s ease;
}

.notes-textarea:focus {
  outline: none;
  border-color: hsl(var(--accent-color-h), var(--accent-color-s), var(--accent-color-l));
  box-shadow: 0 0 0 3px hsla(var(--accent-color-h), var(--accent-color-s), var(--accent-color-l), 0.1);
}

.notes-textarea::placeholder {
  color: rgba(0, 0, 0, 0.4);
}

.notes-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e0e0;
}

.notes-saved-indicator {
  display: none;
  color: #28a745;
  font-size: 14px;
  font-weight: 500;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 14px;
}

/* ===========================
   Navbar Timer Styles
   =========================== */
.navbar-timer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0;
}

.timer-label {
  font-size: 14px;
}

.timer-display {
  font-size: 16px;
  font-weight: 700;
  font-family: "Kosugi", sans-serif;
  color: #ffffff;
  min-width: 60px;
  text-align: center;
  transition: color 0.3s ease;
}

.timer-display.timer-warning {
  color: #f39c12;
  animation: pulse 1s ease-in-out infinite;
}

.timer-display.timer-critical {
  color: #e74c3c;
  animation: pulse 0.5s ease-in-out infinite;
}

.timer-display.timer-expired {
  color: #95a5a6;
}

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

/* ===========================
   Score Display Styles
   =========================== */
.score-display {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 2rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.score-stars {
  font-size: 32px;
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: 4px;
}

.score-points {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.score-breakdown {
  display: grid;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  padding: 1rem;
  border-radius: 8px;
}

.score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
}

.score-label {
  font-weight: 500;
  opacity: 0.9;
}

.score-value {
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

/* ===========================
   Police Report Styles
   =========================== */
.police-report {
  background: #fafafa;
  border: 2px solid #d0d0d0;
  border-radius: var(--radius);
  padding: 1.5rem;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
}

.police-report-header {
  position: relative;
  border-bottom: 3px double #333;
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.police-badge-img {
  position: absolute;
  top: 0;
  right: 0;
  width: 60px;
  height: 60px;
  opacity: 0.8;
  filter: grayscale(20%);
}

.report-title {
  font-size: 18px;
  font-weight: 700;
  color: #2c3e50;
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
}

.report-meta {
  display: flex;
  justify-content: space-around;
  font-size: 13px;
  color: #555;
  margin-top: 0.5rem;
}

.report-section {
  margin-bottom: 1.25rem;
  padding: 0.75rem;
  background: white;
  border-left: 4px solid #3498db;
  border-radius: 4px;
}

.report-label {
  font-weight: 700;
  color: #2c3e50;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
}

.report-value {
  color: #34495e;
  margin-left: 0.5rem;
}

.incident-type {
  color: #e74c3c;
  font-weight: 700;
  text-transform: uppercase;
}

.witness-list,
.evidence-list {
  margin: 0.5rem 0 0 1.5rem;
  padding: 0;
}

.witness-list li,
.evidence-list li {
  margin-bottom: 0.5rem;
  color: #555;
}

.detective-notes {
  background: #fff9e6;
  border-left-color: #f39c12;
}

.notes-style {
  font-style: italic;
  color: #7f8c8d;
  font-size: 13px;
  padding: 0.5rem;
  background: white;
  border-radius: 4px;
  border: 1px dashed #bdc3c7;
}
