html {
    scroll-behavior: smooth;
    background-color: #e2dccf;
}

@font-face {
    font-family: 'FlopDesignFONT';
    src: url('../font/FlopDesignFONT.otf') format('opentype');
}

body {
    font-family: 'Noto Sans JP', sans-serif;
    line-height: 1.7;
    background-color: transparent;
    color: #3d3d3d;
    margin: 0;
    padding: 0;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-image: url('../img/background.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    filter: sepia(0.2) brightness(1.05);
    opacity: 0.4;
}

header {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background-color: #f5f2e9;
    color: #333;
    padding: 15px 30px;
    border-bottom: 2px solid #4a4a4a;
    position: sticky;
    top: 0;
    z-index: 100;
}


.header-title h1 {
    margin: 0;
    font-family: 'FlopDesignFONT', sans-serif;
    font-size: 2em;
    font-weight: normal;
    color: #333;
    text-shadow: 2px 2px 0px #c5c5c5;
}

.header-banner img {
    max-height: 60px;
    vertical-align: middle;
}

.main-wrapper {
    display: flex;
    width: 95%;
    max-width: 1200px;
    margin: 25px auto;
    gap: 25px;
}

nav {
    flex: 0 0 200px;
    background-color: #f5f2e9;
    border: 2px solid #4a4a4a;
    border-radius: 4px;
    align-self: flex-start;
    position: sticky;
    top: 100px;
    padding: 5px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

nav ul li {
    margin-bottom: 0;
}

nav a {
    display: block;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.15s ease;
    border-bottom: 1px dotted #aaa;
}

nav ul li:last-child a {
    border-bottom: none;
}

nav a:hover {
    background-color: #d6d2c4;
    color: #000;
}

nav a.active {
    background-color: #4a4a4a;
    color: #fff;
}

.content {
    flex: 1;
    background-color: transparent;
    padding: 0;
    border: none;
}

section {
    margin-bottom: 30px;
    border: 2px solid #4a4a4a;
    padding: 20px;
    background-color: rgba(245, 242, 233, 0.85);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    box-shadow: 5px 5px 0px #4a4a4a;
    border-radius: 4px;
}

h2 {
    font-size: 1.5em;
    background-color: #4a4a4a;
    color: #fff;
    padding: 10px 15px;
    margin: -22px -22px 20px -22px;
    border-bottom: 2px solid #4a4a4a;
    text-shadow: 2px 2px 0px #000;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}

section a {
    color: #0066cc;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    font-weight: bold;
    transition: all 0.2s ease;
}
section a:hover {
    color: #004a94;
    background-color: rgba(0, 102, 204, 0.1);
}

strong, b {
    color: #c0392b;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.1);
}

code {
    background-color: #d6d2c4;
    border: 1px solid #aaa;
    border-radius: 3px;
    padding: 2px 5px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 0.9em;
}

section ul {
    list-style: square;
    padding-left: 25px;
}
section ul li {
    margin-bottom: 8px;
}

.page-toc {
    background-color: #e8e4d9;
    border: 1px dashed #aaa;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 4px;
}

.page-toc h4 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #555;
    border-bottom: 1px solid #ccc;
    padding-bottom: 5px;
}

.page-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
}

.page-toc ul li a {
    text-decoration: none;
    color: #0056b3;
    font-weight: bold;
    font-size: 0.95em;
}

.page-toc ul li a:hover {
    text-decoration: underline;
}

.server-address {
    background-color: #333;
    border: 4px ridge #777;
    padding: 20px;
    text-align: left;
}

.server-address .java, .server-address .be {
    font-family: 'FlopDesignFONT';
    font-size: 1.5em;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 5px 0;
}

.server-address .java {
    color: #82c9ff;
}

.server-address .be {
    color: #fff382;
}

footer {
    text-align: center;
    padding: 20px;
    color: #333;
    font-size: 0.9em;
    margin-top: 20px;
    background-color: rgba(245, 242, 233, 0.6);
}

#latest-news article, #news-list-container article {
    border-top: 1px dashed #aaa;
    padding-top: 20px;
    margin-top: 20px;
}

#latest-news article:first-child, #news-list-container article:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

#pagination-controls {
    text-align: center;
    margin-top: 30px;
}

.page-button {
    background-color: #f5f2e9;
    color: #333;
    padding: 10px 18px;
    text-decoration: none;
    border-radius: 2px;
    margin: 0 10px;
    transition: all 0.1s ease;
    border: 2px solid #4a4a4a;
    font-weight: bold;
    box-shadow: 3px 3px 0px #4a4a4a;
}

.page-button:hover {
    background-color: #e8e4d9;
    box-shadow: 1px 1px 0px #4a4a4a;
    transform: translate(2px, 2px);
}

.page-button:active {
    box-shadow: 0px 0px 0px #4a4a4a;
    transform: translate(3px, 3px);
}

.page-info {
    font-weight: 500;
    color: #555;
}

@media (max-width: 768px) {
    body {
        -webkit-text-size-adjust: 100%;
    }

    .main-wrapper {
        flex-direction: column;
        width: 100%;
        margin: 0;
        gap: 0;
    }

    header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        position: static;
    }

    nav {
        position: static;
        width: auto;
        border-radius: 0;
        border-left: none;
        border-right: none;
        padding: 0;
    }
    
    nav ul {
        display: flex;
        overflow-x: auto;
        padding: 8px;
        scrollbar-width: thin;
    }

    nav ul li {
        flex-shrink: 0;
    }

    nav a {
        border-bottom: none;
        border-radius: 5px;
        padding: 10px 15px;
    }
    
    .content {
        padding: 15px;
    }

    section {
        padding: 15px;
        box-shadow: none;
        margin-bottom: 20px;
        border-radius: 0;
        border-left: none;
        border-right: none;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        background-color: #fafafa;
    }

    h2 {
        margin: -15px -15px 15px -15px;
        border-radius: 0;
    }
    
    .page-toc ul {
        flex-direction: column;
        gap: 12px;
    }

    footer {
        margin-top: 0;
    }
}
