/* Analog Society - Clean, Professional Design */
:root {
    /* Primary Colors */
    --primary-dark: #1a1a1a;
    --primary-light: #f8f9fa;
    --accent-warm: #d4af37; /* Warm gold accent */
    --accent-cool: #2c5aa0; /* Deep blue accent */
    
    /* Neutral Palette */
    --text-primary: #2c3e50;
    --text-secondary: #6c757d;
    --text-light: #ffffff;
    --border-light: #e9ecef;
    --border-medium: #dee2e6;
    
    /* Background Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: #1a1a1a;
    --bg-card: #ffffff;
    
    /* Status Colors */
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --info: #17a2b8;
    
    /* Shadows */
    --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 8px rgba(0,0,0,0.15);
    --shadow-heavy: 0 8px 16px rgba(0,0,0,0.2);
  }
  
  html, body {
    height: 100%;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
  }
  
  /* Dark mode support */
  @media (prefers-color-scheme: dark) {
    :root {
      --bg-primary: var(--bg-dark);
      --bg-secondary: #2d2d2d;
      --bg-card: #2d2d2d;
      --text-primary: var(--text-light);
      --text-secondary: #adb5bd;
      --border-light: #495057;
      --border-medium: #6c757d;
    }
  }
  
  /* Clean, professional animations */
  .fade-in {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  .slide-up {
    opacity: 0;
    transform: translateY(20px);
    animation: slideUp 0.6s ease-out forwards;
  }
  
  @keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
  }
  
  /* Clean layout structure */
  .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
  }
  
  .content-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }
  /* Header styling */
  header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 0;
    box-shadow: var(--shadow-light);
  }
  
  header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
  }
  
  /* Navigation */
  nav {
    display: flex;
    gap: 1rem;
    align-items: center;
  }
  
  nav a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-weight: 500;
  }
  
  nav a:hover {
    color: var(--accent-cool);
    background: var(--bg-secondary);
  }
  /* Hero section */
  .hero {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
    padding: 4rem 0;
    text-align: center;
  }
  
  .hero h2 {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
  }
  
  .hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .image-container {
    max-width: 600px;
    margin: 0 auto 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
  }
  
  .hero-image {
    width: 100%;
    height: auto;
    display: block;
  }
  
  /* Special sections */
  .special-section {
    background: var(--bg-card);
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border-light);
  }
  
  .special-section a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent-cool);
    text-decoration: none;
    padding: 1rem 2rem;
    border: 2px solid var(--accent-cool);
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
  }
  
  .special-section a:hover {
    background: var(--accent-cool);
    color: var(--text-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
  }
  /* Form styling */
  .form-group {
    margin-bottom: 1.5rem;
  }
  
  .form-container {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-light);
  }
  
  /* Typography */
  h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.3;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.5rem; }
  h4 { font-size: 1.25rem; }
  
  p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
  }
  
  .lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-primary);
  }
  
  .btn {
    display: inline-block;
    background: var(--accent-cool);
    color: var(--text-light);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-light);
  }
  
  .btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
  }
  
  .btn-secondary {
    background: transparent;
    color: var(--accent-cool);
    border: 2px solid var(--accent-cool);
  }
  
  .btn-secondary:hover {
    background: var(--accent-cool);
    color: var(--text-light);
  }
  
  .btn-success {
    background: var(--success);
  }
  
  .btn-warning {
    background: var(--warning);
    color: var(--text-primary);
  }
  
  .btn-danger {
    background: var(--danger);
  }
  
  /* Footer */
  footer {
    background: var(--bg-dark);
    color: var(--text-light);
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
  }
  
  footer p {
    margin: 0;
    color: var(--text-light);
  }

  /* Search and Filter Styles */
  .search-filter-section {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-light);
  }

  .search-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .search-row {
    display: flex;
    gap: 1rem;
    align-items: center;
  }

  .filter-row {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
  }

  .search-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--border-medium);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease;
  }

  .search-input:focus {
    outline: none;
    border-color: var(--accent-cool);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
  }

  .filter-select {
    padding: 0.75rem;
    border: 2px solid var(--border-medium);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    min-width: 150px;
    transition: border-color 0.2s ease;
  }

  .filter-select:focus {
    outline: none;
    border-color: var(--accent-cool);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
  }

  .checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
    font-weight: 500;
  }

  .checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-cool);
  }

  /* Table Styles */
  .table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-light);
  }

  .table th,
  .table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
  }

  .table th {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
  }

  .table td {
    color: var(--text-primary);
    font-weight: 400;
  }

  .table tr:hover {
    background: var(--bg-secondary);
  }

  /* Status Badge Styles */
  .status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
  }

  .status-available {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
  }

  .status-on-loan {
    background: rgba(255, 193, 7, 0.1);
    color: var(--warning);
    border: 1px solid var(--warning);
  }

  .status-pending {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info);
    border: 1px solid var(--info);
  }

  .status-accepted {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success);
    border: 1px solid var(--success);
  }

  .status-denied {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
  }

  .status-requested {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info);
    border: 1px solid var(--info);
  }

  .status-borrowed {
    background: rgba(44, 90, 160, 0.1);
    color: var(--accent-cool);
    border: 1px solid var(--accent-cool);
  }

  .status-returned {
    background: rgba(108, 117, 125, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
  }

  /* Button Variations - already defined above, removing duplicates */

  .inline-form {
    display: inline;
  }

  .inline-form button {
    margin-left: 0.5rem;
  }

  /* Page Actions */
  .page-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
  }

  .page-actions .btn {
    flex: 1;
    min-width: 150px;
  }

  /* Community Inventory Styles */
  .community-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-bottom: 2rem;
    font-style: italic;
    font-weight: 400;
  }

  .community-stats {
    background: var(--bg-card);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-light);
  }

  .community-stats h3 {
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
  }

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

  .stat-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
  }

  .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-cool);
  }

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

  .stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
  }

  .top-contributors {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-light);
  }

  .top-contributors h4 {
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 700;
  }

  .contributors-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .contributor-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--accent-cool);
    transition: all 0.2s ease;
  }

  .contributor-item:hover {
    background: var(--bg-card);
    transform: translateX(4px);
  }

  .contributor-rank {
    color: var(--accent-cool);
    font-weight: 700;
    font-size: 0.9rem;
  }

  .contributor-name {
    color: var(--text-primary);
    font-weight: 600;
  }

  .contributor-count {
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
  }

  /* Items Grid */
  .items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
  }

  .item-card {
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-light);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
  }

  .item-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-medium);
    border-color: var(--accent-cool);
  }

  .item-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    position: relative;
  }

  .item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
  }

  .item-card:hover .item-image img {
    transform: scale(1.05);
  }

  .item-info {
    padding: 1.5rem;
  }

  .item-name {
    color: var(--text-primary);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
  }

  .item-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
  }

  .item-meta {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
  }

  .item-category,
  .item-condition {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    border: 1px solid var(--border-medium);
    font-weight: 500;
  }

  .item-owner {
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border: 1px solid var(--border-light);
  }

  .owner-info {
    display: flex;
    align-items: center;
    gap: 1rem;
  }

  .owner-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-cool);
  }

  .owner-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .owner-details {
    flex: 1;
  }

  .owner-name {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1rem;
  }

  .owner-location {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: 0.25rem;
    font-weight: 500;
  }

  .item-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
  }

  .item-actions .btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
  }

  .no-items {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-light);
  }

  .no-items p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 500;
  }

  /* Responsive Design */
  @media (max-width: 768px) {
    .search-row,
    .filter-row {
      flex-direction: column;
      align-items: stretch;
    }

    .table {
      font-size: 0.8rem;
    }

    .table th,
    .table td {
      padding: 0.5rem;
    }

    .items-grid {
      grid-template-columns: 1fr;
      gap: 1rem;
    }

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

    .contributor-item {
      flex-direction: column;
      gap: 0.5rem;
      text-align: center;
    }

    .item-actions {
      flex-direction: column;
    }

    .item-actions .btn {
      width: 100%;
    }
  }
  