/* Retro 2000s Internet Theme: thefacebook + AIM */

:root {
  --fb-blue: #4a607a;
  --fb-header-bg: #4a607a;
  --fb-light-blue: #f0f2f5;
  --fb-border: #d0d7de;
  --fb-text: #111111;
  --fb-dark-blue: #637b94;
  
  --aim-blue: #0055ff;
  --aim-bg: #f3f6fa;
  --aim-border: #7f9db9;
  --aim-yellow: #ffe600;
  --aim-category-text: #000000;
  --aim-menu-bg: #f6f5e8;
  --aim-menu-text: #000000;

  --bg-color: #f0f2f5;
  --card-bg: #ffffff;
  --text-color: #333333;
  --text-muted: #666666;
  --accent-color: #4a607a;

  --input-bg: #ffffff;
  --input-text: #000000;
  --input-border: #7f9db9;
  --btn-bg: #ece9d8;
  --btn-text: #000000;
  --btn-border: #7f9db9;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-color: #0f1219;
    --card-bg: #161b26;
    --fb-light-blue: #222938;
    --fb-border: #2e394e;
    --text-color: #f1f5f9;
    --text-muted: #94a3b8;
    --fb-blue: #60a5fa; /* High contrast bright blue for links */
    --fb-header-bg: #202736;
    --fb-text: #ffffff;
    --fb-dark-blue: #93c5fd; /* High contrast header/action text */
    --aim-bg: #1c2331;
    --aim-border: #3c4b69;
    --aim-category-text: #ffffff;
    --aim-menu-bg: #293245;
    --aim-menu-text: #e2e8f0;
    --accent-color: #60a5fa;

    --input-bg: #0f1219;
    --input-text: #f1f5f9;
    --input-border: #3c4b69;
    --btn-bg: #293245;
    --btn-text: #f1f5f9;
    --btn-border: #3c4b69;
  }
}

* {
  box-sizing: border-box;
}

body {
  font-family: Tahoma, Verdana, Geneva, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  margin: 0;
  padding: 0;
  font-size: 11px; /* Authentic 2000s small text! */
  line-height: 1.4;
}

/* topbar / header */
.fb-header {
  background-color: var(--fb-header-bg);
  border-bottom: 1px solid #1d2a4a;
  color: #ffffff;
  padding: 10px 0;
  width: 100%;
}

.fb-header-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fb-logo {
  font-size: 18px;
  font-weight: bold;
  letter-spacing: -1px;
  color: #ffffff;
  text-decoration: none;
}

.fb-logo span {
  font-weight: normal;
  font-size: 14px;
}

.fb-nav a {
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  margin-left: 15px;
}

.fb-nav a:hover {
  text-decoration: underline;
}

/* Main Container Layout */
.main-layout {
  max-width: 800px;
  margin: 20px auto;
  padding: 0 15px;
  display: flex;
  gap: 15px;
}

@media (max-width: 650px) {
  .main-layout {
    flex-direction: column;
  }
  .sidebar-column {
    width: 100% !important;
  }
}

.sidebar-column {
  width: 220px;
  flex-shrink: 0;
}

.content-column {
  flex-grow: 1;
}

/* AIM Buddy List Styling */
.aim-window {
  border: 1px solid var(--aim-border);
  background-color: var(--card-bg);
  border-radius: 2px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 15px;
}

.aim-title-bar {
  background: linear-gradient(to bottom, #729ad2, #4976b4);
  color: #ffffff;
  font-weight: bold;
  padding: 4px 6px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--aim-border);
}

.aim-title-bar-buttons {
  display: flex;
  gap: 2px;
}

.aim-btn {
  width: 12px;
  height: 12px;
  background-color: #ece9d8;
  border: 1px solid #7f9db9;
  text-align: center;
  line-height: 8px;
  font-size: 9px;
  color: #000;
  font-weight: bold;
  cursor: pointer;
}

.aim-menu-bar {
  background-color: var(--aim-menu-bg);
  border-bottom: 1px solid var(--fb-border);
  padding: 2px 6px;
  color: var(--aim-menu-text);
}

.aim-menu-item {
  margin-right: 8px;
  cursor: pointer;
}

.aim-content {
  padding: 6px;
  background-color: var(--aim-bg);
  font-size: 11px;
}

.aim-category {
  font-weight: bold;
  color: var(--aim-category-text);
  margin-top: 5px;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.aim-category::before {
  content: "▼";
  font-size: 8px;
}

.aim-buddy {
  padding-left: 15px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.aim-buddy-status {
  width: 8px;
  height: 8px;
  background-color: #00ff00;
  border: 1px solid #00aa00;
  border-radius: 50%;
  display: inline-block;
}

.aim-buddy-away {
  background-color: #ffaa00;
  border: 1px solid #cc8800;
}

.aim-buddy-name {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: bold;
}

.aim-buddy-name:hover {
  text-decoration: underline;
}

/* AIM Info / Away Message Box */
.aim-away-box {
  background-color: var(--card-bg);
  border: 1px solid var(--fb-border);
  padding: 8px;
  margin-top: 8px;
}

.aim-away-header {
  font-weight: bold;
  border-bottom: 1px solid var(--fb-border);
  padding-bottom: 3px;
  margin-bottom: 5px;
  color: var(--fb-blue);
}

/* Facebook-style Card / Box */
.fb-box {
  background-color: var(--card-bg);
  border: 1px solid var(--fb-border);
  margin-bottom: 15px;
}

.fb-box-header {
  background-color: var(--fb-light-blue);
  border-bottom: 1px solid var(--fb-border);
  padding: 6px 10px;
  font-weight: bold;
  color: var(--fb-dark-blue);
  font-size: 12px;
}

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

/* Facebook-style Product Card */
.fb-wall-post {
  border-bottom: 1px solid var(--fb-border);
  padding-bottom: 12px;
  margin-bottom: 12px;
}

.fb-wall-post:last-child {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0;
}

.fb-post-header {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.fb-post-avatar {
  width: 32px;
  height: 32px;
  background-color: var(--fb-blue);
  color: #ffffff;
  font-weight: bold;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 2px;
}

.fb-post-meta {
  display: flex;
  flex-direction: column;
}

.fb-post-author {
  font-weight: bold;
  color: var(--fb-blue);
  text-decoration: none;
}

.fb-post-author:hover {
  text-decoration: underline;
}

.fb-post-time {
  color: var(--text-muted);
  font-size: 10px;
  margin-top: 1px;
}

.fb-post-body {
  font-size: 11px;
  margin-bottom: 8px;
}

.fb-post-actions {
  font-size: 10px;
  color: var(--fb-dark-blue);
  display: flex;
  gap: 8px;
}

.fb-post-actions a {
  color: var(--fb-dark-blue);
  text-decoration: none;
}

.fb-post-actions a:hover {
  text-decoration: underline;
}

/* Retro Badges */
.badge {
  display: inline-block;
  padding: 1px 4px;
  font-size: 9px;
  font-weight: bold;
  text-transform: uppercase;
  border: 1px solid;
  border-radius: 2px;
  margin-left: 5px;
}

.badge-retained {
  color: #008800;
  border-color: #00aa00;
  background-color: #e6ffe6;
}

.badge-churned {
  color: #cc0000;
  border-color: #ff0000;
  background-color: #ffe6e6;
}

.badge-testing {
  color: #ff8800;
  border-color: #ffa500;
  background-color: #ffebd6;
}

/* AIM Chat Log styling for timelines */
.chat-window {
  border: 1px solid var(--aim-border);
  background-color: var(--card-bg);
  border-radius: 2px;
}

.chat-log {
  height: 320px;
  overflow-y: auto;
  border: 1px inset #d3d3d3;
  background-color: #ffffff;
  padding: 8px;
  font-family: "Courier New", Courier, monospace; /* Classic AIM log font option or Arial */
  font-size: 11px;
  color: #000000;
}

.chat-log a {
  color: #0055ff;
  text-decoration: underline;
}

/* In dark mode, ensure chat log readability */
@media (prefers-color-scheme: dark) {
  .chat-log {
    background-color: #161a24;
    color: #e0e6f0;
    border-color: #323e59;
  }
  .chat-log a {
    color: #85b7e9 !important;
  }
}

.chat-message {
  margin-bottom: 8px;
  line-height: 1.3;
}

.chat-speaker {
  font-weight: bold;
}

.chat-speaker-self {
  color: #ff0000; /* Brexton in red */
}

.chat-speaker-other {
  color: #0000ff; /* Other/System in blue */
}

.chat-timestamp {
  color: #777777;
  font-size: 9px;
}

/* Back Link Retro Button */
.retro-btn {
  display: inline-block;
  background-color: #ece9d8;
  border: 1px solid #7f9db9;
  color: #000000;
  padding: 3px 8px;
  text-decoration: none;
  font-weight: bold;
  margin-bottom: 12px;
}

.retro-btn:hover {
  background-color: #e5e2d0;
  text-decoration: none;
  border-color: #5d7ca0;
}

/* Floating retro AIM chat window */
.aim-floating-window {
  position: fixed;
  bottom: 0;
  right: 20px;
  width: 300px;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 0;
  background-color: var(--card-bg);
  border: 1px solid var(--aim-border);
  border-radius: 4px 4px 0 0;
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

.aim-floating-window.minimized {
  transform: translateY(calc(100% - 25px));
}

.aim-floating-window.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(20px);
}

.aim-floating-window input[type="text"] {
  background-color: var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--input-border);
}

.aim-floating-window button {
  background-color: var(--btn-bg);
  color: var(--btn-text);
  border: 1px solid var(--btn-border);
}

@media (max-width: 650px) {
  .aim-floating-window {
    right: 10px;
    width: calc(100% - 20px);
  }
}

/* Classic AIM Warning Level element */
.aim-warning-level {
  font-size: 9px;
  color: var(--text-muted);
  padding: 2px 6px;
  border-bottom: 1px solid var(--fb-border);
  display: flex;
  justify-content: space-between;
}

/* Winamp Player Custom Styles */
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}
@keyframes winamp-eq-1 {
  0% { height: 10%; }
  100% { height: 90%; }
}
@keyframes winamp-eq-2 {
  0% { height: 20%; }
  100% { height: 80%; }
}
@keyframes winamp-eq-3 {
  0% { height: 5%; }
  100% { height: 95%; }
}
@keyframes winamp-eq-4 {
  0% { height: 30%; }
  100% { height: 70%; }
}
.winamp-player iframe {
  border: none;
}

/* Winamp button press and active states */
.winamp-player button:active,
.winamp-player button.active {
    border: 1px inset #000 !important;
    background: #111 !important;
    color: #ff3300 !important;
    box-shadow: inset 1px 1px 3px rgba(0,0,0,0.8) !important;
    padding-top: 1px !important;
    padding-left: 1px !important;
}

/* spinning retro CD styles */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.spinning-cd {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: radial-gradient(circle, 
        #050505 10%, 
        #00ff00 12%, 
        #222 15%, 
        #111 25%, 
        #444 35%, 
        #111 45%, 
        #00ff00 55%, 
        #222 65%, 
        #050505 70%
    );
    border: 2px solid #000;
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.4);
    position: relative;
    animation: spin 3s linear infinite;
    animation-play-state: paused;
    transition: box-shadow 0.3s ease;
}
.spinning-cd.playing {
    animation-play-state: running !important;
    box-shadow: 0 0 18px rgba(0, 255, 0, 0.8) !important;
}
.spinning-cd::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #050505;
    border: 1px solid #333;
}
