/* ==========================================================================
   RETRO PORTAL 2002 - CSS DESIGN SYSTEM (Web 1.0 / Early Web 2.0 Aesthetics)
   Version: 2.0 - More Vibrant and Colorful Portal Theme
   Written in Raw CSS, fully responsive using Grid and Flexbox
   ========================================================================== */

/* 1. Reset and base setup */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  /* Bright, vibrant retro teal background */
  background-color: #008080; 
  /* Subtle white pixel grid over the teal background */
  background-image: 
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 25px 25px;
  color: #000000;
  /* Verdana as primary web-safe font, fallback to Tahoma/Arial */
  font-family: Verdana, Tahoma, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.5;
  padding: 20px 0;
}

/* 2. Headings & Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, "Times New Roman", Times, serif; /* Serifs for headings */
  color: #003366;
  font-weight: bold;
  margin-bottom: 0.8em;
}

h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }

/* Links - Classic bright blue and purple, red on hover */
a {
  color: #0000ff;
  text-decoration: underline;
  font-weight: 500;
}

a:visited {
  color: #800080;
}

a:hover {
  color: #ff0000 !important;
  text-decoration: underline;
  background-color: #ffff99; /* retro highlight effect */
}

/* Standard styling elements */
p {
  margin-bottom: 1.2em;
}

hr.retro-hr {
  border: 0;
  border-top: 2px dashed #000000;
  height: 0;
  margin: 20px 0;
}

blockquote {
  border-left: 4px solid #ff0000;
  margin: 15px 10px;
  padding: 8px 12px;
  background-color: #ffffcc;
  font-style: italic;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  border-right: 1px solid #ccc;
}

/* 3. Main Site Layout */
.site-container {
  max-width: 980px;
  width: 95%;
  margin: 0 auto;
  background-color: #ffffff; /* Bright white content container */
  border: 3px double #000000; /* Double borders! Very retro */
  padding: 15px;
  box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.3); /* Heavy flat block-shadow */
}

/* Header Banner - Colorful Gradient */
.site-header {
  border: 2px solid #000000;
  /* Bright blue-purple gradient */
  background: linear-gradient(135deg, #000099 0%, #3399ff 100%);
  color: #ffffff;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: inset -3px -3px 0px rgba(0,0,0,0.3);
}

.header-logo h1 {
  color: #ffff00; /* Neon yellow title */
  font-family: Georgia, serif;
  font-size: 32px;
  letter-spacing: 2px;
  margin-bottom: 5px;
  text-align: center;
  text-shadow: 3px 3px 0px #000000;
  animation: pulse-title 5s infinite;
}

.header-subtitle {
  font-family: Verdana, sans-serif;
  font-size: 11px;
  text-align: center;
  color: #ffffff;
  font-weight: bold;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0px #000000;
}

/* Navigation Menu - Bright Yellow Accent Bar */
.main-navigation {
  margin-top: 15px;
  border: 2px solid #000000;
  background-color: #ffff00; /* Vibrant neon yellow */
  padding: 6px;
  box-shadow: 2px 2px 0px #000000;
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.nav-links li a {
  color: #0000ff;
  font-weight: bold;
  font-size: 12px;
  text-transform: uppercase;
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid transparent;
}

.nav-links li a:hover {
  background-color: #0000ff;
  color: #ffff00 !important;
  border: 1px solid #000000;
  text-decoration: none;
}

/* Navigation button highlight for Admin new post */
.nav-admin-link {
  color: #cc0000 !important; /* Bold red to call out button */
  border: 1px dashed #cc0000 !important;
  background-color: #ffffff;
}

.nav-admin-link:hover {
  background-color: #cc0000 !important;
  color: #ffffff !important;
}

/* Grid layout for Main and Sidebar */
.page-layout {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: 15px;
  align-items: start;
}

.main-content {
  min-width: 0; /* Prevents overflow in grid layout */
}

/* 4. Modular Retro Content Boxes */
.content-box {
  border: 2px solid #000000;
  margin-bottom: 15px;
  background-color: #ffffff;
  box-shadow: 4px 4px 0px #000000;
}

/* Bright blue-purple header for main content */
.content-box-header {
  background-color: #004b93; 
  color: #ffffff;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 13px;
  font-weight: bold;
  text-transform: uppercase;
  padding: 6px 10px;
  border-bottom: 2px solid #000000;
  letter-spacing: 1px;
  text-shadow: 1px 1px 0px #000;
}

.content-box-content {
  padding: 15px;
}

/* Post preview block styling */
.post-preview {
  margin-bottom: 15px;
}

.post-title {
  margin-bottom: 5px;
}

.post-title a {
  color: #0033cc;
  text-decoration: underline;
}

.post-meta {
  font-size: 11px;
  color: #000000;
  margin-bottom: 10px;
  background-color: #e6f2ff; /* Light blue info box */
  padding: 4px 8px;
  border: 1px solid #3399ff;
  display: inline-block;
  font-weight: bold;
}

.post-meta a {
  font-weight: bold;
  color: #cc0000;
}

.post-description {
  margin-bottom: 10px;
}

.post-read-more {
  text-align: right;
  font-weight: bold;
}

.post-read-more a {
  color: #cc0000;
}

/* Vibrant box highlights */
.welcome-text {
  background-color: #ffffcc; /* Bright pastel yellow */
  border: 2px solid #ffcc00;
  padding: 10px;
  margin-bottom: 15px;
  font-size: 12px;
  box-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.admin-notice {
  background-color: #e6ffe6; /* Soft green */
  border: 2px solid #33cc33;
  padding: 10px;
  margin-bottom: 20px;
  font-size: 12px;
}

/* Full post detail pages */
.full-post-title {
  font-size: 26px;
  color: #990000; /* Dark red header */
  margin-bottom: 5px;
}

.post-body {
  font-size: 13px;
  line-height: 1.6;
}

.post-body h1, .post-body h2, .post-body h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  border-bottom: 2px solid #000000;
  padding-bottom: 4px;
}

.post-body ul, .post-body ol {
  margin-left: 25px;
  margin-bottom: 1.2em;
}

.post-body li {
  margin-bottom: 0.5em;
}

/* 5. Sidebar Styling with Multi-Color Portal Headers */
.site-sidebar {
  display: flex;
  flex-direction: column;
}

.sidebar-box {
  border: 2px solid #000000;
  margin-bottom: 15px;
  background-color: #ffffff;
  box-shadow: 4px 4px 0px #000000;
}

.sidebar-box-content {
  padding: 12px;
}

/* Colorful widgets simulating classic Web 1.0 portals */
/* Widget 1: O portalu -> Vibrant Orange */
.sidebar-box:nth-child(1) .sidebar-box-header {
  background-color: #ff6600;
  color: #ffffff;
  border-bottom: 2px solid #000000;
  text-shadow: 1px 1px 0px #000;
}

/* Widget 2: Kategorie -> Vibrant Green */
.sidebar-box:nth-child(2) .sidebar-box-header {
  background-color: #00aa00;
  color: #ffffff;
  border-bottom: 2px solid #000000;
  text-shadow: 1px 1px 0px #000;
}

/* Widget 3: Ostatnie wpisy -> Vibrant Blue */
.sidebar-box:nth-child(3) .sidebar-box-header {
  background-color: #0066cc;
  color: #ffffff;
  border-bottom: 2px solid #000000;
  text-shadow: 1px 1px 0px #000;
}

/* Widget 4: Mini ankieta -> Vibrant Red */
.sidebar-box:nth-child(4) .sidebar-box-header {
  background-color: #cc0000;
  color: #ffffff;
  border-bottom: 2px solid #000000;
  text-shadow: 1px 1px 0px #000;
}

.sidebar-links {
  list-style: square;
  margin-left: 15px;
}

.sidebar-links li {
  margin-bottom: 8px;
}

.post-date-sidebar {
  font-size: 10px;
  color: #444;
  white-space: nowrap;
  font-weight: bold;
}

/* Form Styles & Beveled Buttons */
.retro-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.retro-label {
  font-weight: bold;
  font-size: 12px;
  color: #003366;
  text-transform: uppercase;
}

.retro-input, .retro-textarea {
  font-family: Verdana, sans-serif;
  font-size: 12px;
  padding: 6px;
  border: 2px solid #000000;
  background-color: #fafafa;
  box-shadow: inset 2px 2px 2px #ccc;
  width: 100%;
}

.retro-input:focus, .retro-textarea:focus {
  background-color: #ffffdf; /* Yellow focus accent */
  outline: none;
  border-color: #0000ff;
}

.form-help {
  font-size: 11px;
  color: #555555;
  font-style: italic;
}

.form-actions {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.retro-btn {
  background-color: #c0c0c0; /* Standard light-gray metal look */
  color: #000000;
  font-family: Tahoma, sans-serif;
  font-size: 12px;
  font-weight: bold;
  padding: 6px 15px;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  cursor: pointer;
  box-shadow: 1px 1px 0px #000;
}

.retro-btn:hover {
  background-color: #d8d8d8;
  color: #000000 !important;
}

.retro-btn:active {
  border-top: 2px solid #404040;
  border-left: 2px solid #404040;
  border-right: 2px solid #ffffff;
  border-bottom: 2px solid #ffffff;
  padding: 7px 14px 5px 16px;
  box-shadow: none;
}

.submit-btn {
  background-color: #a0ffa0; /* Soft green success button */
  border-top: 2px solid #fff;
  border-left: 2px solid #fff;
}

.submit-btn:hover {
  background-color: #c2ffc2;
}

.reset-btn {
  background-color: #ffa0a0; /* Soft red danger button */
}

.reset-btn:hover {
  background-color: #ffc2c2;
}

/* 6. Footer & Retro Badges (88x31 px styled buttons) */
.site-footer {
  border: 2px solid #000000;
  background-color: #ffea79; /* Vibrant yellow footer banner */
  padding: 15px;
  margin-top: 15px;
  text-align: center;
  font-size: 11px;
  box-shadow: 4px 4px 0px #000000;
}

.footer-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

/* Creating CSS-based early-2000s standard badges */
.retro-badge {
  display: inline-block;
  width: 88px;
  height: 31px;
  font-size: 8px;
  line-height: 10px;
  font-family: Arial, sans-serif;
  text-align: center;
  text-transform: uppercase;
  font-weight: bold;
  padding: 4px 2px;
  cursor: default;
  border-top: 2px solid #ffffff;
  border-left: 2px solid #ffffff;
  border-right: 2px solid #404040;
  border-bottom: 2px solid #404040;
  user-select: none;
  background-color: #ccc;
  box-shadow: 1px 1px 0px #000;
}

.badge-ie {
  background-color: #00539f;
  color: #ffffff;
  text-shadow: 1px 1px 0px #000;
}

.badge-notepad {
  background-color: #ffffff;
  color: #000000;
  border: 2px solid #000;
}

.badge-valid {
  background-color: #e2b200;
  color: #000000;
  text-shadow: 1px 1px 0px #fff;
}

.copyright {
  margin-bottom: 5px;
  font-weight: bold;
  color: #000066;
}

.counter {
  font-style: italic;
  font-weight: bold;
  margin-top: 5px;
}

.counter-num {
  font-family: monospace;
  background-color: #000000;
  color: #00ff00; /* Green glowing digit counter */
  padding: 2px 6px;
  font-weight: bold;
  font-size: 14px;
  border: 2px inset #555;
  letter-spacing: 1px;
}

/* 7. Error 404 Specifics */
.error-box {
  border-color: #ff0000;
}

.error-title {
  color: #ff0000;
  font-size: 28px;
  margin-bottom: 15px;
}

.error-msg {
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 15px;
}

.retro-separator {
  color: #888;
  font-family: monospace;
  margin: 10px 0;
}

.error-ascii pre {
  font-family: monospace;
  font-size: 12px;
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  padding: 10px;
  display: inline-block;
  text-align: left;
  line-height: 1.1;
  overflow-x: auto;
  max-width: 100%;
}

/* 7.5. New CSS rules for Cookie Banner, Tables, and Audio controls */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #000000;
  color: #ffff00; /* Neon yellow on black - very retro */
  border-top: 3px double #ffff00;
  padding: 10px;
  text-align: center;
  z-index: 99999;
  font-family: Tahoma, Arial, sans-serif;
  font-size: 11px;
  font-weight: bold;
  box-shadow: 0px -4px 10px rgba(0,0,0,0.5);
}

.cookie-banner-content {
  display: inline-block;
  max-width: 90%;
  vertical-align: middle;
}

.retro-table {
  width: 100%;
  border-collapse: collapse;
  border: 2px solid #000000;
  font-size: 11px;
  margin-top: 15px;
  background-color: #ffffff;
}

.retro-table th {
  background-color: #003366;
  color: #ffffff;
  font-family: Tahoma, Arial, sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  padding: 8px;
  border: 2px solid #000000;
  letter-spacing: 0.5px;
  font-size: 11px;
}

.retro-table td {
  padding: 8px;
  border: 1px solid #000000;
}

.retro-table tr:nth-child(even) td {
  background-color: #f7f3e9; /* Alternating colors */
}

.table-container {
  border: 2px solid #000000;
  box-shadow: 3px 3px 0px rgba(0,0,0,0.15);
  margin-bottom: 20px;
}

/* Post body image spacing and styling */
.post-body img {
  border: 3px double #000;
  padding: 4px;
  background: #fff;
  margin: 15px auto;
  display: block;
  max-width: 90%;
}

.post-body audio {
  display: block;
  margin: 15px auto;
  border: 2px solid #000;
  box-shadow: 2px 2px 0px #000;
}

/* Sidebar scrollable container for long categories lists */
.sidebar-scroll-container {
  max-height: 220px;
  overflow-y: auto;
  border: 1px inset #808080;
  padding: 6px;
  background-color: #fafafa;
}

/* 8. Responsiveness (Mobile layout optimization) */
@media screen and (max-width: 768px) {
  body {
    padding: 0;
  }
  
  .site-container {
    width: 100%;
    margin: 0;
    border-left: none;
    border-right: none;
    box-shadow: none;
  }

  .page-layout {
    grid-template-columns: 1fr; /* Stacks sidebar under main content */
    gap: 15px;
  }

  .header-logo h1 {
    font-size: 24px;
  }

  .nav-links {
    gap: 6px;
  }

  .nav-links li a {
    font-size: 11px;
    padding: 2px 4px;
  }

  .form-actions {
    flex-direction: column;
    gap: 10px;
  }

  .retro-btn {
    width: 100%;
    text-align: center;
  }

  /* Make sure images and code blocks are responsive inside post body */
  .post-body img {
    max-width: 100%;
    height: auto;
  }
  
  .post-body pre {
    overflow-x: auto;
    max-width: 100%;
  }
}

/* Subtle animations for retro feel */
@keyframes pulse-title {
  0% { color: #ffff00; }
  50% { color: #00ffff; }
  100% { color: #ffff00; }
}
