/**
 * 本地化 Tailwind CSS Utilities
 * 
 * 此檔案替代 Tailwind CSS CDN，僅包含專案實際使用的 utility classes
 * 目的：提升頁面載入效能，消除 Console 警告
 * 
 * 適用頁面：index.html, landing.html, manual-card-selection.html
 */

/* ===========================
   容器與佈局
   =========================== */

.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

.max-w-7xl {
    max-width: 80rem;
    /* 1280px */
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* ===========================
   Flexbox
   =========================== */

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.flex-row {
    flex-direction: row;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

/* ===========================
   Grid
   =========================== */

.grid {
    display: grid;
}

.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 1024px) {
    .lg\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .lg\:col-span-2 {
        grid-column: span 2 / span 2;
    }
}

/* ===========================
   間距 - Gap
   =========================== */

.gap-6 {
    gap: 1.5rem;
    /* 24px */
}

@media (min-width: 768px) {
    .md\:gap-12 {
        gap: 3rem;
        /* 48px */
    }
}

/* ===========================
   間距 - Margin
   =========================== */

.mt-4 {
    margin-top: 1rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-12 {
    margin-top: 3rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

/* ===========================
   間距 - Padding
   =========================== */

.p-4 {
    padding: 1rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* ===========================
   文字大小
   =========================== */

.text-sm {
    font-size: 0.875rem;
    /* 14px */
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    /* 18px */
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    /* 20px */
    line-height: 1.75rem;
}

.text-4xl {
    font-size: 2.25rem;
    /* 36px */
    line-height: 2.5rem;
}

@media (min-width: 768px) {
    .md\:text-5xl {
        font-size: 3rem;
        /* 48px */
        line-height: 1;
    }

    .md\:flex-row {
        flex-direction: row;
    }
}

/* ===========================
   文字樣式
   =========================== */

.text-center {
    text-align: center;
}

.font-semibold {
    font-weight: 600;
}

.tracking-widest {
    letter-spacing: 0.1em;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

/* ===========================
   文字顏色
   =========================== */

.text-white {
    color: #ffffff;
}

.text-gray-300 {
    color: #d1d5db;
}

.text-gray-400 {
    color: #9ca3af;
}

/* 自訂顏色 - index.html / landing.html */
.text-\[\#8caaa0\] {
    color: #8caaa0;
}

/* ===========================
   背景顏色
   =========================== */

.bg-red-500 {
    background-color: #ef4444;
}

/* 自訂顏色 - Toast */
.bg-\[\#4a6e5d\] {
    background-color: #4a6e5d;
}

/* ===========================
   定位
   =========================== */

.fixed {
    position: fixed;
}

.absolute {
    position: absolute;
}

.relative {
    position: relative;
}

.bottom-10 {
    bottom: 2.5rem;
}

.left-1\/2 {
    left: 50%;
}

/* ===========================
   Transform
   =========================== */

.transform {
    transform: translateX(var(--tw-translate-x, 0)) translateY(var(--tw-translate-y, 0)) rotate(var(--tw-rotate, 0)) skewX(var(--tw-skew-x, 0)) skewY(var(--tw-skew-y, 0)) scaleX(var(--tw-scale-x, 1)) scaleY(var(--tw-scale-y, 1));
}

.-translate-x-1\/2 {
    --tw-translate-x: -50%;
    transform: translateX(-50%);
}

/* ===========================
   透明度與視覺效果
   =========================== */

.opacity-0 {
    opacity: 0;
}

.opacity-80 {
    opacity: 0.8;
}

/* ===========================
   邊框圓角
   =========================== */

.rounded-full {
    border-radius: 9999px;
}

.rounded-lg {
    border-radius: 0.5rem;
}

/* ===========================
   陰影
   =========================== */

.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

/* ===========================
   層級
   =========================== */

.z-50 {
    z-index: 50;
}

/* ===========================
   動畫與過渡
   =========================== */

.transition-opacity {
    transition-property: opacity;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-500 {
    transition-duration: 500ms;
}

/* ===========================
   群組效果 (Tailwind group)
   =========================== */

.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}