* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

body {
    background-color: #050505;
    color: #c0c0c0;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    line-height: 1.8;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
}

.intro-black-fade {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background-color: #000000;
    pointer-events: none;
    animation: blackFadeOut 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards;
}

@keyframes blackFadeOut {
    0% {
        opacity: 1;
        visibility: visible;
    }

    99% {
        opacity: 0;
        visibility: visible;
    }

    100% {
        opacity: 0;
        visibility: hidden;
    }
}

.mirror-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: url('/worlds/resources/background/mirror-world/library.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.03);
    transition: transform 0.1s ease-out;
}

.wiki-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    z-index: 10;
    opacity: 0;
    animation: fadeIn 1s ease 1.2s forwards;
}

.wiki-panel,
.sidebar-panel,
.search-bar,
.quick-btn,
.header-action-btn,
.back-link {
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.wiki-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 2rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.back-link {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: all 0.3s ease;
    background-color: rgba(10, 10, 12, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.back-link:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(10, 10, 12, 0.8);
}

.wiki-logo {
    font-size: 1.4rem;
    font-weight: 300;
    color: #fff;
    letter-spacing: 0.1em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
}

.header-center {
    flex: 1;
    max-width: 500px;
}

.search-bar {
    display: flex;
    width: 100%;
    background-color: rgba(15, 15, 20, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    overflow: hidden;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

.search-bar input {
    flex: 1;
    padding: 0.6rem 1rem;
    background: transparent;
    border: none;
    color: #eee;
    font-size: 0.95rem;
    outline: none;
    font-family: inherit;
}

.search-bar input::placeholder {
    color: #777;
}

.search-bar button {
    padding: 0 1.2rem;
    background-color: rgba(255, 255, 255, 0.08);
    border: none;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s;
    font-family: inherit;
}

.search-bar button:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.header-right {
    display: flex;
    gap: 0.8rem;
    flex-shrink: 0;
}

.header-action-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #aaa;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.header-action-btn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    background-color: rgba(255, 255, 255, 0.1);
}

.quick-links {
    display: flex;
    gap: 1rem;
    padding: 1.5rem 0;
    flex-wrap: wrap;
}

.quick-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background-color: rgba(15, 15, 20, 0.75);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.quick-btn.is-notice {
    border-color: rgba(200, 170, 120, 0.45);
    color: #e6d7bd;
}

.quick-btn.is-notice:hover {
    border-color: rgba(220, 190, 140, 0.85);
    background-color: rgba(210, 180, 130, 0.16);
    color: #fff;
}

.quick-btn.is-active {
    background-color: rgba(120, 175, 255, 0.14);
    border-color: rgba(120, 175, 255, 0.6);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(120, 175, 255, 0.16);
    cursor: default;
    pointer-events: none;
    user-select: none;
}

.wiki-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    padding-bottom: 3rem;
}

.wiki-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.wiki-panel {
    background-color: rgba(12, 12, 16, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.panel-title::before {
    content: '';
    display: block;
    width: 4px;
    height: 1.2rem;
    background-color: #888;
    border-radius: 2px;
}

.panel-more {
    color: #777;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.panel-more:hover {
    color: #ccc;
}

.panel-content {
    padding: 1.5rem;
}

.featured-article {
    display: flex;
    gap: 1.5rem;
}

.featured-image {
    width: 200px;
    height: 130px;
    background-color: #111;
    background-image: url('/worlds/resources/background/mirror-world/library.png');
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.img-birthday {
    background-image: url('/worlds/resources/background/mirror-world/birthday.png');
}

.featured-text {
    flex: 1;
}

.featured-text h3 {
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 0.5rem;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.status-tag {
    font-size: 0.75rem;
    padding: 0.1rem 0.5rem;
    border-radius: 4px;
    font-weight: normal;
    letter-spacing: 0.05em;
}

.status-active {
    background-color: rgba(76, 175, 80, 0.2);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.status-upcoming {
    background-color: rgba(255, 152, 0, 0.2);
    color: #ffb74d;
    border: 1px solid rgba(255, 152, 0, 0.4);
}

.status-ended {
    background-color: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
    border: 1px solid rgba(158, 158, 158, 0.4);
}

.featured-text h3.welcome-title {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: block;
}

.featured-text p {
    color: #bbb;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 0.8rem;
    text-align: justify;
}

.read-more-btn {
    display: inline-block;
    padding: 0.3rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: #ccc;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.read-more-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.news-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.news-item {
    display: flex;
    gap: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.news-date {
    color: #777;
    font-size: 0.85rem;
    flex-shrink: 0;
    width: 70px;
}

.news-title {
    color: #ccc;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s;
}

.news-title:hover {
    color: #fff;
    text-decoration: underline;
}

.wiki-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-panel {
    background-color: rgba(12, 12, 16, 0.85);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.sidebar-header {
    padding: 0.8rem 1rem;
    background-color: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
    color: #bbb;
    font-weight: 500;
}

.sidebar-content {
    padding: 1rem;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.info-table td {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: top;
}

.info-table td:first-child {
    color: #777;
    width: 70px;
    flex-shrink: 0;
}

.info-table td:last-child {
    color: #ccc;
}

.info-table tr:last-child td {
    border-bottom: none;
}

.wiki-footer {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.8rem;
    color: #555;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@media (max-width: 1100px) {
    .wiki-body {
        grid-template-columns: 1fr;
    }

    .wiki-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .wiki-wrapper {
        padding: 0 1rem;
    }

    .wiki-header {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .header-center {
        order: 3;
        max-width: 100%;
        flex-basis: 100%;
    }

    .quick-links {
        gap: 0.5rem;
    }

    .quick-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }

    .featured-article {
        flex-direction: column;
    }

    .featured-image {
        width: 100%;
        height: 180px;
    }

    .wiki-sidebar {
        grid-template-columns: 1fr;
    }
}