/* ── Layout geral ── */
.guide-wrapper {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    padding: 32px 0 60px;
}

/* ── Sidebar ── */
.guide-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 90px;
}

.sidebar-card {
    background: linear-gradient(145deg, rgba(22,12,12,0.98), rgba(28,14,8,0.98));
    border: 1px solid rgba(255,215,0,0.2);
    border-radius: 14px;
    overflow: hidden;
}

.sidebar-header {
    background: linear-gradient(135deg, rgba(118,75,162,0.5), rgba(102,126,234,0.3));
    padding: 14px 18px;
    font-family: 'Orbitron', monospace;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: #ffd700;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255,215,0,0.15);
}

.sidebar-nav {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    color: rgba(255,255,255,0.55);
    font-size: 0.88rem;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
    color: #00d4ff;
    border-left-color: #00d4ff;
    background: rgba(0,212,255,0.06);
    padding-left: 22px;
}

.sidebar-nav li a i {
    width: 16px;
    font-size: 0.8rem;
    text-align: center;
    flex-shrink: 0;
}

/* ── Conteúdo principal ── */
.guide-content {
    flex: 1;
    min-width: 0;
}

.guide-page-header {
    background: linear-gradient(135deg, rgba(22,12,12,0.98), rgba(28,14,8,0.98));
    border: 1px solid rgba(255,215,0,0.2);
    border-radius: 16px;
    padding: 36px 40px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
}

.guide-page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 0% 50%, rgba(118,75,162,0.15) 0%, transparent 60%);
    pointer-events: none;
}

.guide-page-title {
    font-family: 'Orbitron', monospace;
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ffd700, #00d4ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.guide-page-subtitle {
    color: rgba(255,255,255,0.5);
    font-size: 0.95rem;
}

/* ── Seção de tópico ── */
.guide-section {
    background: linear-gradient(145deg, rgba(22,12,12,0.98), rgba(28,14,8,0.98));
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 24px;
    scroll-margin-top: 100px;
    transition: border-color 0.3s;
}

.guide-section:hover { border-color: rgba(0,212,255,0.2); }

.guide-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 28px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    user-select: none;
}

.section-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.section-icon.gold   { background: rgba(255,215,0,0.15);  color: #ffd700; }
.section-icon.cyan   { background: rgba(0,212,255,0.15);  color: #00d4ff; }
.section-icon.purple { background: rgba(118,75,162,0.25); color: #b47fea; }
.section-icon.green  { background: rgba(0,200,100,0.15);  color: #00c864; }
.section-icon.orange { background: rgba(255,140,0,0.15);  color: #ff8c00; }
.section-icon.red    { background: rgba(255,78,80,0.15);  color: #ff4e50; }
.section-icon.blue   { background: rgba(102,126,234,0.2); color: #667eea; }
.section-icon.pink   { background: rgba(255,100,180,0.15);color: #ff64b4; }

.section-title {
    font-family: 'Orbitron', monospace;
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    flex: 1;
}

.section-badge {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

.badge-iniciante { background: rgba(0,200,100,0.2);  color: #00c864; border: 1px solid rgba(0,200,100,0.3); }
.badge-medio     { background: rgba(255,215,0,0.15); color: #ffd700; border: 1px solid rgba(255,215,0,0.3); }
.badge-avancado  { background: rgba(255,78,80,0.15); color: #ff4e50; border: 1px solid rgba(255,78,80,0.3); }

.section-toggle {
    color: rgba(255,255,255,0.3);
    transition: transform 0.3s;
    font-size: 0.85rem;
}

.guide-section.collapsed .section-toggle { transform: rotate(-90deg); }

.guide-section-body { padding: 28px; }

.guide-section.collapsed .guide-section-body { display: none; }

/* ── Texto descritivo ── */
.guide-text {
    color: rgba(255,255,255,0.7);
    font-size: 0.95rem;
    line-height: 1.75;
    margin-bottom: 20px;
}

.guide-text strong { color: #ffd700; font-weight: 600; }
.guide-text a { color: #00d4ff; text-decoration: none; }
.guide-text a:hover { text-decoration: underline; }

/* ── Steps ── */
.step-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.step-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.05);
}

.step-num {
    font-family: 'Orbitron', monospace;
    font-size: 0.8rem;
    font-weight: 900;
    color: #ffd700;
    min-width: 24px;
    padding-top: 1px;
}

.step-row p { margin: 0; color: rgba(255,255,255,0.65); font-size: 0.9rem; line-height: 1.5; }
.step-row p strong { color: #ffffff; }

/* ── Tabela de classes ── */
.class-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.class-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.class-card:hover {
    border-color: rgba(255,215,0,0.3);
    background: rgba(255,215,0,0.04);
}

.class-card .class-emoji { font-size: 1.6rem; display: block; margin-bottom: 6px; }
.class-card .class-name  { font-family: 'Orbitron', monospace; font-size: 0.72rem; color: #ffd700; margin-bottom: 4px; }
.class-card .class-role  { font-size: 0.78rem; color: rgba(255,255,255,0.45); }

/* ── Tabela de comandos / eventos ── */
.cmd-table { width: 100%; border-collapse: collapse; margin-bottom: 20px; }

.cmd-table th {
    font-family: 'Orbitron', monospace;
    font-size: 0.72rem;
    letter-spacing: 1px;
    color: #ffd700;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,215,0,0.2);
}

.cmd-table td {
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: rgba(255,255,255,0.65);
    font-size: 0.88rem;
    vertical-align: top;
}

.cmd-table tr:last-child td { border-bottom: none; }
.cmd-table tr:hover td { background: rgba(255,255,255,0.03); }

.cmd-code {
    font-family: 'Courier New', monospace;
    background: rgba(0,212,255,0.1);
    color: #00d4ff;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* ── Placeholder de imagem ── */
.img-slot {
    width: 100%;
    border: 2px dashed rgba(255,215,0,0.25);
    border-radius: 12px;
    background: rgba(255,215,0,0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(255,215,0,0.4);
    font-size: 0.82rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: border-color 0.2s, background 0.2s;
    cursor: default;
    overflow: hidden;
    position: relative;
}

.img-slot:hover {
    border-color: rgba(255,215,0,0.45);
    background: rgba(255,215,0,0.05);
}

.img-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    border-radius: 10px;
}

.img-slot-icon  { font-size: 2rem; opacity: 0.5; }
.img-slot-label { font-family: 'Orbitron', monospace; font-size: 0.7rem; }
.img-slot-size  { font-size: 0.72rem; opacity: 0.5; }

.img-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 20px; }
.img-grid-1 { margin-bottom: 20px; }

/* ── Tip box ── */
.tip-box {
    display: flex;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 0.88rem;
    line-height: 1.5;
}

.tip-box.info    { background: rgba(0,212,255,0.08);  border-left: 3px solid #00d4ff;  color: rgba(255,255,255,0.7); }
.tip-box.warning { background: rgba(255,215,0,0.08);  border-left: 3px solid #ffd700;  color: rgba(255,255,255,0.7); }
.tip-box.danger  { background: rgba(255,78,80,0.08);  border-left: 3px solid #ff4e50;  color: rgba(255,255,255,0.7); }
.tip-box i { font-size: 1rem; margin-top: 2px; flex-shrink: 0; }
.tip-box.info    i { color: #00d4ff; }
.tip-box.warning i { color: #ffd700; }
.tip-box.danger  i { color: #ff4e50; }

/* ── Slot com imagem real — clicável ── */
.img-slot.has-image {
    cursor: zoom-in;
    border-color: rgba(255,215,0,0.35);
}

.img-slot.has-image::after {
    content: '\f00e';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 1rem;
    color: rgba(255,255,255,0.7);
    background: rgba(0,0,0,0.45);
    padding: 4px 7px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.img-slot.has-image:hover::after { opacity: 1; }

/* ── Modal de imagem ── */
.img-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    animation: modalFadeIn 0.2s ease;
}

.img-modal-overlay.open { display: flex; }

@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.img-modal-box {
    max-width: 92vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: modalZoomIn 0.22s ease;
}

@keyframes modalZoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.img-modal-box img {
    max-width: 92vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 0 60px rgba(0,0,0,0.8);
    object-fit: contain;
    display: block;
}

.img-modal-close {
    position: fixed;
    top: 18px;
    right: 22px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 1.1rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    z-index: 10000;
}

.img-modal-close:hover { background: rgba(255,78,80,0.4); border-color: #ff4e50; }

/* ── Responsivo ── */
@media (max-width: 900px) {
    .guide-wrapper  { flex-direction: column; }
    .guide-sidebar  { width: 100%; position: static; }
    .sidebar-nav    { display: flex; flex-wrap: wrap; padding: 8px; gap: 4px; }
    .sidebar-nav li a {
        border-left: none;
        border-bottom: 2px solid transparent;
        padding: 8px 12px;
        border-radius: 8px;
        font-size: 0.8rem;
    }
    .sidebar-nav li a.active,
    .sidebar-nav li a:hover {
        border-left: none;
        border-bottom-color: #00d4ff;
        padding-left: 12px;
    }
    .img-grid-2         { grid-template-columns: 1fr; }
    .class-grid         { grid-template-columns: repeat(auto-fill, minmax(130px,1fr)); }
    .guide-page-header  { padding: 24px 20px; }
    .guide-section-body { padding: 20px; }
}
