:root {
    --background-color: #0d0d0d;
    --text-color: #f0f0f0;
    --headers: #1a1a1a;
    --sec-header: #2b2b2b;
    --accent: #ff6600;
    --accent-hover: #ff8533;
    --border-color: #3a3a3a;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-size: 17px;
    text-align: left;
    margin: 0;
    padding: 0;
    font-family: sans-serif;
}

a, .menu a {
    text-decoration: none;
    color: var(--accent);
    transition: color 0.3s ease, background-color 0.3s ease;
}

a:hover,
.menu a:hover,
.links a:hover {
    color: #fff;
    background-color: var(--accent);
}

header {
    background-color: var(--headers);
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.head {
    width: 100%;
    max-width: 1500px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px;
}

.logotype a { 
    display: block; 
    width: 200px; 
    height: 45px; 
    background: url(/icon/logo_1.webp) no-repeat left;
    background-size: contain; 
}

.menu-wrapper {
    display: flex;
    align-items: center;
}

.menu {
    margin-right: 5px;
    display: flex;
}

.menu a {
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.toggle-button {
    width: 100%;
    padding: 10px;
    background-color: var(--headers);
    color: var(--text-color);
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 17px;
    background: url(/icon/down.png) no-repeat right;
}

.toggle-button:hover {
    color: #ffffff;
    transition: color 0.3s ease, background-color 0.3s ease;
    background: url(/icon/down.png) no-repeat right;
}

.toggle-button.open {
    background: url(/icon/top.png) no-repeat right;
    background-color: var(--headers);
}

.ancor_list {
    width: 250px;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    position: relative;
    scroll-behavior: smooth;
    background: var(--headers);
    padding: 15px;
}

.column {
    position: relative;
    display: block;
    width: 100%;
}

.links {
    list-style: none;
    padding: 10px;
    background-color: var(--sec-header);
    border-bottom: 1px solid var(--headers);
    margin-top: 5px;
    width: 95%;
    position: static;
    left: 0;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    white-space: nowrap;
}

.links a {
    padding: 8px 5px;
    display: block;
    color: var(--text-color);
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid var(--headers);
}

.mobile-menu-button {
    display: none;
    padding: 16px;
    border: none;
    cursor: pointer;
    text-align: center;
    background: url(/icon/openmenu.svg) no-repeat center;
}

.mobile-menu-button.open {
    background: url(/icon/closemenu.svg) no-repeat center;
}

h1 {
    display: inline-block;
    font-size: 19px;
    margin: 5px;
    padding: 5px;
}

.h1-top-bar {
    box-shadow: 0 7px 20px -10px rgba(0, 0, 0, 1);
    margin: 10px 0;
    background-color: var(--sec-header);
}

main {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 10px;
}

.mobile-menu-button {
    display: none;    
}

h2 {
    font-size: 18px;
    margin: 5px;
    padding: 3px 6px;
    text-align: center;
}

.menu a, .links a, .toggle-button {
    transition: all 0.3s ease;
}

footer,
header {
    border-top: 1px solid var(--border-color);
}

.category-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px;
    justify-content: center;
}

.tag-link {
    background: var(--headers);
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px;
    min-width: 200px;
    max-width: 300px;
    flex: 1;
    text-align: left;
}

.tag-link .title-bar {
    font-size: 18px;
    font-weight: bold;
    text-transform: uppercase;
    background: var(--sec-header);
    color: white;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.tag-link ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tag-link ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--sec-header);
}

.tag-link ul li:last-child {
    border-bottom: none;
}

.tag-link ul li a {
    text-decoration: none;
    color: #ffffff;
    font-size: 16px;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 2px;
}

footer {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background-color: var(--headers);
    width: 100%;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.4);
    padding: 8px 0;
    margin-top: 8px;
}

footer a {
    text-decoration: underline;
}

@media (min-width: 1024px) {
    .links {
        display: block !important;
    }
}

@media (max-width: 768px) {
    .menu-wrapper {
        display: none;
    }
    
    .mobile-menu-button {
        display: block;
        margin: 0 12px;
    }
    
    .ancor_list {
        display: none;
        flex-direction: column;
        gap: 0;
        width: 88%;
        background-color: var(--headers);
        position: absolute;
        top: 60px;
        z-index: 5;
    }

    .ancor_list.open {
        display: flex;
    }

    .column {
        width: 100%;
    }

    .toggle-button {
        text-align: left;
        border-bottom: 1px solid var(--sec-header);
    }

    .links {
        width: 95%;
        position: static;
        display: flex;
        flex-wrap: wrap;
        gap: 4%;
        max-height: 450px;
        overflow-y: auto;
    }
    
    .links li {
        padding: 4px;
    }
    .category-list {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    
    .tag-link {
        width: 100%;
    }
}