.main {
    margin: auto;
    margin-top: 10px;
    background-color: transparent;
    
    width: 1480px;
    min-height: 700px;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
    font-size: 16px; 
}


.content-layout {
    
    width: 1440px;
    margin: auto;
    display: flex;
    gap: 12px;
    box-sizing: border-box;
    align-items: flex-start; 
}

.rulesbox {
    
    flex: 0 0 260px;
    background-color: rgba(8, 3, 18, 0.92);
    color: var(--white);
    padding: 12px;
    box-sizing: border-box;
    border: 3px double var(--blue);
    font-family: var(--font-mono);
    font-size: 14px;
    text-shadow: 0 0 10px rgba(76, 29, 149, 0.35);
    position: relative;
    overflow: hidden;
    z-index: 4; 
}

.gallerybox {
    flex: 0 0 300px;
    background-color: rgba(8, 3, 18, 0.92);
    color: var(--white);
    padding: 12px;
    box-sizing: border-box;
    border: 3px double var(--blue);
    font-family: var(--font-mono);
    font-size: 14px;
    text-shadow: 0 0 10px rgba(76, 29, 149, 0.35);
    position: relative;
    overflow: hidden;
    z-index: 4;
    min-height: 520px;
}

.gallerybox-inner {
    overflow: hidden;
}

.gallery-preview {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 720px;
    overflow: auto;
    scroll-behavior: smooth;
    padding-top: 8px;
}

.gallery-thumb {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(5,1,15,0.6);
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 10px;
    padding: 10px;
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 220px; 
    overflow: visible;
}

.gallery-thumb img {
    max-width: 100%;
    max-height: 200px; 
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    border-radius: 8px;
    margin: 0 auto;
    background: rgba(0,0,0,0.18);
}

.gallery-thumb figcaption {
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(248,250,252,0.9);
    margin-top: 6px;
    text-align: center;
    width: 100%;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.gallery-meta {
    font-family: var(--font-mono);
    font-size: 12px;
    color: rgba(248,250,252,0.95);
    text-align: center;
}


.gallery-figure {
    display: block;
    width: 100%;
    max-height: 560px;
    overflow: auto;
    border-radius: 12px;
}

.gallery-figure img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
}

.rulesbox .rulesbox-inner {
    
    overflow: hidden;
}



.rulesbox::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    outline: 1px solid rgba(99, 102, 241, 0.5);
    pointer-events: none;
    z-index: 2;
}

.rulesbox::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    outline: 1px solid rgba(168, 85, 247, 0.4);
    pointer-events: none;
    z-index: 1;
}

.bigbox {
    background-color: rgba(8, 3, 18, 0.92);
    
    color: var(--white);
    padding: 14px;
    box-sizing: border-box;
    margin: auto;
    margin-top: 5px;
    margin-bottom: 10px;
    border: 3px double var(--blue);
    position: relative;
    z-index: 1;
}


.bigbox.narrow {
    
    flex: 1 1 0;
    width: auto; 
    margin: 0; 
    z-index: 1;
    min-width: 820px; 
}


.bigbox::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    outline: 1px solid rgba(99, 102, 241, 0.5);
    pointer-events: none;
    z-index: 2;
}

.bigbox::after {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    outline: 1px solid rgba(168, 85, 247, 0.4);
    pointer-events: none;
    z-index: 1;
}


.funbox {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto auto 1fr auto;
    grid-column-gap: 8px;
    grid-row-gap: 8px;
    padding: 12px;
}

.funbox.admin-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.funbox.admin-panel > * {
    width: 100%;
}


.links {
    grid-area: 1 / 1 / 2 / 3;
    background-color: transparent;
    width: 100%;
    box-sizing: border-box;
    padding: 6px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.links-primary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.links span {
    color: var(--pink);
    font-size: 12px;
    font-family: var(--font-mono);
    text-shadow: none;
}

.links a {
    color: var(--white);
    text-decoration: underline dashed rgba(168, 85, 247, 0.4);
    font-size: 12px;
    font-family: var(--font-mono);
}

.links a:hover,
.links a.active {
    color: var(--pink);
    text-decoration: underline dashed rgba(168, 85, 247, 0.6);
    font-weight: 700;
}

.links-auth {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    text-transform: uppercase;
}

.links-auth span {
    color: var(--pink);
    letter-spacing: 1px;
}

.links-auth strong {
    color: var(--red);
}


.sideimage {
    grid-area: 2 / 1 / 3 / 2;
    background-color: transparent;
    min-height: 180px;
    width: 100%;
    box-sizing: border-box;
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--white);
    text-align: right;
    text-shadow: none;
    padding: 8px;
}

.sideimage img {
    max-width: 100%;
    height: auto;
    border: 2px solid var(--red);
}


.textbox {
    grid-area: 2 / 2 / 3 / 3;
    background-color: transparent;
    min-height: 180px;
    width: 100%;
    box-sizing: border-box;
    border: 3px double var(--blue);
    font-size: 16px;
    font-family: var(--font-mono);
    text-align: left;
    padding: 14px;
    text-shadow: 0 0 10px rgba(76, 29, 149, 0.35);
    overflow: visible;
    max-height: none;
    word-break: break-word;
}

.textbox > *:first-child {
    margin-top: 0;
}

.textbox p,
.textbox ul,
.textbox ol,
.textbox blockquote,
.textbox pre {
    text-indent: 0;
}

.textbox ul,
.textbox ol {
    padding-left: 20px;
    margin-bottom: 12px;
}

.textbox li {
    margin-bottom: 6px;
}

.textbox img,
.textbox video,
.textbox iframe,
.textbox embed,
.textbox object {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px auto;
    border: 1px solid rgba(99, 102, 241, 0.35);
    box-shadow: 0 10px 25px rgba(8, 6, 18, 0.4);
    border-radius: 10px;
}

.textbox iframe {
    aspect-ratio: 16 / 9;
    width: 100%;
    min-height: 240px;
}

.textbox pre {
    background: rgba(5, 1, 15, 0.85);
    border: 1px solid rgba(99, 102, 241, 0.35);
    padding: 10px;
    overflow-x: auto;
    white-space: pre-wrap;
    border-radius: 8px;
}

.textbox code {
    font-family: var(--font-mono);
    background: rgba(99, 102, 241, 0.2);
    padding: 2px 4px;
    border-radius: 4px;
}

.textbox pre code {
    background: transparent;
    padding: 0;
}

.textbox blockquote {
    border-left: 3px solid rgba(168, 85, 247, 0.6);
    margin: 14px 0;
    padding-left: 12px;
    color: rgba(248, 250, 252, 0.85);
}

.textbox table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 12px;
}

.textbox table th,
.textbox table td {
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 6px 8px;
    text-align: left;
}

.textbox table thead {
    background: rgba(99, 102, 241, 0.2);
}

.admin-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 12px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 640px;
}

.admin-table thead tr {
    background: var(--blue);
    color: var(--white);
}

.admin-table th,
.admin-table td {
    padding: 6px;
    border: 1px solid var(--black);
    text-align: left;
}

.admin-table th {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 11px;
}

.admin-table td.admin-actions {
    text-align: center;
}

.admin-table td.admin-role {
    text-transform: uppercase;
}

.admin-table td.admin-comment {
    max-width: 260px;
    max-height: 60px;
    overflow-y: auto;
}

.admin-table td.admin-timestamp {
    white-space: nowrap;
}

.admin-avatar {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-right: 4px;
    border: 1px solid var(--blue);
    image-rendering: pixelated;
}

.admin-inline-form {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.admin-select {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    padding: 2px 4px;
    background: var(--surface);
    color: var(--white);
    border: 1px solid var(--blue);
}

.admin-button {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    padding: 2px 10px;
    cursor: pointer;
    border: 1px solid var(--black);
    color: var(--white);
    background: var(--black);
    transition: transform 0.1s ease;
}

.admin-button:hover {
    transform: translateY(-1px);
}

.admin-button-primary {
    background: var(--red);
    border-color: var(--black);
}

.admin-button-danger {
    border-color: var(--red);
}

.admin-note {
    font-size: 10px;
    color: rgba(244, 245, 255, 0.6);
}


.updates {
    grid-area: 3 / 1 / 4 / 2;
    width: 100%;
    background-color: transparent;
    box-sizing: border-box;
    border: 3px double var(--blue);
    padding: 12px;
    font-size: 14px;
    color: var(--white);
    text-shadow: 0 0 10px rgba(76, 29, 149, 0.35);
    font-family: var(--font-mono);
    overflow: visible;
    max-height: none;
}

.updates hr {
    border-color: var(--red);
    width: 100%;
    margin: 6px 0;
}

.updates h3 {
    font-size: 14px;
    margin-bottom: 8px;
    text-shadow: 0 0 12px rgba(124, 58, 237, 0.45);
}

.otherbullshit {
    grid-area: 3 / 2 / 4 / 3;
    width: 100%;
    background-color: transparent;
    border: 3px double var(--red);
    padding: 12px;
    box-sizing: border-box;
    font-size: 14px;
    color: var(--white);
    text-shadow: 0 0 10px rgba(76, 29, 149, 0.35);
    font-family: var(--font-mono);
    overflow: visible;
    max-height: none;
}

.otherbullshit h3 {
    font-size: 14px;
    margin-bottom: 8px;
    text-shadow: 0 0 12px rgba(124, 58, 237, 0.45);
}

.badge-wall {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.badge-wall img {
    
    max-width: 240px;
    max-height: 72px;
    width: auto;
    height: auto;
    border: 1px solid var(--blue);
    background: var(--black);
    padding: 4px;
    image-rendering: auto; 
    object-fit: contain;
}


.title {
    background-color: transparent;
    margin: auto;
    margin-top: 15px;
    margin-bottom: 10px;
    width: 1160px;
    text-align: left;
    box-sizing: border-box;
}

.title span {
    font-family: var(--font-pixel);
    text-align: left;
    color: var(--white);
    font-size: 56px;
    text-shadow: 0 0 18px rgba(168, 85, 247, 0.5);
}


.footer-box {
    background-color: transparent;
    width: 100%;
    margin: auto;
    margin-top: 8px;
    box-sizing: border-box;
    border: 3px double var(--blue);
    padding: 6px;
}

.footer-box p {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--white);
    text-align: center;
    text-shadow: 0 0 8px rgba(76, 29, 149, 0.35);
    line-height: 1.3;
    text-indent: 0;
}


@media (max-width: 900px) {
    .main {
        width: 100%;
        margin-top: 10px;
    }

    .content-layout {
        width: 95%;
    }

    .bigbox {
        width: 95%;
        max-width: 700px;
    }

    .title {
        width: 95%;
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    .funbox {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
    }

    
    .content-layout {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .rulesbox {
        width: 100%;
        flex: 0 0 auto;
    }

    .bigbox.narrow {
        width: 100%;
    }

    .links {
        grid-area: 1 / 1 / 2 / 2;
        flex-direction: column;
        align-items: flex-start;
    }

    .sideimage {
        grid-area: 2 / 1 / 3 / 2;
        text-align: center;
    }

    .textbox {
        grid-area: 3 / 1 / 4 / 2;
    }

    .updates {
        grid-area: 4 / 1 / 5 / 2;
    }

    .otherbullshit {
        grid-area: 5 / 1 / 6 / 2;
    }

    .title span {
        font-size: 42px;
    }
}

