/**
 * TCG Masters Web Simulator - Windows XP Luna Blue Theme
 * Authentic Windows XP retro styling, Luna Blue titlebars, beveled UI, Start button & taskbar
 */

body.theme-xp {
  font-family: Tahoma, "Segoe UI", Arial, sans-serif;
  background-color: #3a6ea5;
  color: #000;
  padding-bottom: 30px; /* Space for the XP Taskbar */
}

/* ================= XP HEADER / TOP WINDOW BAR ================= */
body.theme-xp .app-header {
  background: linear-gradient(to bottom, #0058ee 0%, #3593ff 4%, #288eff 6%, #127dff 8%, #036ffc 10%, #0262ee 14%, #0057e5 20%, #0054e3 40%, #0055e7 60%, #004bd5 80%, #0042c1 100%);
  border-bottom: 2px solid #002277;
  color: #ffffff;
  padding: 4px 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

body.theme-xp .brand-title {
  color: #ffffff;
  font-weight: bold;
  font-size: 0.95rem;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
}

body.theme-xp .brand-badge {
  background: #ece9d8;
  color: #000;
  border: 1px solid #7f9db9;
  border-radius: 2px;
}

body.theme-xp .theme-selector-box {
  color: #ffffff;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.6);
}

body.theme-xp .theme-dropdown {
  background: #ffffff;
  border: 1px solid #7f9db9;
  border-radius: 0;
  color: #000;
  font-family: Tahoma, sans-serif;
  font-size: 0.75rem;
}

/* ================= XP 3D BEVELED BUTTONS ================= */
body.theme-xp .app-btn,
body.theme-xp .win-btn {
  background: linear-gradient(to bottom, #ffffff 0%, #f1efe2 10%, #ece9d8 80%, #d8d0c5 100%);
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #707070;
  border-bottom: 1px solid #707070;
  border-radius: 3px;
  color: #000000;
  font-family: Tahoma, sans-serif;
  font-size: 0.75rem;
  font-weight: normal;
  padding: 3px 10px;
  box-shadow: inset 1px 1px 0px #fff, 1px 1px 2px rgba(0,0,0,0.2);
}

body.theme-xp .app-btn:hover,
body.theme-xp .win-btn:hover {
  background: linear-gradient(to bottom, #ffffff 0%, #fff7e6 10%, #fedba2 80%, #f5be67 100%);
  border-top: 1px solid #ffcc66;
  border-left: 1px solid #ffcc66;
  border-right: 1px solid #cc6600;
  border-bottom: 1px solid #cc6600;
}

body.theme-xp .app-btn:active,
body.theme-xp .win-btn:active {
  border-top: 1px solid #707070;
  border-left: 1px solid #707070;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
  background: #d8d0c5;
}

body.theme-xp .app-btn.primary {
  background: linear-gradient(to bottom, #3980f4 0%, #2062d9 50%, #154fb5 100%);
  border-top: 1px solid #6ba5ff;
  border-left: 1px solid #6ba5ff;
  border-right: 1px solid #082d70;
  border-bottom: 1px solid #082d70;
  color: #ffffff;
  font-weight: bold;
}

body.theme-xp .app-btn.accent {
  background: linear-gradient(to bottom, #ffc04d 0%, #f59e0b 50%, #d97706 100%);
  color: #000;
}

body.theme-xp .app-btn.danger {
  background: linear-gradient(to bottom, #ff6b6b 0%, #dc2626 50%, #991b1b 100%);
  color: #fff;
}

/* ================= XP PLAYER MAT FRAMES ================= */
body.theme-xp .player-mat {
  background: #ece9d8;
  border-top: 3px solid #0055ea;
  border-left: 3px solid #0055ea;
  border-right: 3px solid #0055ea;
  border-bottom: 3px solid #0055ea;
  border-radius: 6px 6px 0 0;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.4);
}

body.theme-xp .player-info-bar {
  background: linear-gradient(to right, #0a246a 0%, #a6caf0 100%);
  padding: 4px 8px;
  border-radius: 3px;
  color: #ffffff;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
}

body.theme-xp .player-mat.p2 .player-info-bar {
  background: linear-gradient(to right, #800080 0%, #d8bfd8 100%);
}

body.theme-xp .deck-title {
  color: #ffffff;
}

body.theme-xp .pokemon-slot {
  border: 2px dashed #7f9db9;
  background: #dcd8c8;
}

body.theme-xp .pokemon-slot.active-spot {
  border: 2px solid #d45e00;
  background: #efe4d0;
}

body.theme-xp .zone-label {
  color: #000000;
  font-weight: bold;
}

body.theme-xp .deck-pile-box {
  background: linear-gradient(135deg, #0055ea, #002277);
  border: 2px solid #ffffff;
}

body.theme-xp .discard-pile-box {
  background: linear-gradient(135deg, #707070, #404040);
  border: 2px solid #ffffff;
}

/* ================= XP STADIUM & CENTER DIVIDER ================= */
body.theme-xp .arena-center-divider {
  background: #ece9d8;
  border: 2px solid #7f9db9;
  border-radius: 0;
}

body.theme-xp .turn-badge {
  background: #ffffff;
  color: #000;
  border: 1px solid #7f9db9;
}

body.theme-xp .active-badge {
  border: 1px solid #000;
}

/* ================= XP SIDEBAR / LOG WINDOW ================= */
body.theme-xp .sidebar-panel {
  background: #ece9d8;
  border-left: 2px solid #0055ea;
}

body.theme-xp .sidebar-header {
  background: linear-gradient(to bottom, #0058ee 0%, #004bd5 100%);
  color: #ffffff;
  padding: 4px 8px;
}

body.theme-xp .sidebar-title {
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: bold;
}

body.theme-xp .game-log-container {
  background: #ffffff;
  border: 1px solid #7f9db9;
  margin: 6px;
  font-family: "Lucida Console", Courier, monospace;
}

body.theme-xp .log-entry {
  border: none;
  border-bottom: 1px dotted #ccc;
  border-radius: 0;
  padding: 2px 4px;
}

/* ================= XP MODAL WINDOWS ================= */
body.theme-xp .modal-card {
  background: #ece9d8;
  border: 3px solid #0055ea;
  border-radius: 6px 6px 0 0;
  box-shadow: 4px 4px 16px rgba(0,0,0,0.6);
}

body.theme-xp .modal-header {
  background: linear-gradient(to bottom, #0058ee 0%, #3593ff 4%, #288eff 6%, #127dff 8%, #036ffc 10%, #0262ee 14%, #0057e5 20%, #0054e3 40%, #0055e7 60%, #004bd5 80%, #0042c1 100%);
  color: #ffffff;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

body.theme-xp .modal-title {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: bold;
  text-shadow: 1px 1px 2px #000;
}

body.theme-xp .modal-close-btn {
  background: linear-gradient(to bottom, #f27259 0%, #c4381c 50%, #8c1c04 100%);
  border: 1px solid #ffffff;
  color: #ffffff;
  border-radius: 3px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  box-shadow: inset 1px 1px 0px rgba(255,255,255,0.4);
}

body.theme-xp .modal-close-btn:hover {
  background: linear-gradient(to bottom, #ff8c73 0%, #e04c2e 50%, #a82408 100%);
}

body.theme-xp .modal-body {
  background: #ece9d8;
  color: #000;
}

body.theme-xp .modal-footer {
  background: #ece9d8;
  border-top: 1px solid #d0ccc0;
}

/* ================= XP BOTTOM TASKBAR ================= */
.xp-taskbar {
  display: none;
}

body.theme-xp .xp-taskbar {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30px;
  background: linear-gradient(to bottom, #245edb 0%, #3f8cf3 9%, #245edb 18%, #245edb 92%, #1941a5 100%);
  border-top: 1px solid #3c7bf4;
  z-index: 1000;
  align-items: center;
  padding: 0 4px;
}

/* Iconic XP Start Button */
.xp-start-btn {
  height: 28px;
  padding: 0 14px 0 10px;
  background: linear-gradient(to bottom, #3c8800 0%, #68b400 10%, #54a600 50%, #388400 90%, #206800 100%);
  border-radius: 0 8px 8px 0;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #ffffff;
  font-family: "Franklin Gothic Medium", Tahoma, sans-serif;
  font-size: 0.95rem;
  font-weight: bold;
  font-style: italic;
  text-shadow: 1px 1px 2px #000;
  box-shadow: 1px 0 4px rgba(0,0,0,0.4);
  cursor: pointer;
  margin-right: 8px;
}

.xp-start-btn:hover {
  background: linear-gradient(to bottom, #4ca600 0%, #7ecc00 10%, #64c200 50%, #449c00 90%, #288000 100%);
}

.xp-flag-icon {
  font-size: 14px;
}

.xp-taskbar-tasks {
  flex: 1;
  display: flex;
  gap: 4px;
  overflow-x: auto;
}

.xp-task-pill {
  height: 24px;
  padding: 0 10px;
  background: linear-gradient(to bottom, #3c80f4 0%, #1e5dd6 50%, #154cb5 100%);
  border: 1px solid #143e94;
  border-radius: 2px;
  color: #fff;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: inset 1px 1px 0px rgba(255,255,255,0.3);
}

.xp-task-pill.active {
  background: linear-gradient(to bottom, #1947a8 0%, #1c52bd 50%, #2a68e0 100%);
  box-shadow: inset 1px 1px 2px rgba(0,0,0,0.4);
}

/* System Tray */
.xp-system-tray {
  height: 100%;
  background: linear-gradient(to bottom, #0c59b9 0%, #1669cb 50%, #0d54b0 100%);
  border-left: 1px solid #08408a;
  border-top: 1px solid #08408a;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  color: #ffffff;
  font-size: 0.75rem;
}

/* ================= XP START MENU POPUP ================= */
.xp-start-menu {
  display: none;
  position: fixed;
  bottom: 30px;
  left: 0;
  width: 380px;
  height: 440px;
  background: #ffffff;
  border-top: 3px solid #0055ea;
  border-right: 3px solid #0055ea;
  border-radius: 0 8px 0 0;
  box-shadow: 4px -4px 16px rgba(0,0,0,0.5);
  z-index: 1001;
  flex-direction: column;
}

.xp-start-menu.open {
  display: flex;
}

.xp-start-header {
  height: 54px;
  background: linear-gradient(to bottom, #0058ee 0%, #3593ff 4%, #288eff 6%, #127dff 8%, #036ffc 10%, #0262ee 14%, #0057e5 20%, #0054e3 40%, #0055e7 60%, #004bd5 80%, #0042c1 100%);
  border-radius: 0 6px 0 0;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 10px;
  color: #fff;
  font-weight: bold;
}

.xp-user-avatar {
  width: 38px;
  height: 38px;
  border-radius: 4px;
  border: 2px solid #fff;
  background: #f59e0b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.xp-start-columns {
  flex: 1;
  display: flex;
}

.xp-start-left {
  flex: 1;
  background: #ffffff;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.xp-start-right {
  width: 150px;
  background: #d3e5fa;
  border-left: 1px solid #95bdee;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.75rem;
}

.xp-start-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 3px;
  text-decoration: none;
  color: #000;
  font-size: 0.8rem;
  cursor: pointer;
}

.xp-start-item:hover {
  background: #2b72e2;
  color: #fff;
}

.xp-start-footer {
  height: 42px;
  background: linear-gradient(to bottom, #3980f4 0%, #2062d9 50%, #154fb5 100%);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 12px;
  gap: 12px;
}

.xp-footer-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
