@import url('https://fonts.cdnfonts.com/css/minecraft-4');

* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    height: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(135deg, #0f0f0f, #1b1b1b);
    font-family: 'Minecraft', sans-serif;
    color: white;
    text-align: center;
    animation: fadeIn 0.4s ease-in;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.page-content {
    flex: 1 0 auto;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    padding-bottom: 40px;
}

nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    padding: 15px 0;
    background: #111;
    box-shadow: 0 0 10px #000;
    width: 100%;
    position: relative;
    z-index: 100;
}

nav a {
    color: #ffcc00;
    font-weight: bold;
    text-decoration: none;
    font-size: 20px;
    padding: 6px 12px;
    position: relative;
    transition: color 0.2s ease, text-shadow 0.2s ease, transform 0.15s ease;
}

nav a:hover {
    color: #ffffff;
    text-shadow: 0 0 6px #f1c40f;
    transform: translateY(-2px);
}

nav a.active {
    color: #55ff55;
    text-shadow: 0 0 8px #55ff55;
}

nav a.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background: #55ff55;
    box-shadow: 0 0 6px #55ff55;
}

h1 {
    margin-top: 80px;
    font-size: 60px;
    color: #FFD700;
    text-shadow: 3px 3px 0 #000;
}

.logo-title {
    display: inline-block;
    position: relative;
    animation: logoGlitch 2.5s steps(2, end) infinite;
}

.updates-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    width: 90%;
    max-width: 1600px;
    margin: 40px auto;
}

.update-card {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 10px #000;
    transition: transform 0.15s ease;
}

.update-card:hover {
    transform: scale(1.03);
}

.update-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.update-image::before,
.update-image::after {
    content: "";
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.update-image::before {
    clip-path: inset(0 0 50% 0);
}

.update-image::after {
    clip-path: inset(50% 0 0 0);
    filter: blur(8px);
    opacity: 0.6;
}

.update-title {
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 22px;
    color: #fff;
    text-shadow: 2px 2px 0 #000;
    font-family: 'Minecraft', sans-serif;
    z-index: 10;
}

.update-form {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.update-form input,
.update-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 2px solid #000;
}

.btn-create {
    display: inline-block;
    background: #1ecf1e;
    color: #111;
    padding: 14px 32px;
    font-size: 20px;
    border-radius: 10px;
    border: 2px solid #000;
    box-shadow: 0 0 8px #000;
    cursor: pointer;
    transition: transform 0.12s ease;
}

.btn-create:hover {
    transform: scale(1.03);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9000;
}

.modal-backdrop.active {
    display: flex;
}

.modal {
    background: #111;
    border: 2px solid #333;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px #000;
    max-width: 480px;
    width: 90%;
    text-align: left;
}

.modal-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.modal-header img {
    width: 64px;
    height: 64px;
    margin-right: 15px;
    image-rendering: pixelated;
    border-radius: 4px;
}

.modal-title {
    font-size: 22px;
    margin: 0;
}

.modal-body {
    font-size: 16px;
    color: #ddd;
    margin-bottom: 20px;
    white-space: pre-line;
}

.modal-body input,
.modal-body textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 6px;
    border: 2px solid #000;
    background: #222;
    color: #fff;
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-actions .btn {
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 6px;
    border: 2px solid #000;
    background: #7ff7ff;
    color: #111;
    cursor: pointer;
    box-shadow: 0 0 6px #000;
}

.modal-actions .btn-delete {
    background: #823e3e;
    color: #fff;
}

.modal-close {
    display: inline-block;
    padding: 10px 20px;
    background: #aa0000;
    color: white;
    border-radius: 6px;
    cursor: pointer;
    text-align: center;
    width: 100%;
}

footer {
    flex-shrink: 0;
    padding: 20px 0;
    color: #777;
    font-size: 14px;
    width: 100%;
}

.loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.2s;
}

.loader-overlay.active {
    visibility: visible;
    opacity: 1;
}

.loader-spinner {
    width: 80px;
    height: 80px;
    border: 6px solid #333;
    border-top: 6px solid #FFD700;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

canvas#particles {
    position: fixed;
    top: 0;
    left: 0;
    z-index: -1;
}

body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: #111;
}

body::-webkit-scrollbar-thumb {
    background: #FFD700;
    border-radius: 6px;
    border: 2px solid #000;
}

body::-webkit-scrollbar-thumb:hover {
    background: #ffcc00;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px auto;
}

.btn {
    display: inline-block;
    padding: 14px 28px;
    font-size: 20px;
    border-radius: 8px;
    border: 2px solid #000;
    box-shadow: 0 0 8px #000;
    text-decoration: none;
    font-family: 'Minecraft', sans-serif;
    color: #111;
    cursor: pointer;
}

.btn.vote {
    background: #55ff55;
}

.btn.store {
    background: #ffaa00;
}

.btn.unknown {
    background: #ff0000;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes logoGlitch {
    0% { text-shadow: 2px 0 #ff0000, -2px 0 #00ffff; }
    7% { text-shadow: -3px 0 #00ffff, 3px 0 #ff0000; }
    9% { text-shadow: 4px 0 #ff00ff, -4px 0 #00ffea; }
    12% { text-shadow: 1px 0 #ff0000, -1px 0 #00ffff; }
    20% { text-shadow: 3px 0 #00ffff, -3px 0 #ff0000; }
    22% { text-shadow: -4px 0 #ff00ff, 4px 0 #00ffea; }
    25% { text-shadow: 2px 0 #ff0000, -2px 0 #00ffff; }
    60% { text-shadow: 2px 0 #ff0000, -2px 0 #00ffff; }
    62% { text-shadow: -3px 0 #00ffff, 3px 0 #ff0000; }
    65% { text-shadow: 4px 0 #ff00ff, -4px 0 #00ffea; }
    68% { text-shadow: 1px 0 #ff0000, -1px 0 #00ffff; }
    100% { text-shadow: 2px 0 #ff0000, -2px 0 #00ffff; }
}

@media (max-width: 600px) {
    h1 {
        font-size: 40px;
        margin-top: 50px;
    }

    nav a {
        margin: 0 10px;
        font-size: 16px;
    }
}
