import React from "react";
import { cn } from "./cn";

export default function Card({
  children,
  className,
  variant = "default", // default | plain
  padding = "md", // sm | md | lg | none
}) {
  const base =
    "rounded-2xl shadow border border-black/10 dark:border-white/10 bg-white/70 dark:bg-white/5 backdrop-blur-sm";

  const pad =
    padding === "none"
      ? ""
      : padding === "sm"
      ? "p-3"
      : padding === "lg"
      ? "p-6"
      : "p-4 md:p-5";

  // اگر یه جا خواستی بک‌گراند ساده‌تر باشه
  const variantCls = variant === "plain" ? "bg-white dark:bg-[#16325b]" : "";

  return <div className={cn(base, variantCls, pad, className)}>{children}</div>;
}
