/* Retro Windows 95/98 inspired styles - adapted from usifwewerechao */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  /* Sidebar color */
  --sidebar: #ada1d1;
  --sidebar-pattern: #9a8ec4;

  /* Background colors */
  --bg-primary: #f5f1e9;
  --bg-secondary: #ffffff;

  /* Accent colors */
  --accent-pink: #e8a59e;
  --accent-blue: #659de0;
  --accent-green: #89bf67;
  --accent-yellow: #edbd45;
  --accent-purple: #9c74b8;

  /* Text colors */
  --text-primary: #2d3748;
  --text-secondary: #718096;

  /* Border colors */
  --border-light: rgba(0, 0, 0, 0.1);
  --border-dark: rgba(0, 0, 0, 0.2);
}

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

/* Selection styling */
::selection {
  background-color: #edbd45;
  color: #000;
}

/* Notebook grid background */
body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-primary);
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
}

/* Retro window frame */
.retro-window {
  border-radius: 0;
  border: 2px solid #000;
  box-shadow: none;
  overflow: hidden;
  background: white;
}

/* Window title bar */
.retro-window-title {
  background: var(--accent-blue);
  padding: 6px 12px;
  border-bottom: 2px solid #000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: bold;
  font-size: 18px;
  color: white;
  text-shadow: none;
}

/* Thin title bar variant */
.retro-window-title-thin {
  padding: 4px 8px;
  font-size: 13px;
}

/* Window buttons (minimize, maximize, close) */
.retro-window-buttons {
  display: flex;
  gap: 4px;
}

.retro-window-button {
  width: 20px;
  height: 20px;
  border: 2px solid #000;
  border-radius: 0;
  background: white;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  color: #000;
}

.retro-window-button:active {
  background: #e0e0e0;
}

/* Retro button */
.retro-button {
  padding: 8px 20px;
  border: 2px solid #000;
  border-radius: 0;
  background: white;
  font-weight: normal;
  font-size: 15px;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.2s;
  text-decoration: none;
  color: #000;
  display: inline-block;
}

.retro-button:hover {
  background: var(--accent-blue);
  color: white;
}

.retro-button:active {
  background: #4a8ad0;
}

/* Sidebar with diagonal dot pattern */
.sidebar-pattern {
  background-color: var(--sidebar);
  background-image:
    radial-gradient(circle, var(--sidebar-pattern) 1px, transparent 1px),
    radial-gradient(circle, var(--sidebar-pattern) 1px, transparent 1px);
  background-size: 12px 12px;
  background-position: 0 0, 6px 6px;
}

/* Main layout */
html, body {
  height: 100%;
  padding: 0;
}

body {
  display: flex;
  flex-direction: row;
}

/* Sidebar */
.sidebar {
  width: 280px;
  min-width: 280px;
  height: 100vh;
  padding: 24px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  border-right: 2px solid #000;
}

/* Main content area */
.main-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

/* Main window fills the content area */
.main-window {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.main-window-content {
  flex: 1;
  font-size: 1.1rem;
  color: var(--text-secondary);
  padding: 40px;
}

/* Header section */
.header {
  margin-bottom: 20px;
}

.header-window {
  max-width: 220px;
}

.header-title {
  font-size: 2rem;
  font-weight: bold;
  color: #000;
  text-align: center;
  padding: 16px;
}

.header-subtitle {
  font-size: 1.1rem;
  color: var(--text-primary);
  text-align: center;
  padding: 12px 16px 24px 16px;
}

/* Welcome window - offset to the right */
.welcome-section {
  margin-left: auto;
  margin-top: -20px;
  width: 200px;
}

.welcome-content {
  padding: 12px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: normal;
  color: var(--text-primary);
}

/* Navigation buttons */
.nav-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
}

.nav-button {
  width: 100%;
  padding: 10px 20px;
  text-align: left;
}

.nav-button.active {
  background: #000;
  color: #fff;
}

.nav-button.active:hover {
  background: #000;
  color: #fff;
}

/* Button with icon styling */
.nav-button-external {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.nav-button-external svg {
  width: 16px;
  height: 16px;
}

/* Retro card */
.retro-card {
  border: 2px solid #000;
  background: white;
  padding: 16px;
  box-shadow: none;
}

/* Retro Scrollbar */
::-webkit-scrollbar {
  width: 18px;
  height: 18px;
  background-color: #d0d0d0;
}

::-webkit-scrollbar:vertical {
  border-left: 2px solid #000;
}

::-webkit-scrollbar:horizontal {
  border-top: 2px solid #000;
}

::-webkit-scrollbar-track {
  background-color: #d0d0d0;
}

::-webkit-scrollbar-thumb {
  background-color: #fff;
  border: 2px solid #000;
  border-radius: 0px;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #f5f5f5;
}

::-webkit-scrollbar-thumb:active {
  background-color: #e0e0e0;
}

/* Up arrow button */
::-webkit-scrollbar-button:vertical:decrement {
  background-color: #fff;
  border: 2px solid #000;
  border-top: none;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpolygon points='4,0 8,5 0,5' fill='%23000'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

/* Down arrow button */
::-webkit-scrollbar-button:vertical:increment {
  background-color: #fff;
  border: 2px solid #000;
  border-bottom: none;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpolygon points='4,5 0,0 8,0' fill='%23000'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
}

::-webkit-scrollbar-button:hover {
  background-color: #f0f0f0;
}

::-webkit-scrollbar-button:active {
  background-color: #ddd;
}

::-webkit-scrollbar-corner {
  background-color: #d0d0d0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  body {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-width: unset;
    height: auto;
    border-right: none;
    border-bottom: 2px solid #000;
  }

  .main-content {
    padding: 20px;
  }

  .header-subtitle {
    font-size: 0.8rem;
  }

  .welcome-section {
    width: 160px;
  }

  .welcome-content {
    font-size: 1rem;
  }
}
