:root {
    --sidebar-width: 280px;
    --sidebar-height: 200px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

table,
tr,
td {
    width: fit-content !important;
}

/* デスクトップ用サイドバー（左側） */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(135deg, #002ef8 0%, #ddff00 100%);
    color: white;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 1050;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.1);
}

.sidebar.show {
    transform: translateX(0);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.sidebar-menu {
    padding: 1rem 0;
}

.sidebar-menu .nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-weight: 600;
}

.sidebar-menu .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding-left: 2rem;
}

.sidebar-menu .nav-link i {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

/* スマホ用サイドバー（上部） */
@media (max-width: 767.98px) {
    .sidebar {
        top: 0;
        left: 0;
        width: 100%;
        height: var(--sidebar-height);
        transform: translateY(-100%);
    }

    .sidebar.show {
        transform: translateY(0);
    }

    .sidebar-header {
        padding: 1rem;
        text-align: center;
    }

    .sidebar-header h3 {
        font-size: 1.25rem;
    }

    .sidebar-menu {
        padding: 0.5rem 0;
    }

    .sidebar-menu .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .sidebar-menu .nav-link:hover {
        padding-left: 1rem;
    }

    .main-content {
        padding-top: 0 !important;
    }
}

/* メイン コンテンツ */
.main-content {
    padding-top: 0;
    transition: margin-left 0.3s ease-in-out;
    min-height: 100vh;
    background: #f8f9fa;
}

@media (min-width: 768px) {
    .main-content.sidebar-open {
        margin-left: var(--sidebar-width);
    }
}

/* メニューボタン */
.menu-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1060;
    background: #667eea;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-toggle:hover {
    background: #5a6fd8;
    transform: scale(1.05);
}

.menu-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
}

/* スマホでメニューボタンの位置調整 */
@media (max-width: 767.98px) {
    .menu-toggle {
        top: 0.5rem;
        left: 0.5rem;
        width: 45px;
        height: 45px;
    }
}

/* ハンバーガーメニューアイコン */
.hamburger {
    width: 20px;
    height: 16px;
    position: relative;
    transform: rotate(0deg);
    transition: 0.3s ease-in-out;
    cursor: pointer;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: white;
    border-radius: 2px;
    opacity: 1;
    left: 0;
    transform: rotate(0deg);
    transition: 0.25s ease-in-out;
}

.hamburger span:nth-child(1) {
    top: 0px;
}

.hamburger span:nth-child(2) {
    top: 7px;
}

.hamburger span:nth-child(3) {
    top: 14px;
}

/* ×マークへの変化 */
.hamburger.open span:nth-child(1) {
    top: 7px;
    transform: rotate(135deg);
}

.hamburger.open span:nth-child(2) {
    opacity: 0;
    left: -60px;
}

.hamburger.open span:nth-child(3) {
    top: 7px;
    transform: rotate(-135deg);
}

/* オーバーレイ */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}

/* コンテンツスタイル */
.content-section {
    padding: 2rem;
    margin: 1rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.content-section h2 {
    color: #343a40;
    margin-bottom: 1rem;
}

.content-section p {
    color: #6c757d;
    line-height: 1.6;
}

/* アニメーション */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

.content-section {
    animation: fadeInUp 0.6s ease-out;
}