* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'ZCOOL QingKe HuangYou', cursive;
    background: #2B2420 url('../../assets/homm3_leather.png');
    padding: 20px;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: #F0E4CE;
    border: 3px solid #3A2A1A;
    position: relative;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.06'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    pointer-events: none;
    z-index: 1;
}

header {
    background: #BF1B2C;
    border-bottom: 3px solid #3A2A1A;
    padding: 15px 20px 12px;
    text-align: center;
    position: relative;
    z-index: 2;
}

.header-controls {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.75rem;
    letter-spacing: 1px;
}

header::before {
    content: '★';
    display: block;
    font-size: 1.4rem;
    color: #F5D76E;
    margin-bottom: 2px;
    line-height: 1;
}

.version-link {
    position: absolute;
    top: 8px;
    left: 20px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.65rem;
    color: rgba(245, 215, 110, 0.6);
    text-decoration: none;
    letter-spacing: 0.5px;
    z-index: 10;
    transition: color 0.2s;
}

.version-link:hover {
    color: #F5D76E;
}

h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 2.2rem;
    color: #F5D76E;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.stats {
    background: #3A2A1A;
    color: #F0E4CE;
    padding: 8px;
    display: flex;
    justify-content: center;
    gap: 30px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 1px;
    border-bottom: 3px solid #3A2A1A;
    position: relative;
    z-index: 2;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-number {
    font-size: 1.3rem;
    color: #E8544A;
}

main {
    padding: 20px;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 18px;
}

.section {
    border: 2px solid #3A2A1A;
    background: #FAF4E8;
    break-inside: avoid;
}

.section-header {
    font-family: 'Oswald', sans-serif;
    padding: 9px 14px;
    border-bottom: 2px solid #3A2A1A;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1.5px;
    line-height: 1.2;
    background: #BF1B2C;
    color: #F5D76E;
}

.section:nth-child(even) .section-header {
    background: #3A2A1A;
    color: #F5D76E;
}

.section-content {
    padding: 10px 12px;
}

.subsection {
    margin-bottom: 10px;
}

.subsection h3 {
    font-family: 'Oswald', sans-serif;
    font-size: 0.7rem;
    color: #BF1B2C;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    border-bottom: 1.5px solid #BF1B2C;
    padding-bottom: 3px;
}

.section:nth-child(even) .subsection h3 {
    color: #3A2A1A;
    border-bottom-color: #3A2A1A;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    margin: 1px 0;
    padding: 2px 6px;
    border: 1.5px solid transparent;
    /* border-bottom: 1px dashed #C4B99A; Dotted line removed */
    background: transparent;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease-out;
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-item:hover:not(:has(.checklist-item:hover)) {
    background: rgba(191, 27, 44, 0.06);
    border-color: #BF1B2C;
    transform: translateX(6px);
    box-shadow: -2px 2px 5px rgba(58, 42, 26, 0.1);
    transition: all 0s;
}

.checklist-item.checked {
    opacity: 0.45;
}

.checklist-item.checked .item-text {
    text-decoration: line-through;
    text-decoration-color: #BF1B2C;
}

.checkbox {
    width: 15px;
    height: 15px;
    border: 2px solid #3A2A1A;
    border-radius: 1px;
    background: #FAF4E8;
    margin-right: 8px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease-out;
}

.checklist-item:hover:not(:has(.checklist-item:hover)) .checkbox {
    border-color: #BF1B2C;
    transform: scale(1.1);
    transition: all 0s;
}

.checkbox.checked {
    background: #BF1B2C;
    border-color: #8B0000;
}

.checkbox.checked::after {
    content: '★';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #F5D76E;
    font-size: 0.6rem;
    line-height: 1;
}

.item-text {
    flex: 1;
    font-size: 1.15rem;
    color: #3A2A1A;
    line-height: 1.3;
}

.item-link {
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    color: #BF1B2C;
    text-decoration: none;
    font-weight: 400;
    margin-left: 8px;
    flex-shrink: 0;
    border: none;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease-out;
}

.link-icon {
    width: 1.2em;
    height: auto;
    display: inline-block;
    vertical-align: middle;
}

.item-link:hover {
    background: transparent;
    color: #E8544A;
    transform: scale(1.15);
    text-shadow: 0 0 8px rgba(232, 84, 74, 0.4);
    transition: all 0s;
}

.indent-1 {
    margin-left: 22px;
}

.indent-2 {
    margin-left: 44px;
}

.controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 18px;
    background: #3A2A1A;
    border-top: 3px solid #3A2A1A;
    position: relative;
    z-index: 2;
}

.btn {
    font-family: 'Oswald', sans-serif;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid #F5D76E;
    background: transparent;
    cursor: pointer;
    color: #F5D76E;
    transition: all 0.2s ease-out;
    box-shadow: 0 4px 0 #3A2A1A;
    position: relative;
    top: 0;
}

.btn:hover {
    background: #F5D76E;
    color: #3A2A1A;
    transform: translateY(-2px);
    box-shadow: 0 6px 0 #3A2A1A;
    transition: all 0s;
}

.btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #3A2A1A;
    transition: all 0s;
}

.btn-danger {
    border-color: #E8544A;
    color: #E8544A;
}

.btn-danger:hover {
    background: #E8544A;
    color: #F0E4CE;
}

.hidden {
    display: none;
    opacity: 0;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #3A2A1A;
    color: #F5D76E;
    padding: 12px 24px;
    border: 2px solid #F5D76E;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: opacity 0.3s ease-in-out;
    opacity: 1;
}

blockquote {
    background: #BF1B2C;
    border: 2px solid #3A2A1A;
    padding: 14px;
    margin: 0;
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: #F5D76E;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    main {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
        letter-spacing: 3px;
    }
}

footer {
    text-align: center;
    padding: 20px;
    font-family: 'ZCOOL QingKe HuangYou', cursive;
    color: #F0E4CE;
    font-size: 1rem;
}