:root {
    --primary-bg: #17d8ee;
    --header-bg: #0E2D3B;
    --footer-bg: #161619;
    --text-main: #333333;
    --text-light: #e0e0e0;
    --text-green: #4e733c;
    --text-dark: #434343;
    --accent-yellow: #ffeb3b;
    --font-ui: 'Rubik', sans-serif;
    --font-text: 'Lexend', sans-serif;
}

@font-face {
    font-family: 'Rubik';
    src: url('./fonts/rubik-v31-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Rubik';
    src: url('./fonts/rubik-v31-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Lexend';
    src: url('./fonts/lexend-v26-latin-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Lexend';
    src: url('./fonts/lexend-v26-latin-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-ui);
    background-color: var(--primary-bg);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
}

main {
    font-family: var(--font-text);
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 60px 20px;
    gap: 20px;
}

header {
    background-color: var(--header-bg);
    color: white;
    padding: 0 32px;
    min-height: 55px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-link img {
    height: 38px;
    width: auto;
    display: block;
    transition: transform 0.2s;
}

.logo-link img:hover {
    transform: scale(1.1);
}

.nav-links {
    display: flex;
    gap: 15px;
}

.nav-links a {
    color: var(--text-light);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 16px;
    padding: 7px 10px;
    transition: 0.3s;
    border-radius: 4px
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.social-icons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-icons a {
    font-size: 22px;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
}

.social-icons a:hover {
    transform: scale(1.2);
}

.fa-youtube {
    color: #FF0000;
}

.fa-discord {
    color: #5865F2;
}

.fa-cloud {
    color: #0085ff;
}

.fa-instagram {
    color: #ffa500;
}

.fa-tiktok {
    color: #000000;
    filter: drop-shadow(0px 0px 1px #ffffff);
}

.fa-envelope {
    color: #ffeb36;
}

footer {
    background-color: var(--footer-bg);
    color: #cfd8dc;
    padding: 10px 20px;
    font-size: 0.8rem;
    margin-top: auto;
    border-top: 2px solid #1f2d3d;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.footer-left {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.3;
    text-align: left;
}

.footer-left p {
    margin: 0;
}

.disclaimer {
    color: var(--accent-yellow);
    font-weight: bold;
    font-size: 0.75rem;
}

.footer-right {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-right a {
    color: #80cbc4;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.8rem;
    text-transform: uppercase;
    transition: opacity 0.2s;
}

.footer-right a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.content-wrapper {
    display: flex;
    max-width: 1800px;
    width: 100%;
    gap: 200px;
    align-items: flex-start;
    padding: 0 20px;
    margin: 0 auto;
    justify-content: center;
}

.hero-column {
    flex: 1;
    text-align: center;
    padding-top: 20px;
    padding-right: 20px;
}

.info-column {
    flex: 0 0 700px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.server-title {
    color: #000000;
    font-family: var(--font-ui);
    font-size: 48px;
    text-shadow: none;
    white-space: normal;
}

.server-title br {
    display: none;
}

.subtitle {
    color: var(--text-green);
    font-family: var(--font-text);
    font-size: 20px;
    font-style: italic;
    font-weight: 700;
    margin: -15px 0 20px 0;
}

.server-description-text {
    color: var(--text-green);
    font-family: var(--font-text);
    font-size: 20px;
    line-height: 1.6;
}

.editions-grid {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    gap: 50px;
    margin-top: 30px;
}

.edition-column {
    flex: 1;
    max-width: 350px;
}

.edition-title {
    color: var(--text-dark);
    font-family: var(--font-ui);
    font-size: 24px;
    margin-bottom: 15px;
}

.info-row,
.ip-line {
    color: var(--text-green);
    font-family: var(--font-text);
    font-size: 20px;
    margin: 8px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.bedrock-text {
    color: var(--text-green);
    font-family: var(--font-text);
    font-size: 20px;
    line-height: 1.5;
    margin-top: 8px;
}

.ip-clickable {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity 0.2s;
}

.ip-clickable:hover {
    opacity: 0.7;
}

#ip-text,
.ip-clickable i {
    color: var(--text-dark);
    font-weight: 700;
}

.info-card {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 35px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.116);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    min-height: 220px;
    max-height: 475px;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
    position: relative;
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.35);
}

.card-content {
    flex: 1;
    overflow: hidden;
}

.info-card.has-overflow .card-content {
    -webkit-mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 50%, transparent 100%);
}

.info-card.has-overflow::after {
    content: "Click to learn more";
    position: absolute;
    bottom: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    font-family: var(--font-ui);
    font-weight: 700;
    color: var(--text-dark);
    font-size: 18px;
    pointer-events: none;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.card-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
    text-transform: uppercase;
    font-family: var(--font-ui);
}

.date {
    background: var(--header-bg);
    color: var(--primary-bg);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
}

#activity-dynamic-title,
#last-update-title,
#last-news-title {
    color: #000000 !important;
    font-size: 32px;
    font-weight: 800;
    text-transform: uppercase;
    font-family: var(--font-ui);
    text-align: center;
}

#activity-dynamic-title {
    margin: 0;
    text-shadow: none;
}

#last-update-title,
#last-news-title {
    margin: 10px 0 20px 0;
}

#last-update-desc,
#last-news-text {
    color: var(--text-green) !important;
    font-size: 20px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
}

#last-update-desc .highlight,
#last-news-text .highlight {
    color: var(--accent-yellow) !important;
    font-weight: bold;
}

.text-page-container {
    max-width: 1400px;
    width: 95%;
    background: transparent;
    padding: 0 10px;
    margin: 0 auto;
}

.page-main-title,
.text-page-container h1 {
    display: block;
    width: 100%;
    text-align: center !important;
    font-family: var(--font-ui);
    font-size: 40px;
    color: var(--text-dark);
    margin: 0 0 40px 0;
    text-transform: uppercase;
    font-weight: 700;
}

.text-page-container a:not(.blog-card) {
    color: var(--header-bg) !important;
    font-weight: 700;
    text-decoration: none !important;
    position: relative;
    padding: 0 2px;
    transition: color 0.3s ease;
    font-family: inherit;
}

.text-page-container a:not(.blog-card)::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--header-bg);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-page-container a:not(.blog-card):hover {
    color: #000;
}

.text-page-container a:not(.blog-card):hover::after {
    transform: scaleX(1);
    background-color: #000;
}

.rules-section h2,
.mode-title,
.section-header {
    font-family: var(--font-ui);
    color: var(--text-dark);
    font-size: 24px;
    font-weight: 700;
    margin: 30px 0 10px 0;
    display: block;
    text-align: left;
}

.section-subtitle {
    display: block;
    color: var(--text-green) !important;
    font-weight: 700 !important;
    font-family: var(--font-text);
    font-size: 15px !important;
    font-style: italic;
    margin-bottom: 20px;
    margin-top: -5px;
}

.text-page-container p,
.rules-list li,
.rules-intro p,
.rules-footer-info p,
.q-line,
.a-line,
.update-desc,
.update-list li {
    color: var(--text-green) !important;
    font-family: var(--font-text);
    font-size: 20px;
    line-height: 1.6;
    margin-bottom: 15px;
}

.rules-list {
    list-style: none;
    padding-left: 0;
    text-align: left;
}

.rules-list li {
    margin-bottom: 8px !important;
    line-height: 1.25 !important;
}

.rules-list li br {
    display: block;
    content: "";
    margin-top: 4px;
}

.rule-id,
strong {
    color: var(--text-dark);
    font-weight: 700;
    margin-right: 5px;
}

.note-text {
    font-style: italic;
    color: #666 !important;
    margin-top: 5px;
    font-size: 18px !important;
}

.rules-intro {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 40px auto;
}

.faq-list {
    width: 100%;
    display: block;
    text-align: left;
}

details.faq-item {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(67, 67, 67, 0.15);
}

details.faq-item:last-child {
    border-bottom: none;
    margin-bottom: 50px;
}

summary.faq-question {
    font-family: var(--font-ui);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.2s;
}

summary.faq-question::-webkit-details-marker {
    display: none;
}

summary.faq-question:hover {
    color: #000;
}

.faq-answer {
    margin-top: 15px;
    color: var(--text-green);
    font-family: var(--font-text);
    font-size: 20px;
    line-height: 1.6;
}

summary.faq-question i {
    transition: transform 0.3s ease;
    color: var(--text-dark);
    font-size: 18px;
}

details[open] summary.faq-question i {
    transform: rotate(180deg);
}

.updates-container {
    max-width: 1400px;
    width: 95%;
    margin: 0 auto;
    padding-bottom: 60px;
}

.update-block {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 50px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    text-align: left;
    color: var(--text-green) !important;
    font-family: var(--font-text);
    font-size: 20px;
    line-height: 1.6;
}

.update-title {
    text-align: center;
    font-size: 36px;
    font-weight: 800;
    color: #000000;
    margin-bottom: 10px;
    font-family: var(--font-ui);
    text-shadow: 0px 0px 10px rgba(255, 255, 255, 0.4);
}

.update-date {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: #000;
    margin-bottom: 30px;
    opacity: 0.7;
}

.update-list {
    list-style: none;
    padding-left: 0;
    margin: 10px 0;
}

.update-list li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
}

.update-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 13px;
    width: 6px;
    height: 6px;
    background-color: #00695c;
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(0, 0, 0, 0.1);
}

.version-footer {
    margin-top: 30px;
    font-size: 22px;
    font-weight: 800;
    color: #004d40;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding-top: 20px;
    text-align: right;
}

.version-footer span {
    color: var(--accent-yellow);
    text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.2);
}

#loading-text {
    text-align: center;
    font-size: 24px;
    color: #333;
    margin-top: 50px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    width: 100%;
    margin-top: 20px;
    align-items: stretch;
}

.blog-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-decoration: none;
    height: 100%;
    align-self: stretch;
}

.blog-card:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.blog-card::after {
    display: none;
}

.blog-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-title {
    font-family: var(--font-ui);
    font-size: 28px;
    font-weight: 700;
    color: #000;
    margin: 0 0 8px 0;
}

.blog-date {
    font-size: 14px;
    color: #444;
    font-style: italic;
    margin-bottom: 12px;
}

.blog-desc {
    font-family: var(--font-text);
    font-size: 16px;
    color: var(--text-dark);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    margin-bottom: 15px;
}

.blog-tag {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.tag-default {
    background-color: #80ecff;
}

.tag-news {
    background-color: #247e29;
}

.tag-update {
    background-color: #0043a7;
}

.tag-big-update {
    background-color: #002763;
}

.tag-hotfix {
    background-color: #e25118;
}

.tag-maintenance {
    background-color: #a2a500;
}

.tag-event {
    background-color: #a71cce;
}

@media (max-width: 1300px) {
    .content-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .hero-column {
        width: 100%;
        padding-right: 0;
    }

    .info-column {
        width: 100%;
        max-width: 700px;
        flex: auto;
    }
}

@media (max-width: 900px) {
    header {
        height: auto;
        padding: 15px 0;
        transition: padding 0.3s ease-out;
    }

    body.hide-mobile-socials header {
        padding-bottom: 0px;
    }

    .navbar {
        flex-direction: column;
        gap: 20px;
    }

    .header-left {
        flex-direction: row;
        width: 100%;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 15px;
    }

    .logo-link img {
        height: 40px;
        margin-right: 5px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        width: auto;
        padding: 0;
    }

    .nav-links a {
        font-size: 14px;
        padding: 8px 12px;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 6px;
        margin: 0;
    }

    .social-icons {
        margin-top: 5px;
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
        transition: max-height 0.3s ease-out, opacity 0.3s ease-out, margin 0.3s ease-out, padding 0.3s ease-out;
        max-height: 50px;
        padding-top: 4px;
        padding-bottom: 4px;
        opacity: 1;
        overflow: hidden;
    }

    body.hide-mobile-socials .social-icons {
        max-height: 0;
        opacity: 0;
        margin-top: 0;
        padding-top: 0;
        padding-bottom: 0;
    }

    .footer-content {
        flex-direction: column-reverse;
        gap: 25px;
        text-align: center;
        padding: 30px 20px;
    }

    .footer-right {
        flex-direction: column;
        gap: 15px;
    }

    .content-wrapper {
        padding: 0 15px;
        width: 100%;
        overflow: hidden;
    }

    .server-title {
        font-size: 36px !important;
        white-space: normal;
        line-height: 1.2;
    }

    .server-title br {
        display: block;
    }

    .hero-column {
        max-width: 100%;
    }

    .editions-grid {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .text-page-container h1 {
        font-size: 30px;
    }

    .rules-section h2 {
        font-size: 22px;
    }

    .update-block {
        padding: 25px;
    }

    .update-title {
        font-size: 28px;
    }

    .editions-grid {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
}

@media (max-width: 600px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }

    main {
        padding: 30px 10px;
        gap: 30px;
    }

    .server-title {
        font-size: 30px !important;
    }

    .server-description-text,
    .info-row,
    .ip-line,
    .bedrock-text,
    .text-page-container p,
    .faq-answer,
    .update-desc,
    .update-list li {
        font-size: 16px !important;
    }

    .edition-title {
        font-size: 22px;
    }

    .info-card {
        padding: 25px 20px;
        min-height: 200px;
    }

    .card-header h2 {
        font-size: 1.25rem;
    }

    .info-card.has-overflow::after {
        font-size: 16px;
        bottom: 15px;
    }

    #activity-dynamic-title,
    #last-update-title,
    #last-news-title,
    .update-title {
        font-size: 24px;
    }

    .nav-links a {
        font-size: 13px;
        padding: 6px 10px;
    }

    .content-wrapper {
        gap: 60px;
    }
}

@media (max-width: 480px) {
    .logo-link img {
        height: 44px;
    }

    .social-icons {
        gap: 15px;
    }

    .social-icons a {
        font-size: 20px;
    }

    .footer-content {
        padding: 20px 15px;
    }

    .text-page-container h1,
    .page-main-title {
        font-size: 26px;
    }

    summary.faq-question {
        font-size: 18px;
    }

    .update-block {
        padding: 20px 15px;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .date {
        align-self: flex-start;
    }
}