/* 基本スタイル */
body {
    font-family: 'Helvetica Neue', 'Helvetica', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Arial', 'Yu Gothic', 'Meiryo', sans-serif;
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 100%);
    min-height: 100vh;
    margin: 0;
    color: #333;
}

/* メニューコンテナ */
.menu-container {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 800px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    backdrop-filter: blur(10px);
}

.menu-container h1 {
    margin-bottom: 40px;
    font-size: 2.2rem;
    color: #00796b;
    font-weight: 600;
}

/* カードグリッド */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* カードスタイル */
.card {
    background: #ffffff;
    border-radius: 15px;
    padding: 24px;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 25px rgba(0, 121, 107, 0.2);
}

.card i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: #00796b;
    transition: color 0.3s ease;
}

.card:hover i {
    color: #004d40;
}

.card h3 {
    font-size: 1.4rem;
    margin: 10px 0;
    font-weight: 500;
}

.card p {
    font-size: 0.9rem;
    color: #757575;
    line-height: 1.5;
}

/* フェードアニメーション */
.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}

.fade-in {
    opacity: 1;
    transition: opacity 0.5s ease-in;
}

.hidden {
    display: none;
}

/* Header/Footer Animation */
#mainHeader,
#mainFooter {
    /* Ensure initial state allows for animation */
    max-height: 200px;
    /* Arbitrary large value */
    opacity: 1;
    overflow: hidden;
    transition:
        max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        padding 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        margin 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

body.search-mode #mainHeader {
    transform: translateY(-20px);
    /* Slight movement up */
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    pointer-events: none;
    border: none;
    /* Remove border to prevent line remaining */
}

body.search-mode #mainFooter {
    transform: translateY(20px);
    /* Slight movement down */
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    pointer-events: none;
    border: none;
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fade-in-up 0.5s ease-out forwards;
}

/* Custom Styles */
:root {
    --color-background: #f8fafc;
    /* slate-50 */
    --color-primary: #4f46e5;
    /* indigo-600 */
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c7c7cc;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1aa;
}

/* Table Styles */
.table-container {
    /* overflow-y: auto; */
    /* max-height: 70vh; */
    /* 縦スクロールを有効にし、最大の高さを設定 -> 廃止: 画面全体スクロールへ変更 */
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}


.table-container tr {
    position: relative;
}

.table-container tr:hover {
    z-index: 10;
}

.table-container td {
    position: relative;
    /* For tooltip positioning */
}

/* Mobile Table View */
@media (max-width: 640px) {
    .table-container table {
        display: block;
    }

    .table-container thead {
        display: none;
    }

    .table-container tbody {
        display: block;
    }

    .table-container tr {
        display: block;
        margin-bottom: 1rem;
        background-color: white;
        border: 1px solid #e2e8f0;
        border-radius: 0.5rem;
        padding: 0.75rem;
        box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    }

    .table-container td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 0.5rem 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .table-container td:last-child {
        border-bottom: none;
    }

    .table-container td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #64748b;
        /* slate-500 */
        font-size: 0.75rem;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 3px solid #4f46e5;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Tooltip/Menu Style */
.tooltip-menu {
    position: absolute;
    z-index: 1000;
    /* Ensure it's on top */
}

/* Input field styles */
input[type="text"],
input[type="search"],
textarea {
    border-width: 1px;
    border-color: #d1d5db;
    /* gray-300 */
    transition:
        border-color 0.2s ease-in-out,
        box-shadow 0.2s ease-in-out;
}

input[type="text"]:hover,
input[type="search"]:hover,
textarea:hover {
    border-color: #a5b4fc !important;
    /* indigo-300 */
}

input[type="text"]:focus,
input[type="search"]:focus,
textarea:focus {
    border-color: #818cf8 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:hover,
input[type="search"]:hover {
    border-color: #818cf8 !important;
    box-shadow: 0 0 0 3px rgba(129, 140, 248, 0.3) !important;
}

input[type="text"]:focus,
input[type="search"]:focus {
    border-color: #4f46e5 !important;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.4) !important;
    outline: none;
}

/* Accordion Styles */
.description-accordion {
    background: white;
    border-radius: 0.75rem;
    /* rounded-xl */
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    /* shadow-sm */
    border: 1px solid #e5e7eb;
    /* border-gray-200 */
    overflow: hidden;
}

.accordion-header {
    width: 100%;
    padding: 1rem 1.5rem;
    background: white;
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    /* text-gray-800 */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.accordion-header:hover {
    background-color: #f9fafb;
    /* bg-gray-50 */
}

.accordion-header .icon {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: #6b7280;
    /* text-gray-500 */
}

.accordion-header.open .icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: #f9fafb;
    /* bg-gray-50 */
    border-top: 1px solid transparent;
}

.accordion-content.open {
    max-height: 500px;
    /* Adjust as needed */
    overflow-y: auto;
    border-top-color: #e5e7eb;
    /* border-gray-200 */
}

/* Markdown Content Styles in Accordion */
#notification-body h1,
#notification-body h2,
#notification-body h3,
#notification-body h4 {
    font-weight: bold;
    color: #374151;
    /* text-gray-700 */
    margin-top: 1em;
    margin-bottom: 0.5em;
}

#notification-body h4 {
    font-size: 1rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.25em;
}

#notification-body ul {
    list-style-type: disc;
    padding-left: 1.5em;
    margin-bottom: 1em;
}

#notification-body li {
    margin-bottom: 0.25em;
}

#notification-body a {
    color: #4f46e5;
    /* text-indigo-600 */
    text-decoration: underline;
}

#notification-body a:hover {
    color: #4338ca;
    /* text-indigo-700 */
}

#notification-body p {
    margin-bottom: 0.5em;
}

/* Update time text style */
.update-time {
    display: block;
    margin-top: 0.75rem; /* 12px */
    font-size: 0.75rem; /* 12px */
    color: #6b7280; /* gray-500 */
    text-align: right;
    font-weight: 500;
    width: 100%;
}
