/* ===== STYLE SPECYFICZNE DLA KOMPENDIUM ===== */

/* Układ kompendium */
.compendium-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 25px;
    align-items: start;
}

.compendium-sidebar {
    position: sticky;
    top: 20px;
}

/* Spis treści */
.table-of-contents {
    list-style: none;
    padding: 0;
    margin: 0;
}

.table-of-contents li {
    margin-bottom: 10px;
}

.table-of-contents a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 12px 15px;
    display: block;
    border-radius: 15px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    border-left: 3px solid transparent;
}

.table-of-contents a:hover {
    background: rgba(157, 78, 221, 0.2);
    border-left-color: var(--accent-purple);
    transform: translateX(5px);
    color: white;
}

.table-of-contents a i {
    margin-right: 10px;
    width: 24px;
    display: inline-block;
}

/* Sekcje */
.section {
    scroll-margin-top: 20px;
}

.section-description {
    color: var(--text-secondary);
    font-size: 1.1em;
    margin-bottom: 20px;
}

/* Karty zasad */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.rule-card {
    background: rgba(0, 30, 60, 0.5);
    border-radius: 20px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rule-card:hover {
    background: rgba(0, 50, 90, 0.7);
    transform: translateY(-5px);
    border-color: var(--accent-purple);
}

.rule-card h4 {
    color: var(--accent-blue);
    margin: 0 0 10px;
    font-size: 1.3em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rule-card p {
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

/* Tagi */
.rule-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    margin-top: 10px;
}

.tag-dnd {
    background: linear-gradient(135deg, #00b4d8, #0077b6);
    color: white;
}

.tag-wod {
    background: linear-gradient(135deg, #9d4edd, #c77dff);
    color: white;
}

.tag-general {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

/* Tabele */
.rules-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(0, 20, 40, 0.5);
    border-radius: 15px;
    overflow: hidden;
}

.rules-table th {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    color: white;
    padding: 12px;
    text-align: left;
    font-weight: 600;
}

.rules-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.rules-table tr:hover td {
    background: rgba(157, 78, 221, 0.1);
}

/* Listy */
.custom-list {
    list-style: none;
    padding: 0;
}

.custom-list li {
    padding: 10px 15px;
    margin-bottom: 8px;
    background: rgba(0, 30, 60, 0.4);
    border-radius: 10px;
    border-left: 3px solid var(--accent-blue);
    color: var(--text-secondary);
}

.custom-list li strong {
    color: var(--accent-blue);
}

.steps-list {
    list-style: decimal;
    padding-left: 20px;
}

.steps-list li {
    border-left-color: var(--accent-purple);
}

.exp-list {
    color: var(--text-secondary);
    margin: 10px 0 0 20px;
}

.exp-list li {
    margin-bottom: 5px;
}

/* Notatki i dodatki */
.notes-section {
    background: rgba(0, 20, 40, 0.6);
    border-radius: 20px;
    padding: 20px;
    margin: 20px 0;
    border: 1px dashed var(--accent-purple);
}

.notes-title {
    margin-top: 0;
    margin-bottom: 15px;
    color: white;
    font-size: 1.2em;
}

.note-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    margin-bottom: 10px;
}

.note-icon {
    font-size: 1.5em;
    min-width: 40px;
    text-align: center;
}

.note-content {
    flex: 1;
}

.note-content p {
    margin: 0 0 5px;
    color: var(--text-secondary);
}

.note-content small {
    color: var(--text-tertiary, rgba(255, 255, 255, 0.7));
}

/* Linki w kompendium */
.links-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.compendium-link {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    background: rgba(0, 180, 216, 0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.compendium-link:hover {
    background: rgba(157, 78, 221, 0.4);
    transform: translateY(-2px);
}

.compendium-link:nth-child(2) {
    background: rgba(157, 78, 221, 0.3);
}

.compendium-link:nth-child(3) {
    background: rgba(255, 255, 255, 0.1);
}

/* Stopka */
.footer-note {
    font-size: 0.8em;
    margin-top: 5px;
    color: var(--text-tertiary, rgba(255, 255, 255, 0.7));
}

/* Responsywność */
@media (max-width: 1000px) {
    .compendium-layout {
        grid-template-columns: 1fr;
    }
    
    .compendium-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .rules-grid {
        grid-template-columns: 1fr;
    }
    
    .links-grid {
        flex-direction: column;
    }
    
    .compendium-link {
        text-align: center;
    }
}