@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  :root {
    --background: 0 0% 100%;
    --foreground: 222.2 84% 4.9%;

    --card: 0 0% 100%;
    --card-foreground: 222.2 84% 4.9%;

    --popover: 0 0% 100%;
    --popover-foreground: 222.2 84% 4.9%;

    --primary: 222.2 47.4% 11.2%;
    --primary-foreground: 210 40% 98%;

    --secondary: 210 40% 96.1%;
    --secondary-foreground: 222.2 47.4% 11.2%;

    --muted: 210 40% 96.1%;
    --muted-foreground: 215.4 16.3% 46.9%;

    --accent: 210 40% 96.1%;
    --accent-foreground: 222.2 47.4% 11.2%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 210 40% 98%;

    --border: 214.3 31.8% 91.4%;
    --input: 214.3 31.8% 91.4%;
    --ring: 222.2 84% 4.9%;

    --radius: 0.5rem;
  }

  .dark {
    --background: 222.2 84% 4.9%;
    --foreground: 210 40% 98%;

    --card: 222.2 84% 4.9%;
    --card-foreground: 210 40% 98%;

    --popover: 222.2 84% 4.9%;
    --popover-foreground: 210 40% 98%;

    --primary: 210 40% 98%;
    --primary-foreground: 222.2 47.4% 11.2%;

    --secondary: 217.2 32.6% 17.5%;
    --secondary-foreground: 210 40% 98%;

    --muted: 217.2 32.6% 17.5%;
    --muted-foreground: 215 20.2% 65.1%;

    --accent: 217.2 32.6% 17.5%;
    --accent-foreground: 210 40% 98%;

    --destructive: 0 62.8% 30.6%;
    --destructive-foreground: 210 40% 98%;

    --border: 217.2 32.6% 17.5%;
    --input: 217.2 32.6% 17.5%;
    --ring: 212.7 26.8% 83.9%;
  }
}

@layer base {
  * {
    @apply border-border/40;
  }
  body {
    @apply bg-background text-foreground;
  }
}


@layer utilities {
  .animate-in {
    animation-duration: 300ms;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, opacity;
  }
  
  .fade-in-0 {
    opacity: 0;
  }
  
  .fade-in-100 {
    opacity: 1;
  }
  
  .zoom-in-95 {
    transform: scale(0.95);
  }
  
  .zoom-in-100 {
    transform: scale(1);
  }
  
  .duration-300 {
    animation-duration: 300ms;
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.95); }
  to { transform: scale(1); }
}

.modal-animation {
  animation: fadeIn 300ms ease forwards, zoomIn 300ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


.noto-sans-jp-<uniquifier> {
  font-family: "Noto Sans JP", sans-serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
}

.noto-sans-<uniquifier> {
  font-family: "Noto Sans", sans-serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
  font-variation-settings:
    "wdth" 100;
}

.noto-sans-tc-<uniquifier> {
  font-family: "Noto Sans TC", sans-serif;
  font-optical-sizing: auto;
  font-weight: <weight>;
  font-style: normal;
}

.poppins-thin {
  font-family: "Poppins", sans-serif;
  font-weight: 100;
  font-style: normal;
}

.poppins-extralight {
  font-family: "Poppins", sans-serif;
  font-weight: 200;
  font-style: normal;
}

.poppins-light {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  font-style: normal;
}

.poppins-regular {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-style: normal;
}

.poppins-medium {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-style: normal;
}

.poppins-semibold {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-style: normal;
}

.poppins-bold {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-style: normal;
}

.poppins-extrabold {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-style: normal;
}

.poppins-black {
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-style: normal;
}

.poppins-thin-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 100;
  font-style: italic;
}

.poppins-extralight-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 200;
  font-style: italic;
}

.poppins-light-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 300;
  font-style: italic;
}

.poppins-regular-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  font-style: italic;
}

.poppins-medium-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  font-style: italic;
}

.poppins-semibold-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-style: italic;
}

.poppins-bold-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 700;
  font-style: italic;
}

.poppins-extrabold-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  font-style: italic;
}

.poppins-black-italic {
  font-family: "Poppins", sans-serif;
  font-weight: 900;
  font-style: italic;
}

/* 言語ごとのフォント設定 */
:root {
  /* デフォルトフォント */
  --font-primary: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* 日本語 */
:lang(ja), [lang="ja"] {
  --font-primary: "Noto Sans JP", sans-serif;
  font-feature-settings: "palt";  /* 日本語のプロポーショナル字間調整 */
}

/* 英語 */
:lang(en), [lang="en"] {
  --font-primary: "Poppins", sans-serif;
}

/* 中国語（繁体字） */
:lang(zh-TW), [lang="zh-TW"] {
  --font-primary: "Noto Sans TC", sans-serif;
}

/* 中国語（簡体字） */
:lang(zh-CN), [lang="zh-CN"] {
  --font-primary: "Noto Sans SC", sans-serif;
}

/* 韓国語 */
:lang(ko), [lang="ko"] {
  --font-primary: "Noto Sans KR", sans-serif;
}

/* フォント適用 */
body {
  font-family: var(--font-primary);
}

/* ユーティリティクラス */
.font-primary {
  font-family: var(--font-primary);
}

/* 言語ごとのフォントサイズ調整 */
:lang(ja) h1, [lang="ja"] h1,
:lang(zh-TW) h1, [lang="zh-TW"] h1,
:lang(zh-CN) h1, [lang="zh-CN"] h1,
:lang(ko) h1, [lang="ko"] h1 {
  /* CJK言語はラテン文字より視認性を確保するため少し大きめに */
  font-size: 1.05em;
  line-height: 1.6;
}

/* 言語ごとの行間調整 */
:lang(ja) p, [lang="ja"] p,
:lang(zh-TW) p, [lang="zh-TW"] p,
:lang(zh-CN) p, [lang="zh-CN"] p,
:lang(ko) p, [lang="ko"] p {
  line-height: 1.8;  /* CJK言語は行間を広めに */
}

@import "recipes.css";
@import "menu_selector.css";

