/* ═══════════════════════════════════════
   STYLE.CSS — Base Styles & Variables
   ═══════════════════════════════════════ */

/* ─── CSS Variables ─── */
:root {
  /* Colors — Light Theme */
  --bg-primary: #ececec;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f2f2f2;
  --bg-hover: #e8e8e8;

  --text-primary: #0a0a0a;
  --text-secondary: #6b6b6b;
  --text-tertiary: #999999;

  --border-color: #dcdcdc;
  --border-light: #e8e8e8;

  --accent: #6c63ff;
  --accent-hover: #5a52d5;
  --accent-light: rgba(108, 99, 255, 0.1);
  --accent-glow: rgba(108, 99, 255, 0.2);

  --heart-color: #ff3040;
  --retweet-color: #00ba7c;
  --reply-color: #1d9bf0;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);

  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'SF Mono', 'Fira Code', monospace;

  --max-width: 600px;
  --sidebar-width: 280px;
  --header-height: 0px;

  --transition-fast: 0.15s ease;
  --transition-base: 0.25s ease;
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Dark Theme ─── */
[data-theme="dark"] {
  --bg-primary: #0a0a0a;
  --bg-secondary: #181818;
  --bg-tertiary: #202020;
  --bg-hover: #282828;

  --text-primary: #f0f0f0;
  --text-secondary: #a0a0a0;
  --text-tertiary: #666666;

  --border-color: #2a2a2a;
  --border-light: #1a1a1a;

  --accent: #8b83ff;
  --accent-hover: #a09aff;
  --accent-light: rgba(139, 131, 255, 0.1);
  --accent-glow: rgba(139, 131, 255, 0.2);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* ─── Reset ─── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: background-color var(--transition-base), color var(--transition-base);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  width: 100%;
}

}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-hover);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-tertiary);
}

/* ─── Selection ─── */
::selection {
  background: var(--accent);
  color: white;
}

/* ─── Scroll Progress Bar ─── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-hover));
  z-index: 1000;
  transition: width 0.1s linear;
  will-change: width;
}

/* ─── Theme Toggle ─── */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 100;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.theme-toggle:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  box-shadow: var(--shadow-md);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
}

[data-theme="dark"] .theme-icon-dark { display: none; }
[data-theme="light"] .theme-icon-light { display: none; }

/* ─── Feed ─── */
.feed {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px 80px;
  position: relative;
}

@media (min-width: 1200px) {
  .feed {
    margin: 0 calc((100vw - var(--sidebar-width)) / 2) 0 auto;
  }
}

/* ─── Typing Cursor ─── */
.cursor {
  display: inline-block;
  animation: blink 1s step-end infinite;
  color: var(--accent);
  font-weight: 300;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}
