/* ==========================================================================
   Windows 95 Design System for gua.my.id
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=VT323&display=swap');

:root {
  --win-teal: #008080;
  --win-gray: #c0c0c0;
  --win-light: #ffffff;
  --win-dark: #808080;
  --win-black: #000000;
  --win-blue: #000080;
  --win-blue-light: #1084d0;
  --win-tooltip: #ffffe1;

  /* 3D Bevel Box Shadows */
  --win-outset: inset -1px -1px var(--win-black),
                inset 1px 1px var(--win-light),
                inset -2px -2px var(--win-dark),
                inset 2px 2px #dfdfdf;

  --win-inset: inset -1px -1px var(--win-light),
               inset 1px 1px var(--win-dark),
               inset -2px -2px #dfdfdf,
               inset 2px 2px var(--win-black);

  --win-btn-outset: inset -1px -1px var(--win-black),
                    inset 1px 1px var(--win-light),
                    inset -2px -2px var(--win-dark),
                    inset 2px 2px #dfdfdf;

  --win-btn-inset: inset -1px -1px var(--win-light),
                   inset 1px 1px var(--win-black),
                   inset -2px -2px #dfdfdf,
                   inset 2px 2px var(--win-dark);

  --font-system: 'MS Sans Serif', Tahoma, 'Segoe UI', Arial, sans-serif;
  --font-mono: 'Lucida Console', 'Courier New', monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-system);
  -webkit-font-smoothing: none;
  -moz-osx-font-smoothing: none;
}

html, body {
  min-height: 100vh;
  background-color: var(--win-teal);
  color: var(--win-black);
  font-size: 13px;
  line-height: 1.35;
  user-select: text;
}

/* Authentic Desktop Background with dotted pattern */
body {
  background-color: #008080;
  background-image: radial-gradient(rgba(0, 0, 0, 0.15) 1px, transparent 1px);
  background-size: 4px 4px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 42px; /* space for bottom taskbar */
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================
   Windows 95 Window Frame & Dialogs
   ========================================================================== */

.win-window {
  background: var(--win-gray);
  box-shadow: var(--win-outset);
  padding: 3px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.win-titlebar {
  background: linear-gradient(90deg, var(--win-blue), var(--win-blue-light));
  color: var(--win-light);
  padding: 3px 4px 3px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 0.2px;
  user-select: none;
}

.win-titlebar.inactive {
  background: linear-gradient(90deg, #808080, #b5b5b5);
}

.win-title-group {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.win-controls {
  display: flex;
  gap: 2px;
}

.win-btn-control {
  width: 16px;
  height: 14px;
  background: var(--win-gray);
  box-shadow: var(--win-outset);
  border: none;
  font-size: 10px;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  color: #000;
}

.win-btn-control:active {
  box-shadow: var(--win-btn-inset);
}

/* Menu Bar (File, Edit, View, Help) */
.win-menubar {
  display: flex;
  gap: 12px;
  padding: 3px 6px;
  font-size: 12px;
  border-bottom: 1px solid var(--win-dark);
  background: var(--win-gray);
}

.win-menuitem {
  cursor: pointer;
  padding: 1px 5px;
}

.win-menuitem:hover {
  background: var(--win-blue);
  color: var(--win-light);
}

/* Status Bar */
.win-statusbar {
  display: flex;
  gap: 3px;
  padding: 3px 2px 1px 2px;
  background: var(--win-gray);
  margin-top: auto;
}

.win-status-panel {
  box-shadow: var(--win-inset);
  padding: 2px 8px;
  font-size: 11px;
  color: #222;
  white-space: nowrap;
}

/* ==========================================================================
   Buttons & Controls
   ========================================================================== */

.win-btn {
  background: var(--win-gray);
  box-shadow: var(--win-btn-outset);
  border: none;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: normal;
  color: var(--win-black);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  outline: none;
  min-height: 24px;
  text-decoration: none;
}

.win-btn:active {
  box-shadow: var(--win-btn-inset);
  padding: 5px 13px 3px 15px;
}

.win-btn:focus {
  outline: 1px dotted #000;
  outline-offset: -4px;
}

.win-btn-default {
  box-shadow: 0 0 0 1px #000, var(--win-btn-outset);
  font-weight: bold;
}

.win-btn-default:active {
  box-shadow: 0 0 0 1px #000, var(--win-btn-inset);
}

/* Inset Text Fields & Sunken Wells */
.win-input {
  background: var(--win-light);
  color: var(--win-black);
  box-shadow: var(--win-inset);
  border: none;
  padding: 4px 6px;
  font-size: 13px;
  outline: none;
  font-family: var(--font-system);
}

.win-input:focus {
  background: #ffffff;
}

.win-well {
  background: #ffffff;
  box-shadow: var(--win-inset);
  padding: 10px;
}

.win-well-gray {
  background: var(--win-gray);
  box-shadow: var(--win-inset);
  padding: 10px;
}

/* Fieldset Group Box */
.win-fieldset {
  border: 2px groove #dfdfdf;
  padding: 12px;
  margin-bottom: 12px;
  position: relative;
}

.win-legend {
  font-size: 12px;
  font-weight: bold;
  padding: 0 4px;
  color: #000;
}

/* ==========================================================================
   Tabs Component
   ========================================================================== */

.win-tabs-header {
  display: flex;
  gap: 2px;
  padding-left: 4px;
  border-bottom: 2px solid var(--win-gray);
  position: relative;
  z-index: 2;
  margin-bottom: -2px;
}

.win-tab-btn {
  background: var(--win-gray);
  border: 1px solid var(--win-light);
  border-bottom: none;
  box-shadow: inset 1px 1px var(--win-light), inset -1px 0 var(--win-dark);
  padding: 4px 12px;
  font-size: 12px;
  cursor: pointer;
  border-radius: 3px 3px 0 0;
  margin-top: 2px;
}

.win-tab-btn.active {
  padding: 6px 14px;
  margin-top: 0;
  background: var(--win-gray);
  box-shadow: inset 1px 1px var(--win-light), inset -1px 0 var(--win-black);
  font-weight: bold;
  border-bottom: 2px solid var(--win-gray);
}

.win-tab-content {
  box-shadow: var(--win-outset);
  background: var(--win-gray);
  padding: 16px;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Taskbar (Fixed Bottom)
   ========================================================================== */

.win-taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 34px;
  background: var(--win-gray);
  box-shadow: inset 0 1px var(--win-light), inset 0 2px #dfdfdf;
  border-top: 1px solid var(--win-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
  z-index: 9999;
  user-select: none;
}

.win-start-btn {
  background: var(--win-gray);
  box-shadow: var(--win-btn-outset);
  border: none;
  height: 26px;
  padding: 2px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
}

.win-start-btn:active, .win-start-btn.open {
  box-shadow: var(--win-btn-inset);
  padding: 3px 7px 1px 9px;
}

.win-task-items {
  display: flex;
  gap: 4px;
  flex: 1;
  margin: 0 8px;
  overflow-x: auto;
}

.win-task-tab {
  background: var(--win-gray);
  box-shadow: var(--win-btn-outset);
  height: 26px;
  padding: 2px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  border: none;
}

.win-task-tab.active {
  box-shadow: var(--win-btn-inset);
  background: #dedede;
  font-weight: bold;
}

.win-tray {
  box-shadow: var(--win-inset);
  height: 24px;
  padding: 2px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

/* ==========================================================================
   Start Menu Dropup
   ========================================================================== */

.win-start-menu {
  position: fixed;
  bottom: 34px;
  left: 2px;
  width: 240px;
  background: var(--win-gray);
  box-shadow: var(--win-outset);
  z-index: 10000;
  display: flex;
}

.win-start-banner {
  background: linear-gradient(180deg, #000080, #1084d0);
  color: var(--win-light);
  width: 32px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  font-weight: bold;
  font-size: 16px;
  letter-spacing: 2px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}

.win-start-list {
  flex: 1;
  padding: 4px 2px;
  display: flex;
  flex-direction: column;
}

.win-start-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px;
  font-size: 12px;
  color: #000;
  cursor: pointer;
}

.win-start-item:hover {
  background: var(--win-blue);
  color: var(--win-light);
}

.win-start-divider {
  height: 1px;
  border-top: 1px solid var(--win-dark);
  border-bottom: 1px solid var(--win-light);
  margin: 4px 2px;
}

/* ==========================================================================
   Desktop Shortcuts Icons
   ========================================================================== */

.desktop-icon-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 0;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 72px;
  cursor: pointer;
  text-align: center;
  padding: 4px 2px;
}

.desktop-icon:hover {
  background: rgba(0, 0, 128, 0.4);
}

.desktop-icon:focus, .desktop-icon.selected {
  outline: 1px dotted #ffffff;
}

.desktop-icon-label {
  color: #ffffff;
  font-size: 11px;
  margin-top: 4px;
  text-shadow: 1px 1px 1px #000000;
  word-break: break-word;
}

/* ==========================================================================
   Classic Table
   ========================================================================== */

.win-table-container {
  box-shadow: var(--win-inset);
  background: #ffffff;
  overflow-x: auto;
  max-height: 480px;
}

.win-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.win-table th {
  background: var(--win-gray);
  box-shadow: var(--win-outset);
  padding: 4px 8px;
  text-align: left;
  font-weight: normal;
  border-right: 1px solid var(--win-dark);
  position: sticky;
  top: 0;
  user-select: none;
}

.win-table td {
  padding: 4px 8px;
  border-bottom: 1px solid #e0e0e0;
  white-space: nowrap;
}

.win-table tr:hover td {
  background: #000080;
  color: #ffffff;
}

.win-table tr:hover td a {
  color: #ffffff;
}

/* Modal Overlay */
.win-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
}

/* Layout container */
.container {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px;
  position: relative;
  z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .desktop-icon-grid {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 16px;
    gap: 10px;
  }
}
