@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

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

/* Rose Pine Dawn (Light Mode) */
:root {
  --primary-color: #d7827e;
  --primary-hover: #b4637a;
  --secondary-color: #797593;
  --background: #faf4ed;
  --surface: #fffaf3;
  --border: #f2e9e1;
  --text-primary: #575279;
  --text-secondary: #6e6a86;
  --text-muted: #9893a5;

  /* Consolidated Semantic Colors */
  --success-color: #56949f; /* Pine */
  --pine-color: #56949f; /* Pine */
  --error-color: #b4637a; /* Love */
  --error-bg: rgba(180, 99, 122, 0.1);
  --error-border: rgba(180, 99, 122, 0.2);

  /* File Type Colors */
  --folder-color: #ea9d34;
  --file-color: #907aa9;
  --file-color-other: #56949f;

  /* Shadows */
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Layout Specifics */
  --header-bg: #575279;
  --header-text: #faf4ed;
  --footer-bg: #575279;
  --footer-text: #faf4ed;
  --bg: #faf4ed;

  /* Utility Variables */
  --text-on-primary: #fffaf3;
  --overlay-bg: rgba(87, 82, 121, 0.7); /* Tinted dark overlay */
  --static-black: #1f1d2e; /* For camera/media backgrounds */
  --static-white: #ffffff;
}

/* Rose Pine Moon (Dark Mode) */
[data-theme="dark"] {
  --primary-color: #ea9a97;
  --primary-hover: #eb6f92;
  --secondary-color: #908caa;
  --background: #232136;
  --surface: #2a273f;
  --border: #393552;
  --text-primary: #e0def4;
  --text-secondary: #908caa;
  --text-muted: #6e6a86;

  /* Consolidated Semantic Colors */
  --success-color: #9ccfd8; /* Foam */
  --pine-color: #3e8fb0; /* Pine */
  --error-color: #eb6f92; /* Love */
  --error-bg: rgba(235, 111, 146, 0.1);
  --error-border: rgba(235, 111, 146, 0.2);

  /* File Type Colors */
  --folder-color: #f6c177;
  --file-color: #c4a7e7;
  --file-color-other: #9ccfd8;

  /* Shadows */
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
  --shadow-lg:
    0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);

  /* Layout Specifics */
  --header-bg: #393552;
  --header-text: #e0def4;
  --footer-bg: #393552;
  --footer-text: #e0def4;
  --bg: #232136;

  /* New Utility Variables */
  --text-on-primary: #232136;
  --overlay-bg: rgba(0, 0, 0, 0.7);
  --static-black: #191724;
  --static-white: #e0def4;
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background);
  transition:
    background-color 0.3s ease,
    color 0.3s ease;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography - Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family:
    "Space Grotesk",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* Header */
header {
  background: var(--header-bg);
  color: var(--header-text);
  padding: 2rem 0;
  box-shadow: var(--shadow-lg);
}

.header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.header-logo {
  height: 60px;
  width: 60px;
  min-width: 60px;
  margin-right: 0.5rem;
  transition: transform 0.3s ease;
  flex-shrink: 0;
  color: transparent;
  font-size: 0;
  background: transparent;
}

.header-logo:hover {
  transform: scale(1.15);
}

.header-content {
  text-align: left;
  flex: 1;
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
  font-weight: 300;
}

/* Header Actions Container */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Header Auth Button */
.btn-header-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--primary-color);
  color: var(--text-on-primary);
  border: none;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.btn-header-auth:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-header-auth svg {
  width: 1rem;
  height: 1rem;
}

/* Header User Info */
.header-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem 0.35rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.header-username {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-header-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-header-logout:hover {
  color: var(--error-color);
  background: var(--error-bg);
  border-color: var(--error-border);
}

/* Theme Toggle Button */
.theme-toggle {
  background: var(--surface);
  border: 2px solid var(--border);
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--background);
  border-color: var(--primary-color);
}

.theme-toggle svg {
  width: 1.2rem;
  height: 1.2rem;
}

/* Sign-in Prompt */
.signin-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  text-align: center;
  margin-bottom: 2rem;
}

.signin-prompt svg {
  color: var(--text-muted);
  margin-bottom: 1rem;
  opacity: 0.6;
}

.signin-prompt p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

/* Navigation */
.nav-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
  margin-bottom: 2rem;
}

.nav-bar .container {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
}

.nav-link:hover {
  color: var(--primary-color);
  background: var(--background);
}

.nav-link.nav-active {
  color: var(--primary-color);
  background: var(--background);
  border-bottom: 2px solid var(--primary-color);
  margin-bottom: -2px;
}

.nav-link svg {
  width: 1rem;
  height: 1rem;
}

/* Main content */
main {
  padding: 1rem 0 4rem;
}

.intro-section {
  margin-bottom: 2rem;
}

.intro-section h2 {
  color: var(--text-primary);
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.intro-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

/* Loading and Error states */
.loading,
.error {
  text-align: center;
  padding: 2rem;
  font-size: 1.1rem;
  color: var(--text-secondary);
}

/* FIXED: Removed hardcoded colors */
.error {
  color: var(--error-color);
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 0.5rem;
}

/* Folder tree */
.folder-tree {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.folder-item,
.file-item {
  margin: 0.5rem 0;
  border-radius: 0.5rem;
  transition: background 0.2s;
}

.folder-item:hover,
.file-item:hover {
  background: var(--background);
}

.folder-link,
.file-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  padding: 0.75rem;
  border-radius: 0.5rem;
}

.folder-link:hover {
  color: var(--primary-color);
}

.folder-name,
.file-name {
  font-weight: 500;
  flex-grow: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.item-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.folder-icon {
  color: var(--folder-color);
}

.file-icon {
  color: var(--file-color);
}

.file-icon-other {
  color: var(--file-color-other);
}

.folder-count {
  color: var(--text-secondary);
  font-size: 0.875rem;
  background: var(--background);
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
}

.file-link {
  color: var(--primary-color);
}

.file-link:hover {
  color: var(--primary-hover);
}

.file-link-other {
  color: var(--file-color-other);
}

.file-link-other:hover {
  color: var(--file-color-other);
  opacity: 0.8;
}

.empty-message {
  color: var(--text-secondary);
  text-align: center;
  padding: 2rem;
}

/* Breadcrumb */
.breadcrumb {
  margin-top: 1rem;
  margin-bottom: 0;
  padding: 0.75rem;
  background: var(--surface);
  border-radius: 0.5rem;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb-separator {
  color: var(--text-secondary);
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 500;
}

/* Stats */
.quick-stats {
  margin: 3rem 0;
}

.quick-stats h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Info section */
.info-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2rem;
  margin: 2rem 0;
}

.info-section h3 {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.info-section h4 {
  color: var(--text-primary);
  font-size: 1.1rem;
}

.info-section ul {
  margin: 1rem 0 1rem 2rem;
}

.info-section li {
  margin: 0.5rem 0;
  color: var(--text-secondary);
}

.note {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--surface);
  border-left: 4px solid var(--folder-color);
  border-radius: 0.25rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

/* Footer */
footer {
  background: var(--footer-bg);
  color: var(--footer-text);
  padding: 2rem 0;
  text-align: center;
}

footer p {
  margin: 0.5rem 0;
}

.footer-links {
  margin: 1rem 0;
}

.footer-links a {
  color: var(--footer-text);
  text-decoration: none;
  opacity: 0.9;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
  text-decoration: underline;
}

.separator {
  margin: 0 0.75rem;
  opacity: 0.5;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.footer-meta p {
  margin: 0;
}

.footer-views,
.last-updated {
  font-size: 0.9rem;
  opacity: 0.75;
}

/* Responsive */
@media (max-width: 768px) {
  .header-row {
    flex-wrap: wrap;
    align-items: center;
  }

  .header-logo {
    height: 48px;
    width: 48px;
    min-width: 48px;
    margin-right: 0.5rem;
    order: 1;
  }

  .header-content {
    display: contents;
  }

  header h1 {
    font-size: 1.75rem;
    margin-bottom: 0;
    order: 2;
    flex: 1;
    min-width: 0;
  }

  .subtitle {
    font-size: 1rem;
    order: 4;
    width: 100%;
    margin-top: 0.5rem;
  }

  .header-actions {
    order: 3;
    gap: 0.5rem;
  }

  .theme-toggle {
    padding: 0.4rem 0.6rem;
  }

  .theme-toggle span {
    display: none;
  }

  .btn-header-auth {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .btn-header-auth span {
    display: none;
  }

  .header-username {
    max-width: 80px;
    font-size: 0.8rem;
  }

  .signin-prompt {
    padding: 2rem 1.5rem;
  }

  .nav-bar .container {
    gap: 0.75rem;
  }

  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .folder-children {
    margin-left: 1rem;
    padding-left: 0.75rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .separator {
    display: none;
  }
}

/* ============================================
   CONTRIBUTION PAGE STYLES
   ============================================ */

/* Contribute Section */
.contribute-section {
  margin-bottom: 2rem;
}

/* Authentication Box */
.auth-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.auth-icon {
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.auth-box h3 {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.auth-box p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.auth-note {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 1rem;
  margin-bottom: 0 !important;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--primary-color);
  color: var(--text-on-primary); /* FIXED: replaced 'white' */
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
  border-color: var(--primary-color);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-add {
  width: 100%;
  justify-content: center;
  margin-top: 1rem;
}

/* User Info */
.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

.user-info svg {
  color: var(--primary-color);
  flex-shrink: 0;
}

.user-info span {
  flex: 1;
  color: var(--text-secondary);
}

.user-info strong {
  color: var(--text-primary);
}

/* Upload Form */
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.form-section h3 {
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

.form-group label {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.required {
  color: var(--error-color);
}

.form-hint {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.folder-suggestion {
  margin-top: 0.5rem;
  padding: 0.75rem;
  background: rgba(255, 193, 7, 0.1);
  border: 1px solid var(--warning-color);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
}

.btn-suggestion {
  padding: 0.375rem 0.875rem;
  background: var(--warning-color);
  color: #000;
  border: none;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-suggestion:hover {
  background: #e0a800;
  transform: translateY(-1px);
}

/* Flash highlight animation for drawing attention to elements */
@keyframes flash-highlight {
  0% {
    background-color: var(--warning-color);
    box-shadow: 0 0 20px var(--warning-color);
  }
  100% {
    background-color: transparent;
    box-shadow: none;
  }
}

/* Confirmation modal styling */
.confirmation-dialog code {
  background: var(--background);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.85em;
  color: var(--text-primary);
}

.form-group input[type="text"],
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-group input[type="text"]:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--surface);
}

.form-group textarea {
  resize: vertical;
}

/* Upload Groups */
#upload-groups {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.upload-group {
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

/* Path Builder */
.path-builder {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.path-builder .form-group {
  margin-bottom: 1rem;
}

.path-builder .form-group:last-of-type {
  margin-bottom: 0;
}

.form-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--background);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.form-select:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--surface);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--background);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-color);
  background: var(--surface);
}

.path-preview {
  margin-top: 1rem;
  padding: 0.75rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
}

.path-preview code {
  font-family: "Courier New", monospace;
  font-size: 0.9rem;
  color: var(--text-primary);
}

/* General code styling */
code {
  font-family: "Courier New", monospace;
  font-size: 0.9em;
  background: var(--surface);
  padding: 0.2em 0.4em;
  border-radius: 0.25rem;
  border: 1px solid var(--border);
  word-wrap: break-word;
  overflow-wrap: break-word;
  white-space: pre-wrap;
}

/* Info Notice Box */
.info-notice {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 2px solid var(--primary-color);
  border-radius: 0.75rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.info-notice svg {
  color: var(--primary-color);
  margin-top: 0.1rem;
}

.info-notice strong {
  color: var(--text-primary);
  font-size: 1.05rem;
}

.info-notice p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.notice-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

.notice-link:hover {
  border-bottom-color: var(--primary-color);
}

/* Warning notice for oversized files */
.warning-notice {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--error-bg); /* FIXED: replaced hardcoded rgba */
  border: 2px solid var(--error-color);
  border-radius: 0.5rem;
  margin-top: 1rem;
  align-items: flex-start;
}

.warning-notice svg {
  color: var(--error-color);
  flex-shrink: 0;
}

.warning-notice p {
  color: var(--text-primary);
  font-size: 0.9rem;
  margin: 0;
}

.warning-notice strong {
  color: var(--error-color);
}

.upload-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.upload-group-header h4 {
  margin: 0;
  color: var(--text-primary);
}

.btn-remove {
  padding: 0.4rem 0.8rem;
  background: transparent;
  color: var(--error-color);
  border: 1px solid var(--error-color);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-remove:hover {
  background: var(--error-color);
  color: var(--text-on-primary);
}

/* File Upload Area */
.file-upload-area {
  position: relative;
  margin-top: 0.5rem;
}

.file-input {
  display: none;
}

.file-upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  border: 2px dashed var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s ease;
}

.file-upload-label:hover,
.file-upload-area.drag-over .file-upload-label {
  border-color: var(--primary-color);
  background: var(--bg);
}

.file-upload-label svg {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.upload-text {
  display: block;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.upload-hint {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* File List */
.file-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
}

.file-item svg {
  color: var(--primary-color);
  flex-shrink: 0;
}

.file-name {
  flex: 1;
  color: var(--text-primary);
  font-size: 0.9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name-input {
  flex: 1;
  padding: 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.25rem;
  background: transparent;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  min-width: 0;
}

.file-name-input:hover {
  background: var(--background);
  border-color: var(--border);
}

.file-name-input:focus {
  outline: none;
  background: var(--background);
  border-color: var(--primary-color);
}

.file-size {
  color: var(--text-muted);
  font-size: 0.875rem;
  flex-shrink: 0;
}

.btn-remove-file {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 0.25rem;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-remove-file:hover {
  background: var(--error-color);
  color: var(--text-on-primary);
}

/* Form Actions */
.form-actions {
  display: flex;
  justify-content: center;
  padding-top: 1rem;
}

/* Progress Box */
.progress-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.progress-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1.5rem;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.progress-box h3 {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.progress-box p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: var(--bg);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--primary-color),
    var(--primary-hover)
  );
  border-radius: 4px;
  transition: width 0.3s ease;
}

.progress-percent {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* Success Box */
.success-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.success-icon {
  color: var(--success-color);
  margin-bottom: 1.5rem;
}

.success-box h3 {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.success-box p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.pr-link-box {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Next Steps Box */
.next-steps-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.25rem;
  margin: 1.5rem 0;
  text-align: left;
}

.next-steps-box h4 {
  margin: 0 0 0.75rem 0;
  color: var(--text-primary);
  font-size: 1rem;
}

.next-steps-box ul {
  margin: 0 0 0 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.next-steps-box li {
  margin-bottom: 0.5rem;
}

.next-steps-box li:last-child {
  margin-bottom: 0;
}

/* Error Box */
.error-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 3rem 2rem;
  text-align: center;
  max-width: 500px;
  margin: 0 auto;
}

.error-icon {
  color: var(--error-color);
  margin-bottom: 1.5rem;
}

.error-box h3 {
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.error-box p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Search Container */
.search-container {
  position: relative;
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
  max-width: 600px;
}

.search-container input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 2px solid var(--border);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.search-container input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: var(--shadow);
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

#clear-search {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
}

#clear-search:hover {
  color: var(--primary-color);
}

.search-result-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.search-result-path {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.search-mode .folder-link,
.search-mode .file-link {
  align-items: center;
}

.search-mode .folder-name,
.search-mode .file-name {
  display: block;
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--overlay-bg); /* FIXED: Replaced hardcoded rgba */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(4px);
}

.modal-content {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 0.75rem;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.camera-modal-content {
  max-width: 700px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h3 {
  margin: 0;
  color: var(--text-primary);
}

.btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 0.5rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
}

.merge-list {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  max-height: 300px;
  overflow-y: auto;
  background: var(--bg);
}

.merge-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.merge-item:last-child {
  border-bottom: none;
}

.merge-item.disabled {
  opacity: 0.6;
}

.merge-thumb {
  width: 40px;
  height: 40px;
  object-fit: cover;
  border-radius: 4px;
  background: var(--static-black); /* FIXED: replaced #000 */
}

.merge-info {
  flex: 1;
  min-width: 0;
}

.merge-name {
  display: block;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.merge-size {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.merge-controls {
  display: flex;
  gap: 0.25rem;
}

.btn-icon-small {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 2px 6px;
  font-size: 0.8rem;
}

.btn-icon-small:hover {
  background: var(--border);
  color: var(--primary-color);
}

/* Tool Button in File List */
.tools-bar {
  margin-top: 0.75rem;
  display: flex;
  justify-content: flex-end;
}

.btn-tool {
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: 0.375rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s;
}

.btn-tool:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn-tool-pine {
  background: var(--pine-color);
  color: var(--text-on-primary);
  border-color: var(--pine-color);
}

.btn-tool-pine:hover {
  opacity: 0.85;
  border-color: var(--pine-color);
  color: var(--text-on-primary);
}

/* Camera Preview */
.camera-preview-container {
  background: var(--static-black); /* FIXED: replaced black */
  border-radius: 0.5rem;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

#camera-stream {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* PDF Tool Styles */
.pdf-image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  min-height: 50px;
  border: 1px dashed var(--border);
  padding: 0.5rem;
  border-radius: 0.25rem;
}

.pdf-image-item {
  position: relative;
  width: 60px;
  height: 80px;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.pdf-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdf-image-remove {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--overlay-bg); /* FIXED: replaced rgba */
  color: var(--static-white); /* FIXED: replaced white */
  border: none;
  width: 16px;
  height: 16px;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Camera Button in Upload Group */
.file-upload-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.btn-camera {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.85rem;
  background: var(--surface);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-camera:hover {
  background: var(--primary-color);
  color: var(--text-on-primary);
}

/* Preview Modal */
.preview-content {
  width: 90%;
  height: 90%;
  display: flex;
  justify-content: center;
  align-items: center;
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  object-fit: contain;
}

.btn-close-preview {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  z-index: 10;
}

/* Merge Tool Rotation Controls */
.merge-controls {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.merge-thumb {
  transition: transform 0.3s ease; /* Smooth rotation animation */
}

/* Native Camera Input */
.native-camera-input {
  display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .form-section {
    padding: 1.5rem;
  }

  .upload-group {
    padding: 1rem;
  }

  .file-upload-label {
    padding: 2rem 1rem;
  }

  .auth-box,
  .progress-box,
  .success-box,
  .error-box {
    padding: 2rem 1.5rem;
  }

  .pr-link-box {
    flex-direction: column;
  }

  .pr-link-box .btn-primary,
  .pr-link-box .btn-secondary {
    width: 100%;
    justify-content: center;
  }

  .info-notice,
  .warning-notice {
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }

  .info-notice svg,
  .warning-notice svg {
    margin-top: 0;
  }
}

/* ============================================
   LEADERBOARD STYLES
   ============================================ */

.leaderboard-section {
  margin: 4rem 0 3rem;
  padding: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: var(--shadow);
}

.leaderboard-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-align: center;
}

.leaderboard-subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.leaderboard-loading,
.leaderboard-error {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-size: 1rem;
}

.leaderboard-error {
  color: var(--error-color);
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.leaderboard-container {
  animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Podium for Top 3 */
.leaderboard-podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: var(--background);
  border-radius: 0.75rem;
  border: 1px solid var(--border);
}

.podium-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 0.75rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.podium-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary-color);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.podium-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.podium-card:hover::before {
  opacity: 1;
}

/* First place styling */
.podium-card.rank-1 {
  border-color: var(--folder-color);
}

.podium-card.rank-1::before {
  background: var(--folder-color);
}

/* Second place styling */
.podium-card.rank-2 {
  border-color: var(--text-muted);
}

.podium-card.rank-2::before {
  background: var(--text-muted);
}

/* Third place styling */
.podium-card.rank-3 {
  border-color: var(--file-color-other);
}

.podium-card.rank-3::before {
  background: var(--file-color-other);
}

.podium-rank {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.podium-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin-bottom: 1rem;
  border: 3px solid var(--border);
  transition: transform 0.3s ease;
}

.podium-card:hover .podium-avatar {
  transform: scale(1.1);
  border-color: var(--primary-color);
}

.podium-username {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  text-align: center;
  word-break: break-word;
}

.podium-commits {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  font-family: "Space Grotesk", sans-serif;
}

.podium-commits-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* List for remaining contributors */
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.leaderboard-item:hover {
  background: var(--background);
  border-color: var(--primary-color);
  transform: translateX(4px);
  box-shadow: var(--shadow);
}

.leaderboard-rank {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-secondary);
  min-width: 2.5rem;
  text-align: center;
  font-family: "Space Grotesk", sans-serif;
}

.leaderboard-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: transform 0.2s ease;
}

.leaderboard-item:hover .leaderboard-avatar {
  transform: scale(1.1);
  border-color: var(--primary-color);
}

.leaderboard-info {
  flex: 1;
  min-width: 0;
}

.leaderboard-username {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.125rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.leaderboard-stats {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.leaderboard-commits {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary-color);
  font-family: "Space Grotesk", sans-serif;
  min-width: 4rem;
  text-align: right;
}

.leaderboard-commits-suffix {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.25rem;
}

.leaderboard-footer {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .leaderboard-section {
    padding: 1.5rem;
    margin: 2rem 0;
  }

  .leaderboard-title {
    font-size: 1.5rem;
  }

  .leaderboard-podium {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem;
  }

  .podium-card {
    padding: 1.25rem;
  }

  .podium-avatar {
    width: 64px;
    height: 64px;
  }

  .podium-rank {
    font-size: 2rem;
  }

  .podium-commits {
    font-size: 1.25rem;
  }

  .leaderboard-item {
    padding: 0.875rem 1rem;
    gap: 0.75rem;
  }

  .leaderboard-rank {
    min-width: 2rem;
    font-size: 1rem;
  }

  .leaderboard-avatar {
    width: 40px;
    height: 40px;
  }

  .leaderboard-username {
    font-size: 0.9375rem;
  }

  .leaderboard-commits {
    font-size: 1.125rem;
    min-width: 3.5rem;
  }
}
/* ============================================
   CONTRIBUTIONS PAGE STYLES
   ============================================ */

/* Filter Controls */
.contributions-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.filter-select {
  min-width: 120px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.filter-input {
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
}

.btn-refresh {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
}

.btn-refresh svg {
  transition: transform 0.3s ease;
}

.btn-refresh:hover svg {
  transform: rotate(180deg);
}

/* Stats Summary */
.contributions-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-mini {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  min-width: 100px;
  transition: all 0.2s ease;
}

.stat-mini:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.stat-mini-value {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text-primary);
}

.stat-mini-value.stat-open {
  color: var(--folder-color);
}

.stat-mini-value.stat-merged {
  color: var(--success-color);
}

.stat-mini-value.stat-closed {
  color: var(--error-color);
}

.stat-mini-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

/* Loading State */
.contributions-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

.contributions-loading p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Error State */
.contributions-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  text-align: center;
}

.contributions-error svg {
  color: var(--error-color);
  margin-bottom: 1rem;
}

.contributions-error p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Contributions List */
.contributions-container {
  animation: fadeIn 0.4s ease-in;
}

.contributions-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Contribution Card */
.contribution-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.contribution-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.contribution-card.status-merged {
  border-left: 4px solid var(--success-color);
}

.contribution-card.status-open {
  border-left: 4px solid var(--folder-color);
}

.contribution-card.status-closed {
  border-left: 4px solid var(--error-color);
}

.contribution-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.contribution-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contribution-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: transform 0.2s ease;
}

.contribution-card:hover .contribution-avatar {
  transform: scale(1.1);
  border-color: var(--primary-color);
}

.contribution-info {
  display: flex;
  flex-direction: column;
}

.contribution-author {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.contribution-email {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-open {
  background: rgba(234, 157, 52, 0.15);
  color: var(--folder-color);
  border: 1px solid var(--folder-color);
}

.badge-merged {
  background: rgba(156, 207, 216, 0.15);
  color: var(--success-color);
  border: 1px solid var(--success-color);
}

.badge-closed {
  background: var(--error-bg);
  color: var(--error-color);
  border: 1px solid var(--error-color);
}

/* Contribution Body */
.contribution-body {
  padding: 1.25rem;
}

.contribution-title {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

.contribution-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contribution-title a:hover {
  color: var(--primary-color);
}

.pr-number {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

/* Files Preview */
.contribution-files {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.files-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.files-header svg {
  color: var(--file-color);
}

.files-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.file-entry {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.file-entry svg {
  color: var(--file-color);
  flex-shrink: 0;
}

.file-entry span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-more {
  color: var(--text-muted);
  font-style: italic;
  padding-left: 1.25rem;
}

/* PR Comments Section */
.pr-comments {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.comments-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.comments-header svg {
  color: var(--primary-color);
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.comment-item {
  padding: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  border-left: 3px solid var(--primary-color);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.comment-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.comment-author {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.comment-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.comment-body {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.comment-body strong {
  color: var(--text-primary);
  font-weight: 600;
}

.comment-body em {
  font-style: italic;
}

.comment-body code {
  font-family: "Courier New", monospace;
  font-size: 0.8em;
  background: var(--background);
  padding: 0.15em 0.35em;
  border-radius: 0.25rem;
  border: 1px solid var(--border);
}

/* Contribution Footer */
.contribution-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.contribution-date {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.contribution-date svg {
  opacity: 0.7;
}

.contribution-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.contribution-link:hover {
  color: var(--primary-hover);
}

.contribution-link svg {
  transition: transform 0.2s ease;
}

.contribution-link:hover svg {
  transform: translate(2px, -2px);
}

/* No Results */
.no-results {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  text-align: center;
}

.no-results svg {
  color: var(--text-muted);
  margin-bottom: 1rem;
  opacity: 0.5;
}

.no-results p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  flex-wrap: wrap;
}

.pagination-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.pagination-btn:hover:not(:disabled) {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-btn svg {
  flex-shrink: 0;
}

.pagination-numbers {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination-num {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.pagination-num:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.pagination-num.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-on-primary);
}

.pagination-ellipsis {
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.pagination-info {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

/* Responsive Design for Contributions */
@media (max-width: 768px) {
  .pagination {
    gap: 0.5rem;
    padding: 1rem;
  }

  .pagination-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }

  .pagination-btn span {
    display: none;
  }

  .pagination-num {
    min-width: 32px;
    height: 32px;
    font-size: 0.8rem;
  }

  .pagination-info {
    width: 100%;
    text-align: center;
    margin-left: 0;
    margin-top: 0.5rem;
    order: 10;
  }

  .contributions-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .filter-group {
    width: 100%;
  }

  .filter-select,
  .filter-input {
    flex: 1;
    min-width: unset;
  }

  .btn-refresh {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .contributions-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .stat-mini {
    padding: 0.75rem 1rem;
    min-width: unset;
  }

  .stat-mini-value {
    font-size: 1.5rem;
  }

  .contribution-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
  }

  .contribution-body {
    padding: 1rem;
  }

  .contribution-title {
    font-size: 1rem;
  }

  .contribution-footer {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .contribution-link {
    align-self: flex-end;
  }
}
