/* Custom CSS for XKCD Password Generator (Windows 7 Desktop & Application styling) */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(circle at 80% 20%, rgba(200, 230, 255, 0.4) 0%, transparent 50%),
              radial-gradient(circle at 20% 80%, rgba(50, 150, 250, 0.3) 0%, transparent 60%),
              linear-gradient(135deg, #1b589b 0%, #0d2c54 100%);
  background-size: cover;
  background-attachment: fixed;
  user-select: none;
}

/* Desktop */
.desktop {
  width: 100vw;
  height: calc(100vh - 40px);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

/* Main Application Window */
.win7-window {
  width: 780px; /* Wider window for side-by-side layout */
  max-width: 100%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transition: opacity 0.2s, transform 0.2s;
  z-index: 10;
}

/* Side-by-side Layout Grid */
.layout-main-grid {
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.pane-config {
  width: 480px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.pane-results {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Adjustments for the tabs to match height */
.pane-config .tabs {
  margin: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.pane-config article[role="tabpanel"] {
  flex-grow: 1;
  padding: 8px 6px;
  height: 100%;
}

.pane-results fieldset {
  height: 100%;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 10px 12px;
  min-width: 0;
}

.pane-results .results-container {
  flex-grow: 1;
}

/* Glass effect override when glass is active */
.window.glass {
  background: rgba(230, 240, 250, 0.8) !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.4) !important;
}

.window.glass .title-bar {
  background: transparent !important;
}

/* Classic theme overrides */
.classic-theme {
  background: #245DDA !important; /* solid classic blue background */
}
.classic-theme .window {
  background: #ECE9D8 !important; /* XP-like color or classic grey */
  border: 2px solid #0054E3 !important;
  border-radius: 0 !important;
}
.classic-theme .window.glass {
  background: #ECE9D8 !important;
  backdrop-filter: none;
  border: 2px solid #0054E3 !important;
}

/* Tab Layout Grid */
.row {
  display: flex;
  margin: 0 -6px;
}

.col {
  flex: 1;
  padding: 0 6px;
}

.text-right {
  text-align: right;
}

/* Layout spacing adjustments */
fieldset {
  padding: 10px 14px;
}

.field-row {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}

.field-row label {
  margin-right: 8px;
}

.field-row input[type="number"],
.field-row input[type="text"],
.field-row select {
  padding: 2px 4px;
  font-size: 12px;
}

/* Results section styling */
.results-container {
  border: 1px solid #999;
  background: #FFF;
  flex-grow: 1;
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.1);
  overflow: hidden;
}

.results-scroll {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 4px 0;
}

.password-item {
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #F0F0F0;
  cursor: pointer;
  font-family: "Consolas", "Courier New", monospace;
  font-size: 14px;
  color: #333;
  min-width: 0;
}

.password-item .password-text {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 8px;
}

.password-item:hover {
  background: #E5F3FF;
  border-color: #Cce4f7;
}

.password-item:active {
  background: #CCE4F7;
}

.password-item .copy-hint {
  font-family: "Segoe UI", sans-serif;
  font-size: 10px;
  color: #888;
  opacity: 0;
  transition: opacity 0.15s;
}

.password-item:hover .copy-hint {
  opacity: 1;
}

.generate-button {
  min-width: 130px;
  padding: 5px 15px !important;
  font-weight: bold;
}

/* Wordlist Preview Grid */
.wordlist-preview-container {
  padding: 8px 4px;
}

.wordlist-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 5px;
  margin-top: 8px;
  max-height: 175px;
  overflow-y: auto;
  border: 1px solid #CCC;
  background: #FFF;
  padding: 6px;
  font-family: monospace;
  font-size: 11px;
}

.wordlist-item {
  padding: 2px 4px;
  background: #F5F5F5;
  border: 1px solid #E0E0E0;
  border-radius: 2px;
  text-align: center;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* Dialog Box */
.win7-dialog {
  visibility: visible !important;
  opacity: 1 !important;
  width: 420px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

/* Taskbar */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, rgba(26, 75, 126, 0.7) 0%, rgba(13, 38, 64, 0.8) 100%);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 50;
  padding: 0 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 -2px 10px rgba(0,0,0,0.15);
}

.taskbar-left {
  display: flex;
  align-items: center;
  height: 100%;
}

/* Start Button */
.start-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: radial-gradient(circle, #3d92e6 0%, #175294 100%);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 4px rgba(0,0,0,0.4), inset 0 0 5px rgba(255,255,255,0.3);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 8px;
  padding: 0;
  transition: filter 0.1s;
  outline: none;
}

.start-button:hover {
  filter: brightness(1.2);
  box-shadow: 0 0 8px rgba(0, 140, 255, 0.8);
}

.start-button:active {
  background: radial-gradient(circle, #175294 0%, #0d2c54 100%);
}

.start-logo {
  display: block;
  width: 18px;
  height: 18px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M2.5 12c0-4 3.5-7 7.5-7.5l.5 6.5-8 1z" fill="%23EE4F37"/><path d="M10.5 4.5c4 .5 7 3.5 7.5 7.5l-6.5.5-1-8z" fill="%233A9B48"/><path d="M11.5 19.5c-4-.5-7-3.5-7.5-7.5l6.5-.5 1 8z" fill="%2300A5F0"/><path d="M21.5 12c0 4-3.5 7-7.5 7.5l-.5-6.5 8-1z" fill="%23FBB800"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.taskbar-shortcuts {
  display: flex;
  height: 32px;
  align-items: center;
}

.taskbar-item {
  height: 28px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  color: #FFF;
  font-size: 11px;
  padding: 0 10px;
  margin-right: 4px;
  display: flex;
  align-items: center;
  cursor: pointer;
  text-shadow: 0 1px 1px rgba(0,0,0,0.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.taskbar-item img, .taskbar-item span {
  width: 14px;
  height: 14px;
  margin-right: 6px;
}

.taskbar-item:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.35);
}

.taskbar-item.active {
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
  font-weight: bold;
}

/* System Tray */
.system-tray {
  display: flex;
  align-items: center;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
  padding: 0 8px;
  color: #FFF;
  font-size: 11px;
}

.tray-icon {
  margin-right: 10px;
  cursor: pointer;
  opacity: 0.8;
}

.tray-icon:hover {
  opacity: 1;
}

.tray-clock {
  font-weight: normal;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  padding-left: 10px;
}

/* Start Menu Panel */
.start-menu {
  position: fixed;
  bottom: 40px;
  left: 4px;
  width: 380px;
  height: 400px;
  background: rgba(235, 245, 255, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 5px 5px 0 0;
  box-shadow: 0 -2px 20px rgba(0,0,0,0.3);
  display: flex;
  z-index: 40;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.start-menu-left {
  flex: 3;
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.start-menu-right {
  flex: 2;
  background: linear-gradient(to right, rgba(0, 40, 80, 0.05) 0%, rgba(0, 40, 80, 0.15) 100%);
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.start-menu-item {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 3px;
  margin-bottom: 4px;
  transition: background 0.1s;
}

.start-menu-item:hover {
  background: linear-gradient(to bottom, #E5F3FF 0%, #Cce4f7 100%);
  border: 1px solid #A8D1F7;
  padding: 7px 9px;
}

.start-menu-icon {
  font-size: 16px;
  margin-right: 10px;
}

.start-menu-text {
  font-size: 12px;
  color: #333;
}

.user-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 10px;
}

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 4px;
  background: #FFF;
  border: 1px solid #BBB;
  box-shadow: 0 2px 5px rgba(0,0,0,0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 24px;
  margin-bottom: 8px;
}

.user-name {
  font-size: 12px;
  font-weight: bold;
  color: #222;
}

/* Copied Toast alert */
.copied-toast {
  position: fixed;
  bottom: 60px;
  right: 15px;
  background: #FFFFE1; /* Windows Tooltip Yellow */
  border: 1px solid #767676;
  border-radius: 3px;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.25);
  padding: 6px 12px;
  font-size: 11px;
  color: #000;
  display: none;
  z-index: 1000;
  animation: fadeInOut 2s forwards;
}

@keyframes fadeInOut {
  0% { opacity: 0; transform: translateY(10px); }
  10% { opacity: 1; transform: translateY(0); }
  90% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-10px); }
}

/* Icon style in window title */
.title-icon {
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: middle;
}

.text-danger {
  color: #a94442;
}
