body {
    margin: 0;
    padding: 0;
    background-color: #000;
    color: white;
    font-family: sans-serif;
}

body.home-page {
    overflow: hidden;
}

#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: relative;
    z-index: 2;
}

.logo {
    max-width: 500px;
    width: 90%;
    animation: fadeInAndFloat 4s ease-in-out infinite alternate;
    -webkit-box-reflect: below 0px -webkit-gradient(linear, left top, left bottom, from(transparent), color-stop(70%, transparent), to(rgba(255, 255, 255, 0.1)));
}

.content {
    text-align: center;
    color: white;
    margin-top: 20px;
}

.content h1 {
    font-size: 2em;
    font-family: sans-serif;
    text-shadow: 0 0 10px #00a9ff;
}

@keyframes fadeInAndFloat {
    0% {
        opacity: 0.8;
        transform: translateY(10px) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateY(-10px) scale(1.02);
    }
    100% {
        opacity: 0.8;
        transform: translateY(10px) scale(1);
    }
}

/* Library Page Styles */
.page-header {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.small-logo {
    width: 150px;
}

.library-container {
    position: relative;
    z-index: 2;
    color: white;
    font-family: sans-serif;
    padding: 0 40px 40px;
}

.library-container h1 {
    text-align: center;
    font-size: 2.5em;
    text-shadow: 0 0 10px #00a9ff;
    margin-bottom: 40px;
}

.search-container {
    margin: 20px 0 40px;
    text-align: center;
}

#tag-search-input {
    width: 100%;
    max-width: 600px;
    padding: 15px 20px;
    font-size: 1.2em;
    color: white;
    background-color: rgba(0, 169, 255, 0.1);
    border: 1px solid #00a9ff;
    border-radius: 5px;
    outline: none;
    transition: all 0.3s ease;
}

#tag-search-input:focus {
    box-shadow: 0 0 15px #00a9ff;
}

.entry-list {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.entry-link {
    text-decoration: none;
    color: inherit;
}

.entry {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(0, 169, 255, 0.1);
    border: 1px solid #00a9ff;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.entry::before {
    content: attr(data-number);
    position: absolute;
    z-index: 0;
    top: -10px;
    right: -20px;
    font-size: 8em;
    font-weight: 900;
    color: rgba(0, 169, 255, 0.15);
    line-height: 1;
}

.entry:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 15px #00a9ff;
}

.entry-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0;
    margin-bottom: 20px;
    border: 3px solid #00a9ff;
    position: relative;
    z-index: 1;
}

.entry-info {
    position: relative;
    z-index: 1;
    width: 100%;
}

.entry-number {
    display: block;
    font-size: 1em;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.entry-name {
    margin: 0;
    font-size: 2em;
    font-weight: bold;
    text-shadow: 0 0 5px #00a9ff;
    margin-bottom: 10px;
}

.entry-categories {
    margin-top: 10px;
}

.entry-categories span {
    display: inline-block;
    margin: 2px;
    padding: 4px 8px;
    font-size: 0.8em;
    border-radius: 3px;
    font-style: italic;
    width: 80px;
    height: 24px;
    line-height: 16px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- Type Colors --- */

/* Blue (Default) */
.entry.type-blue { border-color: #00a9ff; }
.entry.type-blue:hover { box-shadow: 0 0 20px rgba(0, 169, 255, 0.7); }
.entry.type-blue::before { color: rgba(0, 169, 255, 0.15); }
.entry.type-blue .entry-image { border-color: #00a9ff; }
.entry.type-blue .entry-name { text-shadow: 0 0 5px #00a9ff; }
.entry.type-blue .entry-categories span {
    color: rgba(0, 169, 255, 0.7);
    background-color: rgba(0, 169, 255, 0.1);
    width: 80px;
    height: 24px;
    line-height: 16px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Red */
.entry.type-red { border-color: #ff4747; }
.entry.type-red:hover { box-shadow: 0 0 20px rgba(255, 71, 71, 0.7); }
.entry.type-red::before { color: rgba(255, 71, 71, 0.15); }
.entry.type-red .entry-image { border-color: #ff4747; }
.entry.type-red .entry-name { text-shadow: 0 0 5px #ff4747; }
.entry.type-red .entry-categories span {
    color: rgba(255, 71, 71, 0.7);
    background-color: rgba(255, 71, 71, 0.1);
    width: 80px;
    height: 24px;
    line-height: 16px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Green */
.entry.type-green { border-color: #47ff7b; }
.entry.type-green:hover { box-shadow: 0 0 20px rgba(71, 255, 123, 0.7); }
.entry.type-green::before { color: rgba(71, 255, 123, 0.15); }
.entry.type-green .entry-image { border-color: #47ff7b; }
.entry.type-green .entry-name { text-shadow: 0 0 5px #47ff7b; }
.entry.type-green .entry-categories span {
    color: rgba(71, 255, 123, 0.7);
    background-color: rgba(71, 255, 123, 0.1);
    width: 80px;
    height: 24px;
    line-height: 16px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* White */
.entry.type-white { border-color: #ffffff; }
.entry.type-white:hover { box-shadow: 0 0 20px rgba(255, 255, 255, 0.7); }
.entry.type-white::before { color: rgba(255, 255, 255, 0.15); }
.entry.type-white .entry-image { border-color: #ffffff; }
.entry.type-white .entry-name { text-shadow: 0 0 5px #ffffff; }
.entry.type-white .entry-categories span {
    color: rgba(255, 255, 255, 0.9);
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.entry.type-purple { border-color: #a855f7; }
.entry.type-purple:hover { box-shadow: 0 0 20px rgba(168, 85, 247, 0.7); }
.entry.type-purple::before { color: rgba(168, 85, 247, 0.15); }
.entry.type-purple .entry-image { border-color: #a855f7; }
.entry.type-purple .entry-name { text-shadow: 0 0 5px #a855f7; }
.entry.type-purple .entry-categories span {
    color: rgba(168, 85, 247, 0.9);
    background-color: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.entry p {
    margin: 0;
    font-size: 1.5em;
}

/* --- Detail Page --- */

.detail-container {
    padding: 20px 40px;
    position: relative;
    z-index: 2;
}

.detail-card {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    background-color: rgba(0, 0, 0, 0.5);
    border: 1px solid;
    border-radius: 15px;
    padding: 40px;
    overflow: hidden;
}

.detail-background-number {
    position: absolute;
    z-index: 0;
    top: -20px;
    right: -30px;
    font-size: 15em;
    font-weight: 900;
    line-height: 1;
    color: rgba(255, 255, 255, 0.05);
}

.detail-main-content {
    display: flex;
    gap: 40px;
    position: relative;
    z-index: 1;
}

.detail-image {
    width: 300px;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    border: 3px solid;
    flex-shrink: 0;
}

.detail-info {
    flex-grow: 1;
}

.detail-name {
    font-size: 3.5em;
    margin: 0 0 10px;
    font-weight: bold;
}

.detail-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.detail-categories span {
    display: inline-block;
    padding: 4px 10px;
    font-size: 0.9em;
    border-radius: 5px;
}

.detail-description p {
    font-size: 1.1em;
    line-height: 1.8;
    margin: 0 0 1em;
}

.detail-description a {
    font-weight: bold;
    text-decoration: none;
    border-bottom: 1px dotted;
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

.detail-section a {
    font-weight: bold;
    text-decoration: none;
    border-bottom: 1px dotted;
    transition: color 0.2s ease, border-bottom-color 0.2s ease;
}

/* Detail Page Type Colors */
.detail-card.type-blue { border-color: #00a9ff; }
.detail-card.type-blue .detail-background-number { color: rgba(0, 169, 255, 0.1); }
.detail-card.type-blue .detail-image { border-color: #00a9ff; }
.detail-card.type-blue .detail-name { text-shadow: 0 0 10px #00a9ff; }
.detail-card.type-blue .detail-categories span { color: rgba(0, 169, 255, 0.9); background-color: rgba(0, 169, 255, 0.15); }
.detail-card.type-blue .detail-description a,
.detail-card.type-blue .detail-description a:visited { color: #00a9ff; }
.detail-card.type-blue .detail-description a:hover { color: #5bc9ff; }
.detail-card.type-blue .detail-section-title { border-color: rgba(0, 169, 255, 0.3); }
.detail-card.type-blue .detail-history {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: flex-start;
}
.detail-card.type-blue .detail-history p {
    order: 2;
    flex-basis: 300px;
    flex-grow: 1;
    margin: 0 !important; /* Override default p margin */
}
.detail-card.type-blue .detail-history img {
    order: 1;
    max-width: 100%;
    width: 400px;
    border-radius: 5px;
    border: 1px solid;
}
.detail-card.type-blue .detail-sanctions span { color: rgba(0, 169, 255, 0.9); border-color: rgba(0, 169, 255, 0.5); }
.detail-card.type-blue .related-entry:hover { background-color: rgba(0, 169, 255, 0.2); }
.detail-card.type-blue .related-image { border-color: #00a9ff; }

.detail-card.type-red { border-color: #ff4747; }
.detail-card.type-red .detail-background-number { color: rgba(255, 71, 71, 0.1); }
.detail-card.type-red .detail-image { border-color: #ff4747; }
.detail-card.type-red .detail-name { text-shadow: 0 0 10px #ff4747; }
.detail-card.type-red .detail-categories span { color: rgba(255, 71, 71, 0.9); background-color: rgba(255, 71, 71, 0.15); }
.detail-card.type-red .detail-description a,
.detail-card.type-red .detail-description a:visited { color: #ff4747; }
.detail-card.type-red .detail-description a:hover { color: #ff7a7a; }
.detail-card.type-red .detail-section a,
.detail-card.type-red .detail-section a:visited { color: #ff4747; }
.detail-card.type-red .detail-section a:hover { color: #ff7a7a; }
.detail-card.type-red .detail-section-title { border-color: rgba(255, 71, 71, 0.3); }
.detail-card.type-red .detail-history {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: flex-start;
}
.detail-card.type-red .detail-history p {
    order: 2;
    flex-basis: 300px;
    flex-grow: 1;
    margin: 0 !important; /* Override default p margin */
}
.detail-card.type-red .detail-history img {
    order: 1;
    max-width: 100%;
    width: 400px;
    border-radius: 5px;
    border: 1px solid;
}
.detail-card.type-red .detail-sanctions span { color: rgba(255, 71, 71, 0.9); border-color: rgba(255, 71, 71, 0.5); }
.detail-card.type-red .related-entry:hover { background-color: rgba(255, 71, 71, 0.2); }
.detail-card.type-red .related-image { border-color: #ff4747; }

.detail-card.type-green { border-color: #47ff7b; }
.detail-card.type-green .detail-background-number { color: rgba(71, 255, 123, 0.1); }
.detail-card.type-green .detail-image { border-color: #47ff7b; }
.detail-card.type-green .detail-name { text-shadow: 0 0 10px #47ff7b; }
.detail-card.type-green .detail-categories span { color: rgba(71, 255, 123, 0.9); background-color: rgba(71, 255, 123, 0.15); }
.detail-card.type-green .detail-description a,
.detail-card.type-green .detail-description a:visited { color: #47ff7b; }
.detail-card.type-green .detail-description a:hover { color: #85ffaa; }
.detail-card.type-green .detail-section a,
.detail-card.type-green .detail-section a:visited { color: #47ff7b; }
.detail-card.type-green .detail-section a:hover { color: #85ffaa; }
.detail-card.type-green .detail-section-title { border-color: rgba(71, 255, 123, 0.3); }
.detail-card.type-green .detail-history {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: flex-start;
}
.detail-card.type-green .detail-history p {
    order: 2;
    flex-basis: 300px;
    flex-grow: 1;
    margin: 0 !important; /* Override default p margin */
}
.detail-card.type-green .detail-history img {
    order: 1;
    max-width: 100%;
    width: 400px;
    border-radius: 5px;
    border: 1px solid;
}
.detail-card.type-green .detail-sanctions span { color: rgba(71, 255, 123, 0.9); border-color: rgba(71, 255, 123, 0.5); }
.detail-card.type-green .related-entry:hover { background-color: rgba(71, 255, 123, 0.2); }
.detail-card.type-green .related-image { border-color: #47ff7b; }

.detail-card.type-white { border-color: #ffffff; }
.detail-card.type-white .detail-background-number { color: rgba(255, 255, 255, 0.1); }
.detail-card.type-white .detail-image { border-color: #ffffff; }
.detail-card.type-white .detail-name { text-shadow: 0 0 10px #ffffff; }
.detail-card.type-white .detail-categories span { color: rgba(255, 255, 255, 0.9); background-color: rgba(255, 255, 255, 0.15); }
.detail-card.type-white .detail-description a,
.detail-card.type-white .detail-description a:visited { color: #ffffff; }
.detail-card.type-white .detail-description a:hover { color: #dddddd; }
.detail-card.type-white .detail-section a,
.detail-card.type-white .detail-section a:visited { color: #ffffff; }
.detail-card.type-white .detail-section a:hover { color: #dddddd; }
.detail-card.type-white .detail-section-title { border-color: rgba(255, 255, 255, 0.3); }
.detail-card.type-white .detail-history {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: flex-start;
}
.detail-card.type-white .detail-history p {
    order: 2;
    flex-basis: 300px;
    flex-grow: 1;
    margin: 0 !important; /* Override default p margin */
}
.detail-card.type-white .detail-history img {
    order: 1;
    max-width: 100%;
    width: 400px;
    border-radius: 5px;
    border: 1px solid;
}
.detail-card.type-white .detail-sanctions span { color: rgba(255, 255, 255, 0.9); border-color: rgba(255, 255, 255, 0.5); }
.detail-card.type-white .related-entry:hover { background-color: rgba(255, 255, 255, 0.2); }
.detail-card.type-white .related-image { border-color: #ffffff; }

.detail-card.type-purple { border-color: #a855f7; }
.detail-card.type-purple .detail-background-number { color: rgba(168, 85, 247, 0.1); }
.detail-card.type-purple .detail-image { border-color: #a855f7; }
.detail-card.type-purple .detail-name { text-shadow: 0 0 10px #a855f7; }
.detail-card.type-purple .detail-categories span { color: rgba(168, 85, 247, 0.9); background-color: rgba(168, 85, 247, 0.15); }
.detail-card.type-purple .detail-description a,
.detail-card.type-purple .detail-description a:visited { color: #a855f7; }
.detail-card.type-purple .detail-description a:hover { color: #c084fc; }
.detail-card.type-purple .detail-section a,
.detail-card.type-purple .detail-section a:visited { color: #a855f7; }
.detail-card.type-purple .detail-section a:hover { color: #c084fc; }
.detail-card.type-purple .detail-section-title { border-color: rgba(168, 85, 247, 0.3); }
.detail-card.type-purple .detail-history {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    align-items: flex-start;
}
.detail-card.type-purple .detail-history p {
    order: 2;
    flex-basis: 300px;
    flex-grow: 1;
    margin: 0 !important; /* Override default p margin */
}
.detail-card.type-purple .detail-history img {
    order: 1;
    max-width: 100%;
    width: 400px;
    border-radius: 5px;
    border: 1px solid;
}
.detail-card.type-purple .detail-sanctions span { color: rgba(168, 85, 247, 0.9); border-color: rgba(168, 85, 247, 0.5); }
.detail-card.type-purple .related-entry:hover { background-color: rgba(168, 85, 247, 0.2); }
.detail-card.type-purple .related-image { border-color: #a855f7; }

.entry p {
    margin: 0;
    font-size: 1.5em;
}

/* --- Detail Page Sections --- */
.detail-section {
    margin-top: 40px;
}

.detail-section-title {
    font-size: 1.8em;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid;
    font-weight: normal;
}

.detail-history p {
    font-size: 1.1em;
    line-height: 1.8;
    margin: 0 0 1em;
}

.detail-sanctions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-sanctions span {
    display: inline-block;
    padding: 5px 12px;
    font-size: 1em;
    border-radius: 5px;
    font-style: italic;
    border: 1px dashed;
}

.detail-related {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.related-group-title {
    font-size: 1.2em;
    margin: 0 0 15px;
    padding-left: 10px;
    border-left: 3px solid;
    font-weight: normal;
}

.related-group-entries {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.related-entry {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    text-decoration: none;
    color: inherit;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px 10px;
    transition: background-color 0.2s ease;
}

.related-entry:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.related-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 2px solid;
}

.related-name {
    font-size: 1em;
    font-weight: bold;
}

.related-entry p {
    font-size: 0.9em;
    font-style: italic;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 8px;
    padding: 0;
}

/* --- Responsive Layout for Mobile --- */

@media (max-width: 768px) {
    /* --- Library Page --- */
    .library-container {
        padding: 0 20px 20px;
    }

    .entry-list {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* --- Detail Page --- */
    .detail-container {
        padding: 10px 15px;
    }

    .detail-card {
        padding: 20px;
    }

    .detail-main-content {
        flex-direction: column;
        gap: 25px;
    }

    .detail-image {
        width: 100%;
        height: auto;
        max-width: 350px;
        align-self: center;
    }

    .detail-name {
        font-size: 2.5em;
        text-align: center;
    }

    .detail-background-number {
        font-size: 10em;
        top: 0;
        right: -15px;
    }

    .detail-history {
        flex-direction: column;
    }
    
    .detail-history img {
        width: 100%;
    }
} 