/* Modal Styles */

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  backdrop-filter: blur(2px);
}

.modal-overlay.hidden {
  display: none;
}

/* Window Modal (Windows 95/98 Style) */
.window-modal {
  background-color: #c0c0c0;
  border: 2px outset #ffffff;
  box-shadow: 4px 4px 12px rgba(0, 0, 0, 0.6);
  min-width: 40rem;
  max-width: 60rem;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-typewriter);
  font-weight: 400;
}

/* Window Title Bar */
.window-title-bar {
  background: linear-gradient(to right, #000080 0%, #1084d0 100%);
  color: var(--color-white);
  padding: 0.4rem 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: move;
  user-select: none;
}

.window-title-text {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--font-size-small);
  font-weight: 700;
}

.window-icon {
  width: 1.6rem;
  height: 1.6rem;
  background-color: var(--color-white);
  border: 1px solid #000000;
  display: inline-block;
}

/* Window Controls */
.window-controls {
  display: flex;
  gap: 0.4rem;
}

.window-control-btn {
  width: 2rem;
  height: 2rem;
  background-color: #c0c0c0;
  border: 2px outset #ffffff;
  color: var(--color-black-1);
  font-size: var(--font-size-medium);
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: all 0.1s;
}

.window-control-btn:hover:not(:disabled) {
  background-color: #d0d0d0;
}

.window-control-btn:active:not(:disabled) {
  border: 2px inset #808080;
  transform: translateY(1px);
}

.window-control-btn:disabled {
  color: #808080;
  cursor: not-allowed;
}

.window-control-btn.close-btn {
  font-size: 2rem;
  line-height: 1;
}

/* Window Content */
.window-content {
  padding: 2rem;
  background-color: #c0c0c0;
  overflow-y: auto;
  flex: 1;
}

/* Read Me Modal Content */
.readme-content h3 {
  font-family: var(--font-typewriter);
  font-weight: 400;
  font-size: var(--font-size-3xl);
  background-color: var(--color-white);
  color: #000080;
  margin-bottom: 1rem;
}

.readme-content h4 {
  font-family: var(--font-typewriter);
  font-weight: 400;
  font-size: var(--font-size-xl);
  background-color: var(--color-white);
  color: var(--color-black-1);
  margin-top: 2rem;
  margin-bottom: 0.8rem;
}

.readme-content p {
  font-size: var(--font-size-base);
  color: var(--color-black-10);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.readme-content ul {
  list-style: none;
  margin-left: 0;
  padding-left: 0;
  margin-bottom: 1rem;
}

.readme-content li {
  font-size: var(--font-size-base);
  color: var(--color-black-10);
  line-height: 1.6;
  margin-bottom: 0.8rem;
  padding-left: 2rem;
  position: relative;
}

.readme-content li::before {
  content: "▶";
  position: absolute;
  left: 0;
  color: #000080;
  font-size: var(--font-size-tiny);
}

.readme-content strong {
  font-weight: 700;
  color: #000080;
}

.readme-footer {
  margin-top: 2rem;
  margin-bottom: 2rem;
  font-style: italic;
  color: #000080;
}

.contact-button-container {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  padding-top: 2rem;
  padding-bottom: 1rem;
  border-top: 2px solid #808080;
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.contact-icon {
  width: 4.0rem;
  height: 4.0rem;
  image-rendering: pixelated;
}

/* Read Me Checkbox */
.readme-checkbox-container {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid #808080;
}

.readme-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: var(--font-size-base);
  color: var(--color-black-1);
  cursor: pointer;
  user-select: none;
}

.readme-checkbox {
  width: 1.6rem;
  height: 1.6rem;
  cursor: pointer;
  accent-color: #000080;
}

.readme-checkbox-label:hover {
  color: #000080;
}

/* Login Modal */
.login-modal {
  min-width: 35rem;
  max-width: 45rem;
}

.login-content {
  padding: 1rem;
}

.login-instruction {
  font-size: var(--font-size-base);
  color: var(--color-black-1);
  margin-bottom: 2rem;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.form-group label {
  font-size: var(--font-size-base);
  color: var(--color-black-10);
  font-weight: 400;
}

.login-input {
  padding: 0.6rem;
  border: 2px inset #808080;
  background-color: var(--color-white);
  font-family: var(--font-typewriter);
  font-weight: 400;
  font-size: var(--font-size-base);
  color: var(--color-black-10);
}

.login-input:focus {
  outline: 1px dotted #000000;
  outline-offset: -3px;
}

.login-message {
  padding: 1rem;
  border: 2px solid #000000;
  background-color: var(--color-white);
  font-size: var(--font-size-base);
  font-weight: 700;
  text-align: center;
}

.login-message.error {
  color: var(--color-accent-5);
}

.login-message.success {
  color: var(--color-accent-7);
}

.login-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 1rem;
}

.win95-button {
  min-width: 10rem;
  padding: 0.6rem 1.6rem;
  background: linear-gradient(to bottom, #c0c0c0 0%, #808080 100%);
  border: 2px outset #ffffff;
  box-shadow: inset 1px 1px 0 #ffffff, inset -1px -1px 0 #808080;
  font-family: var(--font-typewriter);
  font-weight: 400;
  font-size: var(--font-size-base);
  color: var(--color-black-1);
  cursor: pointer;
  transition: all 0.1s;
}

.win95-button:hover {
  background: linear-gradient(to bottom, #d0d0d0 0%, #909090 100%);
}

.win95-button:active {
  border: 2px inset #808080;
  box-shadow: inset -1px -1px 0 #ffffff, inset 1px 1px 0 #000000;
  transform: translateY(1px);
}

/* Shutdown Screen */
.shutdown-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3000;
  cursor: pointer;
}

.shutdown-screen.hidden {
  display: none;
}

.shutdown-text {
  color: #ff8c00;
  font-family: var(--font-typewriter);
  font-weight: 400;
  font-size: var(--font-size-4xl);
  text-align: center;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.6;
  }
}

/* BIOS Screen */
.bios-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #000000;
  color: var(--color-white);
  font-family: var(--font-typewriter);
  font-weight: 400;
  font-size: var(--font-size-small);
  padding: 2rem;
  z-index: 3000;
  overflow-y: auto;
}

.bios-screen.hidden {
  display: none;
}

.bios-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 100%;
}

.bios-top p,
.bios-bottom p {
  margin: 0;
  line-height: 1.4;
  white-space: pre-wrap;
}

.bios-bottom {
  margin-top: auto;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .window-modal {
    min-width: 90%;
    max-width: 95%;
    max-height: 90vh;
  }

  .login-modal {
    min-width: 90%;
    max-width: 95%;
  }

  .window-content {
    padding: 1.5rem;
  }

  .readme-content h3 {
    font-size: var(--font-size-2xl);
  }

  .readme-content h4 {
    font-size: var(--font-size-large);
  }

  .shutdown-text {
    font-size: var(--font-size-2xl);
    padding: 2rem;
  }

  .bios-screen {
    font-size: var(--font-size-micro);
    padding: 1rem;
  }
}
