/* --- Global Styles --- */
body {
    background-color: #0a0a0a;
    color: #e0e0e0;
    font-family: 'Sarabun', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Scanline Effect */
body::after {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 2;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}

/* --- Typography --- */
h1,
h2,
h3,
.section-header {
    font-family: 'Share Tech Mono', monospace;
    text-transform: uppercase;
}

/* --- Header --- */
header {
    text-align: center;
    padding: 40px 0;
    border-bottom: 2px solid #ffc107;
    background: rgba(0, 0, 0, 0.5);
}

header h1 {
    color: #ffc107;
    margin: 0;
    font-size: 3em;
    letter-spacing: 5px;
    text-shadow: 0 0 10px rgba(255, 193, 7, 0.5);
}

.subtitle {
    color: #888;
    font-style: italic;
    margin-top: 5px;
}

/* --- Navigation Menu --- */
.menu-nav {
    background: rgba(0, 0, 0, 0.7);
    border-bottom: 1px solid #333;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(10px);
}

.menu-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    padding: 0 20px;
}

.menu-btn {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1), rgba(255, 193, 7, 0.05));
    border: 1px solid #ffc107;
    color: #ffc107;
    padding: 12px 20px;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.9em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.menu-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 193, 7, 0.3), transparent);
    transition: left 0.5s ease;
}

.menu-btn:hover::before {
    left: 100%;
}

.menu-btn:hover {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2), rgba(255, 193, 7, 0.1));
    border-color: #ffd54f;
    color: #ffd54f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.3);
}

.menu-btn.active {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.3), rgba(255, 193, 7, 0.2));
    border-color: #ffc107;
    color: #fff;
    box-shadow: 0 0 20px rgba(255, 193, 7, 0.5);
}

.menu-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(255, 193, 7, 0.2);
}

.btn-icon {
    font-size: 1.2em;
}

.btn-text {
    font-weight: bold;
}

/* Animation for buttons on load */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-btn {
    animation: slideIn 0.5s ease forwards;
}

.menu-btn:nth-child(1) {
    animation-delay: 0.1s;
}

.menu-btn:nth-child(2) {
    animation-delay: 0.2s;
}

.menu-btn:nth-child(3) {
    animation-delay: 0.3s;
}

.menu-btn:nth-child(4) {
    animation-delay: 0.4s;
}

.menu-btn:nth-child(5) {
    animation-delay: 0.5s;
}

/* --- Content Section Management --- */
.content-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.content-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Main Container --- */
.archive-container {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px;
    position: relative;
    z-index: 1;
}

/* --- Main Section Styles --- */
.intro-box {
    background: rgba(255, 193, 7, 0.05);
    border-left: 3px solid #ffc107;
    padding: 20px;
    margin: 25px 0;
}

.intro-box h3 {
    color: #ffc107;
    margin-top: 0;
    font-size: 1.3em;
}

.intro-box p {
    line-height: 1.6;
    font-size: 1.05em;
}

.feature-list {
    list-style: none;
    padding-left: 0;
}

.feature-list li {
    padding: 10px 0;
    border-bottom: 1px dashed #333;
    line-height: 1.6;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list strong {
    color: #ffc107;
}

.warning-box {
    background: rgba(255, 87, 34, 0.1);
    border: 1px solid #ff5722;
    padding: 15px;
    margin: 25px 0;
    border-radius: 4px;
}

.warning-box p {
    margin: 0;
    color: #ff8a65;
}

/* --- Lore Section --- */
.lore-section p {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.flavor {
    font-style: italic;
    color: #aaa;
    border-left: 3px solid #ffc107;
    padding-left: 15px;
    background: rgba(255, 193, 7, 0.05);
    padding: 15px;
    margin: 20px 0;
}

.section-header {
    background-color: #ffc107;
    color: #000;
    display: inline-block;
    padding: 5px 10px;
    font-size: 0.9em;
    font-weight: bold;
    margin-bottom: 15px;
}

/* --- Grid Layout for Associations --- */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* --- Data Cards --- */
.data-card {
    border: 1px solid #444;
    background-color: rgba(20, 20, 20, 0.8);
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.data-card:hover {
    border-color: #ffc107;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.2);
}

.data-card h3 {
    color: #ffc107;
    margin-top: 0;
    border-bottom: 1px dashed #555;
    padding-bottom: 10px;
}

.tag {
    display: inline-block;
    background-color: #333;
    color: #fff;
    font-size: 0.8em;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-family: 'Share Tech Mono', monospace;
}

.data-card p {
    font-size: 0.95em;
    color: #ccc;
}

hr {
    border: 0;
    border-top: 1px solid #333;
    margin: 50px 0;
}

/* --- Wing Section Styles --- */
.section-title {
    color: #ffc107;
    font-size: 1.5em;
    margin: 40px 0 10px 0;
    border-bottom: 2px solid #ffc107;
    padding-bottom: 10px;
}

.section-desc {
    color: #aaa;
    font-size: 0.95em;
    margin-bottom: 30px;
    font-style: italic;
}

.wing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.wing-card {
    border: 1px solid #444;
    background: rgba(20, 20, 20, 0.8);
    transition: all 0.3s ease;
    overflow: hidden;
}

.wing-card.former {
    border-color: #666;
    opacity: 0.8;
}

.wing-card:hover {
    border-color: #ffc107;
    box-shadow: 0 0 15px rgba(255, 193, 7, 0.2);
}

.wing-header {
    padding: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 193, 7, 0.05);
    position: relative;
    user-select: none;
}

.wing-header:hover {
    background: rgba(255, 193, 7, 0.1);
}

.wing-header h3 {
    color: #ffc107;
    margin: 0;
    font-size: 1.3em;
    flex: 1;
}

.wing-letter {
    font-size: 2.5em;
    font-weight: bold;
    color: rgba(255, 193, 7, 0.3);
    font-family: 'Share Tech Mono', monospace;
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.expand-icon {
    color: #ffc107;
    font-size: 1.2em;
    transition: transform 0.3s ease;
    min-width: 30px;
    text-align: center;
}

.wing-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 20px;
    background: rgba(10, 10, 10, 0.5);
}

.wing-card.active .wing-content {
    max-height: 500px;
    padding: 20px;
}

.wing-content p {
    margin: 10px 0;
    color: #ccc;
    line-height: 1.6;
}

.wing-content p strong {
    color: #ffc107;
    font-family: 'Share Tech Mono', monospace;
}

.wing-desc {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #444;
    color: #aaa !important;
    font-style: italic;
}

/* Former Wing specific styles */
.wing-card.former .wing-header {
    background: rgba(100, 100, 100, 0.1);
}

.wing-card.former .wing-header h3 {
    color: #888;
}

.wing-card.former .wing-letter {
    color: rgba(136, 136, 136, 0.3);
}

/* Animation for wing cards */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wing-card {
    animation: slideDown 0.3s ease;
}