/* ==========================================================================
   CLASSIC WEB PORTAL - RETRO MOBILE-FIRST STYLESHEET (90s - Early 2000s)
   ========================================================================== */

:root {
  --portal-bg: #e6e8eb;
  --portal-header-bg: #000080;
  --portal-header-text: #ffffff;
  --portal-accent-yellow: #ffcc00;
  --portal-accent-gold: #e6b800;
  --portal-card-bg: #ffffff;
  --portal-border-dark: #808080;
  --portal-border-light: #ffffff;
  --portal-link-blue: #0000ee;
  --portal-link-visited: #551a8b;
  --portal-highlight-red: #cc0000;
  --portal-text-main: #000000;
  --portal-font-main: Verdana, Geneva, Tahoma, Arial, sans-serif;
  --portal-font-mono: "Courier New", Courier, monospace;
}

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

body {
  background-color: var(--portal-bg);
  color: var(--portal-text-main);
  font-family: var(--portal-font-main);
  font-size: 14px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
}

/* Links */
a {
  color: var(--portal-link-blue);
  text-decoration: underline;
  cursor: pointer;
}
a:visited {
  color: var(--portal-link-visited);
}
a:hover {
  color: #ff0000;
  background-color: #ffffcc;
}

/* Bevel Utility Classes */
.bevel-box {
  background: #f0f0f0;
  border: 2px outset #ffffff;
  box-shadow: 1px 1px 0px #000000;
  padding: 8px;
  margin-bottom: 12px;
}

.bevel-inset {
  background: #ffffff;
  border: 2px inset #7f9db9;
  padding: 8px;
}

.bevel-header {
  background: linear-gradient(90deg, #000080 0%, #104e8b 100%);
  color: #ffffff;
  padding: 5px 8px;
  font-weight: bold;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Header & Navigation Bar */
.top-banner-strip {
  background-color: #000055;
  color: #ffea00;
  text-align: center;
  padding: 4px;
  font-size: 11px;
  font-family: var(--portal-font-mono);
  border-bottom: 1px solid var(--portal-accent-yellow);
}

.portal-header {
  background: linear-gradient(180deg, #000080 0%, #00004d 100%);
  color: white;
  padding: 12px 10px;
  border-bottom: 3px solid var(--portal-accent-yellow);
}

.portal-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.portal-logo-title {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow: 2px 2px 0px #000000, -1px -1px 0px #000080;
  font-family: Arial, sans-serif;
}

.portal-logo-title span {
  color: var(--portal-accent-yellow);
}

.portal-tagline {
  font-size: 12px;
  color: #d1e0ff;
  font-style: italic;
}

/* Search Box Container */
.portal-search-bar {
  background: #d4d0c8;
  border: 2px outset #ffffff;
  padding: 10px;
  margin: 10px 0 5px 0;
  border-radius: 4px;
}

.portal-search-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.search-input-group {
  display: flex;
  width: 100%;
}

.portal-search-input {
  flex: 1;
  padding: 8px 10px;
  font-size: 14px;
  border: 2px inset #7f9db9;
  font-family: var(--portal-font-main);
  border-radius: 0;
}

.portal-search-btn {
  background: linear-gradient(180deg, #ffffcc 0%, #ffcc00 100%);
  border: 2px outset #ffffff;
  font-weight: bold;
  padding: 0 16px;
  font-size: 14px;
  cursor: pointer;
  color: #000000;
  display: flex;
  align-items: center;
  gap: 4px;
}

.portal-search-btn:active {
  border-style: inset;
}

.portal-search-options {
  display: flex;
  gap: 10px;
  font-size: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.portal-select {
  padding: 4px 6px;
  border: 2px inset #7f9db9;
  font-size: 12px;
  background: white;
}

/* Main Navigation Strip */
.portal-nav-strip {
  background: #000066;
  border-top: 1px solid #4d4dff;
  border-bottom: 2px solid #000033;
  display: flex;
  overflow-x: auto;
  white-space: nowrap;
  padding: 6px 10px;
  gap: 8px;
  -webkit-overflow-scrolling: touch;
}

.portal-nav-item {
  color: #ffffff;
  background: #000099;
  border: 1px solid #6666ff;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: bold;
  text-decoration: none;
  border-radius: 2px;

}

.portal-nav-item:hover {
  background: #ffcc00;
  color: #000000;
  text-decoration: none;
}

.portal-nav-item.active {
  background: var(--portal-accent-yellow);
  color: #000000;
}

/* Marquee Bar */
.marquee-bar {
  background: #ffffcc;
  border-top: 1px solid #cccc99;
  border-bottom: 1px solid #cccc99;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: bold;
  color: #990000;
  display: flex;
  align-items: center;
}

.marquee-label {
  background: #990000;
  color: #ffffff;
  padding: 1px 6px;
  font-size: 10px;
  font-weight: bold;
  margin-right: 8px;
  white-space: nowrap;
}

/* Container & Layout Grid */
.portal-container {
  padding: 10px;
  max-width: 1200px;
  margin: 0 auto;
}

.portal-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Featured & Website of the Day Cards */
.wotd-card {
  background: #fff9e6;
  border: 2px solid #ffcc00;
  padding: 10px;
  position: relative;
}

.wotd-badge {
  position: absolute;
  top: -10px;
  right: 10px;
  background: #cc0000;
  color: #ffffff;
  font-size: 10px;
  font-weight: bold;
  padding: 2px 8px;
  border: 1px solid #ffffff;
  box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
  text-transform: uppercase;
}

.wotd-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.site-thumb-preview {
  width: 100%;
  height: 140px;
  background: #111827;
  color: #38bdf8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px inset #7f9db9;
  text-align: center;
  padding: 10px;
  font-family: var(--portal-font-mono);
}

.site-thumb-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wotd-title {
  font-size: 16px;
  font-weight: bold;
}

.site-meta-bar {
  font-size: 11px;
  color: #555555;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.tag-badge {
  background: #e0e0e0;
  border: 1px solid #a0a0a0;
  padding: 1px 5px;
  font-size: 10px;
  color: #333333;
}

/* Categories Section */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  padding: 4px;
}

.category-card-item {
  background: #ffffff;
  border: 1px solid #cccccc;
  padding: 6px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--portal-link-blue);
  transition: all 0.1s ease;
}

.category-card-item:hover {
  background: #e6f2ff;
  border-color: #000080;
}

.category-icon {
  font-size: 14px;
}

.category-count {
  font-size: 10px;
  color: #666666;
  margin-left: auto;
}

/* Website Directory Cards List */
.site-list-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.site-card {
  background: #ffffff;
  border: 1px solid #b0b0b0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.site-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px dashed #cccccc;
  padding-bottom: 4px;
}

.site-name {
  font-size: 15px;
  font-weight: bold;
}

.site-year {
  font-size: 11px;
  color: #666666;
  font-family: var(--portal-font-mono);
}

.site-desc {
  font-size: 12px;
  color: #333333;
}

.site-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  font-size: 11px;
}

.visit-btn {
  background: linear-gradient(180deg, #ffffff 0%, #e6e6e6 100%);
  border: 2px outset #ffffff;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: bold;
  color: #000080;
  text-decoration: none;
  box-shadow: 1px 1px 0px #000000;
}

.visit-btn:hover {
  background: #ffcc00;
  color: #000000;
  text-decoration: none;
}

/* Visitor Counter Widget */
.hit-counter-box {
  display: inline-flex;
  background: #000000;
  border: 2px inset #555555;
  padding: 2px 4px;
  font-family: "Courier New", Courier, monospace;
  font-weight: bold;
  color: #00ff00;
  letter-spacing: 2px;
  font-size: 13px;
  box-shadow: inset 0 0 5px rgba(0,255,0,0.5);
}

/* Retro Badges Strip */
.badges-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  margin-top: 10px;
}

.badge-item {
  border: 1px solid #777;
  font-size: 9px;
  font-weight: bold;
  padding: 2px 4px;
  font-family: var(--portal-font-mono);
  background: #333;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.badge-item.ie {
  background: #0078d7;
  color: #fff;
}

.badge-item.netscape {
  background: #005b5c;
  color: #4df;
}

.badge-item.valid {
  background: #ff6600;
  color: #fff;
}

/* ==========================================================================
   RETRO SCROLLBARS (WINDOWS 95 / 98 / 2000 STYLE)
   ========================================================================== */
::-webkit-scrollbar {
  width: 14px;
  height: 14px;
  background-color: #dfdfdf;
}

::-webkit-scrollbar-track {
  background: #e0e0e0;
  border: 1px inset #808080;
}

::-webkit-scrollbar-thumb {
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  box-shadow: inset 1px 1px 0px #dfdfdf, inset -1px -1px 0px #808080;
}

::-webkit-scrollbar-thumb:active {
  background: #a0a0a0;
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

::-webkit-scrollbar-corner {
  background: #c0c0c0;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #c0c0c0 #dfdfdf;
}

/* ==========================================================================
   WINDOWS 95 / RETRO MODAL DIALOG
   ========================================================================== */
.win95-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 12px;
  backdrop-filter: blur(1px);
}

.win95-window {
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  box-shadow: 3px 3px 12px rgba(0, 0, 0, 0.8), inset 1px 1px 0 #dfdfdf, inset -1px -1px 0 #808080;
  max-width: 440px;
  width: 100%;
  padding: 3px;
  font-family: Tahoma, Arial, sans-serif;
  color: #000000;
  animation: win95Pop 0.15s ease-out;
}

@keyframes win95Pop {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.win95-titlebar {
  background: linear-gradient(90deg, #000080 0%, #1084d0 100%);
  color: #ffffff;
  padding: 3px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 0.5px;
}

.win95-close-btn {
  background: #c0c0c0;
  border-top: 1px solid #ffffff;
  border-left: 1px solid #ffffff;
  border-right: 1px solid #000000;
  border-bottom: 1px solid #000000;
  font-weight: bold;
  font-size: 11px;
  width: 16px;
  height: 14px;
  line-height: 12px;
  text-align: center;
  color: #000000;
  cursor: pointer;
  padding: 0;
}

.win95-close-btn:active {
  border-top: 1px solid #000000;
  border-left: 1px solid #000000;
  border-right: 1px solid #ffffff;
  border-bottom: 1px solid #ffffff;
}

.win95-body {
  padding: 12px 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.45;
}

.win95-icon {
  font-size: 32px;
  flex-shrink: 0;
}

.win95-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px 10px;
  border-top: 1px solid #808080;
  background: #c0c0c0;
}

.win95-btn {
  background: #c0c0c0;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #000000;
  border-bottom: 2px solid #000000;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  color: #000000;
  outline: 1px dotted transparent;
}

.win95-btn:focus {
  outline: 1px dotted #000000;
}

.win95-btn:active {
  border-top: 2px solid #000000;
  border-left: 2px solid #000000;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
}

/* ==========================================================================
   SCROLLABLE RETRO CONTAINERS
   ========================================================================== */
.retro-scrollbox {
  border: 2px inset #7f9db9;
  background: #ffffff;
  overflow-y: scroll;
  overflow-x: hidden;
  padding: 4px;
}

.retro-table-scroll {
  border: 2px inset #7f9db9;
  background: #ffffff;
  overflow-x: auto;
  overflow-y: auto;
  max-height: 240px;
  -webkit-overflow-scrolling: touch;
}

/* Footer */
.portal-footer {
  background: #d4d0c8;
  border-top: 2px outset #ffffff;
  padding: 15px 10px;
  text-align: center;
  margin-top: 20px;
  font-size: 11px;
  color: #333;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

/* ==========================================================================
   MOBILE & TABLET RETRO NOSTALGIC DENSITY (Max Width 767px)
   ========================================================================== */
@media (max-width: 767px) {
  body {
    font-size: 12px;
  }

  .portal-container {
    padding: 0 4px;
  }

  .top-banner-strip {
    font-size: 10px;
    padding: 3px;
  }

  .portal-header {
    padding: 8px 6px;
  }

  .portal-logo-title {
    font-size: 21px;
    letter-spacing: 0.5px;
  }

  .portal-tagline {
    font-size: 10.5px;
  }

  .portal-search-bar {
    padding: 6px;
    margin: 6px 0 4px 0;
  }

  .portal-search-input {
    padding: 6px 8px;
    font-size: 12px;
  }

  .portal-search-btn {
    padding: 6px 10px;
    font-size: 12px;
  }

  .portal-nav-strip {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    gap: 4px;
    padding: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .portal-nav-item {
    font-size: 11px;
    padding: 3px 7px;
    flex-shrink: 0;
  }

  /* Compact 2-column or tiled layout on mobile */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 3px !important;
    max-height: 190px;
    overflow-y: scroll;
    padding: 4px;
    background: #ffffff;
    border: 2px inset #7f9db9;
  }

  .category-card-item {
    padding: 4px 6px;
    font-size: 11px;
    border: 1px solid #d8d8d8;
  }

  .category-icon {
    font-size: 12px;
  }

  .category-count {
    font-size: 9px;
  }

  /* 2-Column Dense Site Grid on Mobile */
  .site-list-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  .site-card {
    padding: 6px;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .site-name {
    font-size: 12px;
    line-height: 1.25;
  }

  .site-desc {
    font-size: 10.5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: #444;
  }

  .site-card-footer {
    font-size: 9.5px;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 4px;
  }

  .visit-btn {
    padding: 2px 6px;
    font-size: 10px;
    width: 100%;
    text-align: center;
    display: block;
  }

  .wotd-content {
    flex-direction: column;
    gap: 8px;
  }

  .site-thumb-preview {
    width: 100%;
    height: 110px;
  }

  .bevel-box {
    padding: 6px;
    margin-bottom: 8px;
  }

  .bevel-header {
    font-size: 11px;
    padding: 4px 6px;
  }
}

/* Responsive Desktop Layout (Tablet & Up) */
@media (min-width: 768px) {
  .portal-brand {
    flex-direction: row;
    justify-content: space-between;
  }
  .categories-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .site-list-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .portal-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 16px;
  }
}

@media (min-width: 1024px) {
  .categories-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .portal-grid {
    display: grid;
    grid-template-columns: 260px 1fr 240px;
    gap: 16px;
  }
}
