/* ========================================================================== */
/* COMMANDS PAGE (GALLERY STYLE - UNIFIED WITH ITEMS THEME) */
/* ========================================================================== */

/* ========================================================================== */
/* PAGE LAYOUT & ANIMATIONS */
/* ========================================================================== */

.page {
    display: flex;
    flex-direction: row;
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 50px 20px;
    gap: 30px;
    min-height: 80vh;
    box-sizing: border-box;
    opacity: 0;
    animation: contentFadeUp 0.8s ease-out forwards;
    animation-delay: 0.1s;
}

.wiki {
    background-color: #ffffffc2;
    border-radius: 15px;
    color: var(--color-text-dark);
    transform: scale(1.12);
}

.book-img {
    filter: invert(0.2);
}

/* Анімація з index.css - ТОЧНА КОПІЯ */
@keyframes contentFadeUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================================================== */
/* CONTENT */
/* ========================================================================== */

.content {
    flex: 1;
    width: 100%;
    background: linear-gradient(169deg, #1b1a1b 0%, #1b1a1b 100%);
    border: 1px solid #cccccc;
    border-radius: 12px;
    padding: 40px;
    color: #ffffff;
}

/* ========================================================================== */
/* BREADCRUMB */
/* ========================================================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-family: 'Nunito-normal', sans-serif;
    font-size: 0.9em;
    color: #666;
}

.breadcrumb a {
    color: #888;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #ffffff;
}

/* ========================================================================== */
/* CONTENT HEADER */
/* ========================================================================== */

.content h1 {
    font-family: 'Minecraft', monospace;
    font-size: 2.5em;
    color: #ffffff;
    margin-top: 0;
    margin-bottom: 20px;
    text-shadow: 2px 2px 0px #000;
}

.content .intro {
    font-family: 'Nunito-normal', sans-serif;
    font-size: 1.1em;
    line-height: 1.7;
    color: #e0e0e0;
    margin-bottom: 15px;
}

.content hr {
    border: 0;
    border-top: 1px solid rgba(255,255,255,0.2);
    margin: 30px 0;
}

/* ========================================================================== */
/* GRID CONTAINER (GALLERY LAYOUT) */
/* ========================================================================== */

.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* ========================================================================== */
/* COMMAND CARD (ITEM) - VERTICAL STYLE */
/* ========================================================================== */

.item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: 100%;
    
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(0,0,0,0) 100%);
    border-left: 3px solid #444;
    border-radius: 6px;
    
    overflow: hidden;
    scroll-margin-top: 130px;
    transition: all 0.3s ease;
}

.item:hover {
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(0,0,0,0) 100%);
    border-left-color: #fff;
    transform: translateX(5px);
}

/* ========================================================================== */
/* PREVIEW IMAGE */
/* ========================================================================== */

.preview-image {
    width: 100%;
    padding-top: 50%;
    position: relative;
    overflow: hidden;
}

.preview-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 6px;
    border-top-right-radius: 6px;
    image-rendering: pixelated;
    transition: all 0.3s ease;
}

.item:hover .preview-image img {
    transform: scale(1.05);
}

/* ========================================================================== */
/* TEXT CONTENT */
/* ========================================================================== */

.text-content {
    padding: 15px 20px 20px 20px;
    width: 100%;
    box-sizing: border-box;
}

.text-content h2 {
    font-family: 'Minecraft', monospace;
    font-size: 1.2em;
    color: #e0e0e0;
    margin: 0 0 8px 0;
    text-shadow: 1px 1px 0px #000;
    transition: color 0.3s ease;
}

.item:hover .text-content h2 {
    color: #ffffff;
}

.text-content .desc {
    font-family: 'Nunito-normal', sans-serif;
    font-size: 0.95em;
    color: #aaa;
    margin: 0;
    line-height: 1.6;
}

/* ========================================================================== */
/* SPECIAL ADMIN STYLE */
/* ========================================================================== */

.item.admin {
    border-left: 3px solid rgba(255, 50, 50, 0.6);
    background: linear-gradient(180deg, rgba(255, 50, 50, 0.05) 0%, rgba(0,0,0,0) 100%);
}

.item.admin:hover {
    border-left-color: #ff3232;
    background: linear-gradient(180deg, rgba(255, 50, 50, 0.1) 0%, rgba(0,0,0,0) 100%);
}

/* ========================================================================== */
/* TAGS */
/* ========================================================================== */

.tag {
    font-family: 'Nunito-normal', sans-serif;
    font-size: 0.75em;
    padding: 4px 12px;
    background: rgba(53, 53, 53, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: #888;
}

.tag.epic { background: rgba(255, 85, 255, 0.1); border-color: rgba(170, 85, 170, 0.5); color: #f5f; }
.tag.legendary { background: rgba(255, 170, 0, 0.1); border-color: rgba(170, 136, 0, 0.5); color: #fa0; }
.tag.rare { background: rgba(85, 255, 255, 0.1); border-color: rgba(85, 170, 170, 0.5); color: #5ff; }

/* ========================================================================== */
/* BACK LINK */
/* ========================================================================== */

.back {
    display: inline-block;
    font-family: 'Nunito-normal', sans-serif;
    font-size: 0.95em;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-top: 20px;
}

.back:hover {
    color: #ffffff;
    transform: translateX(-5px);
}

/* ========================================================================== */
/* RESPONSIVE */
/* ========================================================================== */

@media (max-width: 1450px) {
    .sidebar {
        display: none;
    }
}

@media (max-width: 992px) {
    .page { padding: 120px 20px 40px; }
    .content { padding: 30px; }
    .content h1 { font-size: 2em; }
    .commands-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .text-content { padding: 12px 18px 18px 18px; }
}

@media (max-width: 768px) {
    .page { padding: 120px 15px 40px; }
    .content { padding: 25px 20px; }
    .content h1 { font-size: 1.8em; }
    .commands-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
    .text-content { padding: 12px 15px 15px 15px; }
    .text-content h2 { font-size: 1.1em; }
    .text-content .desc { font-size: 0.9em; }
    .tag { font-size: 0.7em; padding: 3px 10px; }
}

@media (max-width: 600px) {
    .page { padding: 130px 15px 40px; }
    .content { padding: 20px 15px; }
    .breadcrumb { font-size: 0.85em; margin-bottom: 15px; flex-wrap: wrap; }
    .content h1 { font-size: 1.5em; text-shadow: 1px 1px 0px #000; }
    .content .intro { font-size: 1em; }
    
    .commands-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .text-content h2 { font-size: 1em; }
    .text-content .desc { font-size: 0.85em; }
    .tag { font-size: 0.65em; padding: 3px 8px; }
    .back { font-size: 0.9em; margin-top: 15px; }
}

@media (max-width: 400px) {
    .page { padding: 120px 10px 30px; }
    .content { padding: 15px 12px; }
    .content h1 { font-size: 1.3em; }
    .commands-grid { gap: 12px; }
    .text-content { padding: 10px 12px 12px 12px; }
    .text-content h2 { font-size: 0.95em; }
}