/* ========================================
   1. Reset & Base
   ======================================== */
*,
::after,
::before {
    box-sizing: border-box;
    border: 0 solid #e5e7eb;
}

html {
    font-family: ui-sans-serif, system-ui, sans-serif;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    tab-size: 4;
}

body {
    margin: 0;
    line-height: inherit;
    background-color: #f9fafb;
    color: #1f2937;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: inherit;
}

button {
    cursor: pointer;
}

select {
    cursor: pointer;
}

/* ========================================
   2. Layout & Positioning
   ======================================== */
.fixed {
    position: fixed;
}
.inset-0 {
    inset: 0;
}
.sticky {
    position: sticky;
}
.top-0 {
    top: 0;
}
.z-50 {
    z-index: 50;
}
.z-100 {
    z-index: 100;
}
.z-120 {
    z-index: 120;
}

.flex {
    display: flex;
}
.hidden {
    display: none;
}
.grid {
    display: grid;
}
.inline-flex {
    display: inline-flex;
}
.block {
    display: block;
}
.flex-1 {
    flex: 1 1 0%;
}

.h-12 {
    height: 3rem;
}
.h-8 {
    height: 2rem;
}
.h-10 {
    height: 2.5rem;
}
.h-auto {
    height: auto;
}
.h-1p5 {
    height: .375rem;
}
.w-12 {
    width: 3rem;
}
.w-full {
    width: 100%;
}
.w-8 {
    width: 2rem;
}
.w-10 {
    width: 2.5rem;
}
.w-1p5 {
    width: .375rem;
}

.max-w-5xl {
    max-width: 64rem;
}
.max-w-4xl {
    max-width: 56rem;
}
.max-w-md {
    max-width: 28rem;
}
.max-w-xl {
    max-width: 36rem;
}

.flex-col {
    flex-direction: column;
}
.flex-wrap {
    flex-wrap: wrap;
}
.items-start {
    align-items: flex-start;
}
.items-center {
    align-items: center;
}
.items-stretch {
    align-items: stretch;
}
.justify-center {
    justify-content: center;
}
.justify-between {
    justify-content: space-between;
}

.gap-1 {
    gap: .25rem;
}
.gap-1p5 {
    gap: .375rem;
}
.gap-2 {
    gap: .5rem;
}
.gap-2p5 {
    gap: .625rem;
}
.gap-3 {
    gap: .75rem;
}
.gap-4 {
    gap: 1rem;
}

.space-y-1>*+* {
    margin-top: .25rem;
}
.space-y-4>*+* {
    margin-top: 1rem;
}
.space-y-8>*+* {
    margin-top: 2rem;
}
.space-y-1p5>*+* {
    margin-top: .375rem;
}

.overflow-hidden {
    overflow: hidden;
}

.rounded-full {
    border-radius: 9999px;
}
.rounded-2xl {
    border-radius: 1rem;
}
.rounded-xl {
    border-radius: .75rem;
}
.rounded-sm {
    border-radius: .125rem;
}

.border {
    border-width: 1px;
}
.border-b {
    border-bottom-width: 1px;
}
.border-t {
    border-top-width: 1px;
}
.border-b-2 {
    border-bottom-width: 2px;
}

/* ========================================
   3. Colors & Backgrounds
   ======================================== */
.bg-white {
    background-color: #fff;
}
.bg-gray-50 {
    background-color: #f9fafb;
}
.bg-blue-50 {
    background-color: #eff6ff;
}
.bg-amber-50 {
    background-color: #fffbeb;
}
.bg-black80 {
    background-color: rgba(0, 0, 0, .8);
}
.bg-black60 {
    background-color: rgba(0, 0, 0, .6);
}
.bg-blue-600 {
    background-color: #2563eb;
}
.bg-gray-50p50 {
    background-color: rgba(249, 250, 251, .5);
}
.bg-gray-50p80 {
    background-color: rgba(249, 250, 251, .8);
}
.bg-blue-50p50 {
    background-color: rgba(239, 246, 255, .5);
}
.bg-amber-50p80 {
    background-color: rgba(255, 251, 235, .8);
}
.bg-whitep60 {
    background-color: rgba(255, 255, 255, .6);
}
.bg-purple-200p70 {
    background-color: rgba(233, 213, 255, .7);
}
.bg-gray-200p70 {
    background-color: rgba(229, 231, 235, .7);
}
.bg-gray-100 {
    background-color: #f3f4f6;
}

.bg-gradient-to-r {
    background-image: linear-gradient(to right, #faf5ff, rgba(238, 242, 255, .7));
}

/* ========================================
   4. Spacing (Padding & Margin)
   ======================================== */
.p-4 {
    padding: 1rem;
}
.p-6 {
    padding: 1.5rem;
}
.p-3 {
    padding: .75rem;
}
.p-1p5 {
    padding: .375rem;
}
.p-8 {
    padding: 2rem;
}
.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}
.px-5 {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}
.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}
.px-3 {
    padding-left: .75rem;
    padding-right: .75rem;
}
.px-2 {
    padding-left: .5rem;
    padding-right: .5rem;
}
.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}
.py-8 {
    padding-top: 2rem;
    padding-bottom: 2rem;
}
.py-10 {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}
.py-20 {
    padding-top: 5rem;
    padding-bottom: 5rem;
}
.py-2p5 {
    padding-top: .625rem;
    padding-bottom: .625rem;
}
.py-2 {
    padding-top: .5rem;
    padding-bottom: .5rem;
}
.py-1p5 {
    padding-top: .375rem;
    padding-bottom: .375rem;
}
.py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}
.pt-2 {
    padding-top: .5rem;
}
.pb-2 {
    padding-bottom: .5rem;
}
.pl-1 {
    padding-left: .25rem;
}

.mt-1 {
    margin-top: .25rem;
}
.mt-2 {
    margin-top: .5rem;
}
.mt-3p5 {
    margin-top: .875rem;
}
.mt-4 {
    margin-top: 1rem;
}
.mt-6 {
    margin-top: 1.5rem;
}
.mt-8 {
    margin-top: 2rem;
}
.mt-16 {
    margin-top: 4rem;
}
.mb-1p5 {
    margin-bottom: .375rem;
}
.mb-2 {
    margin-bottom: .5rem;
}
.mb-4 {
    margin-bottom: 1rem;
}
.mb-6 {
    margin-bottom: 1.5rem;
}
.mb-8 {
    margin-bottom: 2rem;
}
.mx-auto {
    margin-left: auto;
    margin-right: auto;
}
.mx-0p5 {
    margin-left: .125rem;
    margin-right: .125rem;
}
.mt-0p5 {
    margin-top: .125rem;
}

/* ========================================
   5. Typography
   ======================================== */
.text-center {
    text-align: center;
}
.text-left {
    text-align: left;
}

.text-xs {
    font-size: .75rem;
    line-height: 1rem;
}
.text-sm {
    font-size: .875rem;
    line-height: 1.25rem;
}
.text-base {
    font-size: 1rem;
    line-height: 1.5rem;
}
.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}
.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}
.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}
.text-4xl {
    font-size: 2.25rem;
    line-height: 2.5rem;
}
.text-5xl {
    font-size: 3rem;
    line-height: 1;
}
.text-10px {
    font-size: 10px;
}
.text-11px {
    font-size: 11px;
}

.leading-none {
    line-height: 1;
}
.leading-relaxed {
    line-height: 1.625;
}
.tracking-tight {
    letter-spacing: -.025em;
}
.tracking-wide {
    letter-spacing: .025em;
}
.tracking-wider {
    letter-spacing: .05em;
}

.font-medium {
    font-weight: 500;
}
.font-semibold {
    font-weight: 600;
}
.font-bold {
    font-weight: 700;
}
.font-mono {
    font-family: ui-monospace, SFMono-Regular, monospace;
}

.text-gray-400 {
    color: #9ca3af;
}
.text-gray-500 {
    color: #6b7280;
}
.text-gray-600 {
    color: #4b5563;
}
.text-gray-700 {
    color: #374151;
}
.text-gray-800 {
    color: #1f2937;
}
.text-gray-900 {
    color: #111827;
}
.text-blue-600 {
    color: #2563eb;
}
.text-blue-700 {
    color: #1d4ed8;
}
.text-blue-800 {
    color: #1e40af;
}
.text-red-500 {
    color: #ef4444;
}
.text-red-600 {
    color: #dc2626;
}
.text-green-600 {
    color: #16a34a;
}
.text-green-700 {
    color: #15803d;
}
.text-amber-800 {
    color: #92400e;
}
.text-amber-900 {
    color: #78350f;
}
.text-purple-600 {
    color: #9333ea;
}
.text-purple-700 {
    color: #7e22ce;
}
.text-white {
    color: #fff;
}
.text-green-500 {
    color: #22c55e;
}
.text-gray-300 {
    color: #d1d5db;
}

.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   6. Shadows & Effects
   ======================================== */
.shadow-xs {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
}
.shadow-sm {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1);
}
.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, .1), 0 8px 10px -6px rgba(0, 0, 0, .1);
}
.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
}
.shadow-inner {
    box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, .05);
}
.shadow-2xs {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
}

.transition {
    transition: color .15s, background-color .15s, border-color .15s, opacity .15s, box-shadow .15s;
}
.transition-all {
    transition: all .15s;
}
.transition-opacity {
    transition: opacity .5s;
}
.transition-colors {
    transition: color .2s, background-color .2s, border-color .2s;
}
.duration-200 {
    transition-duration: .2s;
}
.duration-300 {
    transition-duration: .3s;
}
.duration-500 {
    transition-duration: .5s;
}

.border-gray-100 {
    border-color: #f3f4f6;
}
.border-gray-200 {
    border-color: #e5e7eb;
}
.border-gray-300 {
    border-color: #d1d5db;
}
.border-blue-100 {
    border-color: #dbeafe;
}
.border-amber-200 {
    border-color: #fde68a;
}
.border-amber-500 {
    border-color: #f59e0b;
}
.border-gray-50 {
    border-color: #f9fafb;
}
.border-blue-600 {
    border-color: #2563eb;
}

.resize-none {
    resize: none;
}
.select-none {
    user-select: none;
}
.cursor-zoom-in {
    cursor: zoom-in;
}
.cursor-pointer {
    cursor: pointer;
}
.object-contain {
    object-fit: contain;
}
.grid-cols-1 {
    grid-template-columns: repeat(1, minmax(0, 1fr));
}
.list-none {
    list-style-type: none;
}
.underline {
    text-decoration-line: underline;
}
.decoration-2 {
    text-decoration-thickness: 2px;
}
.decoration-amber-500 {
    text-decoration-color: #f59e0b;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
.flex-grow {
    flex-grow: 1;
}
.uppercase {
    text-transform: uppercase;
}
.opacity-25 {
    opacity: .25;
}
.opacity-75 {
    opacity: .75;
}
.opacity-80 {
    opacity: .8;
}

/* ========================================
   7. Animations & Keyframes
   ======================================== */
.animate-spin {
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: .5;
    }
}

.img-fade-in {
    opacity: 0;
    animation: fadeIn .6s ease-out forwards;
}
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.lightbox-image {
    max-height: min(80vh, 900px);
    max-width: min(92vw, 1200px);
}

.backdrop-blur-md {
    backdrop-filter: blur(12px);
}
.backdrop-blur-xs {
    backdrop-filter: blur(4px);
}

/* ========================================
   8. Hover, Active & Focus States
   ======================================== */
.hover\:bg-gray-50:hover {
    background-color: #f9fafb;
}
.hover\:bg-gray-100:hover {
    background-color: #f3f4f6;
}
.hover\:bg-gray-200:hover {
    background-color: #e5e7eb;
}
.hover\:bg-blue-700:hover {
    background-color: #1d4ed8;
}
.hover\:opacity-95:hover {
    opacity: .95;
}
.hover\:text-blue-600:hover {
    color: #2563eb;
}
.hover\:text-blue-700:hover {
    color: #1d4ed8;
}
.hover\:text-gray-800:hover {
    color: #1f2937;
}
.hover\:text-purple-700:hover {
    color: #7e22ce;
}
.hover\:shadow-sm:hover {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .1), 0 1px 2px -1px rgba(0, 0, 0, .1);
}
.hover\:shadow-md:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -2px rgba(0, 0, 0, .1);
}
.hover\:shadow-xs:hover {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, .05);
}

.active\:scale-95:active {
    transform: scale(.95);
}
.active\:scale-90:active {
    transform: scale(.9);
}
.active\:scale-98:active {
    transform: scale(.98);
}

.focus\:outline-hidden:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
}

/* ========================================
   9. Responsive (min-width: 640px)
   ======================================== */
@media (min-width: 640px) {
    .sm\:flex {
        display: flex;
    }
    .sm\:hidden {
        display: none;
    }
    .sm\:inline {
        display: inline;
    }
    .sm\:grid-cols-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .sm\:flex-row {
        flex-direction: row;
    }
    .sm\:flex-1 {
        flex: 1 1 0%;
    }
    .sm\:items-center {
        align-items: center;
    }
    .sm\:justify-end {
        justify-content: flex-end;
    }
    .sm\:justify-between {
        justify-content: space-between;
    }
    .sm\:w-auto {
        width: auto;
    }
    .sm\:w-64 {
        width: 16rem;
    }
    .sm\:gap-6 {
        gap: 1.5rem;
    }
    .sm\:p-5 {
        padding: 1.25rem;
    }
    .sm\:top-3 {
        top: .75rem;
    }
    .sm\:right-3 {
        right: .75rem;
    }
    .sm\:text-sm {
        font-size: .875rem;
        line-height: 1.25rem;
    }
    .sm\:text-base {
        font-size: 1rem;
        line-height: 1.5rem;
    }

    /* 針對 footer 三個區塊的 grid 修正（若需要） */
    .sm\:grid-cols-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sm\:text-left {
        text-align: left;
    }
    .sm\:justify-start {
        justify-content: flex-start;
    }
    .sm\:block {
        display: block;
    }
}