/* Liquidity-specific styles only (removing duplicates from base.html) */
  
/* Body and Global Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding: 0.35in;
  box-sizing: border-box;
}

/* Page Header Styles */
/* * FINAL FIX: Increased specificity and clearing pseudo-elements 
 * This targets the header inside the main content area and removes all box styles.
 */
main .page-header {
    text-align: center;
    margin-bottom: 40px !important; /* Ensure margin is preserved but not boxed */
    width: 100%;
    
    /* Box Removal Overrides */
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    filter: none !important;
}

/* Clear any box applied via ::before or ::after pseudo-elements */
main .page-header::before,
main .page-header::after {
    content: none !important;
    display: none !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.page-title {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #d97706);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    text-align: center;
}

.page-subtitle {
    font-size: 1.2rem;
    color: #94a3b8;
    font-weight: 500;
    text-align: center !important;
    width: 100%;
    display: block;
    margin: 0 auto;
}


  /* User Positions Section */
  .user-positions {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 3rem;
    margin-bottom: 2rem;
    display: none;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 50px rgba(139, 92, 246, 0.3);
  }

  .user-positions.connected {
    display: block;
  }

  .user-positions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
  }

  .user-positions-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #3b82f6;
  }

  .total-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #10b981;
  }

  .positions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .position-card {
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(59, 130, 246, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.15), inset 0 0 10px rgba(59, 130, 246, 0.05);
  }

  .position-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.4), inset 0 0 15px rgba(59, 130, 246, 0.1);
  }

  /* Stats Cards */
  .stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
  }

  .stat-card {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 50px rgba(139, 92, 246, 0.3);
  }

  .stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.1), 0 0 60px rgba(139, 92, 246, 0.4);
  }

  .stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
  }

  .stat-label {
    font-size: 0.9rem;
    color: #94a3b8;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
  }

  .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
  }

  .stat-change {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .stat-change.positive {
    color: #10b981;
  }

  .stat-change.negative {
    color: #ef4444;
  }

  /* Controls Section */
  .controls-container {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 50px rgba(139, 92, 246, 0.3);
  }

  .filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: rgba(15, 23, 42, 0.8);
    padding: 0.5rem;
    border-radius: 12px;
    width: fit-content;
    flex-wrap: wrap;
  }

  .filter-tab {
    padding: 12px 24px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
  }

  .filter-tab.active {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
  }

  .filter-tab:hover:not(.active) {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
  }

  .search-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
  }

  .search-input {
    flex: 1;
    min-width: 300px;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(51, 65, 85, 0.5);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
  }

  .search-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }

  .search-input::placeholder {
    color: #64748b;
  }

  .filter-select {
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(51, 65, 85, 0.5);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    min-width: 140px;
  }

  .filter-select:focus {
    outline: none;
    border-color: #3b82f6;
  }

  /* Legend Section */
  .legend-container {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 50px rgba(139, 92, 246, 0.3);
  }

  .legend-title {
    font-weight: 700;
    color: #facc15;
    margin-bottom: 1rem;
    font-size: 1.1rem;
  }

  .legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
  }

  .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #e2e8f0;
  }

  .legend-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    margin-left: auto;
  }

  .legend-link:hover {
    text-decoration: underline;
  }

  /* Pool Table */
  .pools-container {
    background: rgba(30, 41, 59, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 16px;
    overflow-x: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 50px rgba(139, 92, 246, 0.3);
  }

  .pool-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
  }

  .pool-table th {
    background: rgba(15, 23, 42, 0.8);
    padding: 20px 24px;
    text-align: left;
    font-weight: 700;
    color: #e2e8f0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  }

  .pool-table td {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(59, 130, 246, 0.1);
    vertical-align: middle;
  }

  .pool-table tr:hover {
    background: rgba(59, 130, 246, 0.05);
  }

  .pool-name {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 16px;
    color: white;
  }

  .pool-icons {
    display: flex;
    align-items: center;
    gap: -8px;
  }

  .pool-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    font-size: 12px;
    border: 2px solid #1e293b;
  }

  .pool-icon:not(:first-child) {
    margin-left: -8px;
  }

  .pool-badges {
    display: flex;
    gap: 8px;
    margin-left: 12px;
  }

  .pool-badge {
    font-size: 16px;
  }

  .apr-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .apr-value {
    font-size: 18px;
    font-weight: 700;
    color: #10b981;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .apr-trend {
    font-size: 14px;
  }

  .apr-trend.up {
    color: #10b981;
  }

  .apr-trend.down {
    color: #ef4444;
  }

  .apr-estimate {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
  }

  .apr-bar {
    width: 100%;
    height: 6px;
    background: rgba(15, 23, 42, 0.6);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
  }

  .apr-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #3b82f6);
    border-radius: 3px;
    transition: width 0.3s ease;
  }

  .value-cell {
    font-weight: 600;
    color: white;
    font-size: 16px;
  }

  .action-buttons {
    display: flex;
    gap: 12px;
  }

  .action-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
  }

  .deposit-btn {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
  }

  .deposit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
  }

  .withdraw-btn {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
  }

  .withdraw-btn:hover {
    background: #ef4444;
    color: white;
    transform: translateY(-2px);
  }

  /* Create Pool Floating Button */
  .create-pool-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 8px 32px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .create-pool-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(59, 130, 246, 0.4);
  }

  /* Liquidity Action Modal */
  .liquidity-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
  }

  .liquidity-modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90vw;
    color: white;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.3);
  }

  .pool-info {
    background: rgba(15, 23, 42, 0.6);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
  }

  .amount-input {
    width: 100%;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(51, 65, 85, 0.5);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
  }

  .amount-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }

  .max-btn {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #3b82f6;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
  }

  .max-btn:hover {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
  }

  .confirm-btn {
    width: 100%;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6, #8b5cf6, #d97706);
    color: white;
    border: none;
    padding: 1.5rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
  }

  .confirm-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
  }

  .confirm-btn.withdraw {
    background: linear-gradient(135deg, #dc2626, #ef4444);
  }

  .confirm-btn.withdraw:hover {
    box-shadow: 0 15px 35px rgba(239, 68, 68, 0.4);
  }

  /* Create Pool Modal */
  .create-pool-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
  }

  .create-pool-modal-content {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 600px;
    width: 90vw;
    color: white;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.3);
  }

  .token-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
  }

  .token-input {
    flex: 1;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(51, 65, 85, 0.5);
    border-radius: 8px;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
  }

  .token-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  }

  .fee-tier-selector {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
  }

  .fee-tier-btn {
    flex: 1;
    padding: 1.5rem 1rem;
    background: rgba(15, 23, 42, 0.8);
    border: 2px solid rgba(51, 65, 85, 0.5);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.15), inset 0 0 10px rgba(59, 130, 246, 0.05);
  }

  .fee-tier-btn:hover {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(15, 23, 42, 0.8);
    box-shadow: 0 0 25px rgba(59, 130, 246, 0.4), inset 0 0 15px rgba(59, 130, 246, 0.1);
  }

  .fee-tier-btn.active {
    background: rgba(59, 130, 246, 0.2);
    border-color: #3b82f6;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3), inset 0 0 10px rgba(59, 130, 246, 0.1);
  }

  /* Loading Animation */
  .loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: spin 1s ease-in-out infinite;
  }

  @keyframes spin {
    to { transform: rotate(360deg); }
  }

  /* Responsive Design Media Queries */
  @media (max-width: 768px) {
    .page-title {
      font-size: 2rem;
    }

    .user-positions, .stats-container, .controls-container, .legend-container, .pools-container {
      padding: 1.5rem;
    }

    .stats-container {
      grid-template-columns: 1fr;
    }

    .search-controls {
      flex-direction: column;
      align-items: stretch;
    }

    .search-input {
      min-width: auto;
    }

    .filter-tabs {
      width: 100%;
      justify-content: center;
    }

    .pool-table {
      font-size: 14px;
      min-width: 600px;
    }

    .action-buttons {
      flex-direction: column;
    }

    .create-pool-btn {
      bottom: 16px;
      right: 16px;
      padding: 12px 20px;
      font-size: 14px;
    }

    .liquidity-modal-content, .create-pool-modal-content {
      padding: 1.5rem;
    }

    .modal-title {
      font-size: 1.25rem;
    }

    .token-input-group, .fee-tier-selector {
      flex-direction: column;
      gap: 1rem;
    }

    .fee-tier-btn {
      padding: 1rem;
    }
  }

  @media (max-width: 480px) {
    .page-title {
      font-size: 1.8rem;
    }
    .page-subtitle {
      font-size: 1rem;
    }
    .filter-tabs {
      flex-direction: column;
    }
    .filter-tab {
      width: 100%;
    }
    .action-buttons {
      flex-direction: row;
      justify-content: center;
    }
    .action-btn {
      flex: 1;
    }
    .pool-icon {
      width: 28px;
      height: 28px;
    }
    .pool-table {
      min-width: 500px;
    }
  }
  
 