* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', 'Courier', monospace;
    font-size: 16px;
    line-height: 1.7;
    color: #2c2416;
    background: #f5e6d3;
    background-image: 
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(139, 115, 85, 0.03) 2px,
            rgba(139, 115, 85, 0.03) 4px
        );
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: #fffef8;
    border: 3px double #8b7355;
    box-shadow: 
        0 0 0 1px #d4c4a8,
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 0 50px rgba(139, 115, 85, 0.05);
    padding: 40px 50px;
    position: relative;
}

.container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(139, 115, 85, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 115, 85, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

header {
    border-bottom: 2px solid #8b7355;
    padding-bottom: 25px;
    margin-bottom: 40px;
    position: relative;
    z-index: 1;
}

header h1 {
    font-size: 42px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    color: #5a4a3a;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: 2px 2px 0px rgba(139, 115, 85, 0.2);
    font-family: 'Courier New', monospace;
}

nav {
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

nav a {
    color: #6b5a4a;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 15px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #8b7355;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: #4a3a2a;
}

main {
    margin-bottom: 50px;
    position: relative;
    z-index: 1;
}

section {
    margin-bottom: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.5);
    border-left: 4px solid #8b7355;
    box-shadow: inset 0 0 10px rgba(139, 115, 85, 0.1);
}

h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #5a4a3a;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 2px solid #d4c4a8;
    padding-bottom: 10px;
}

h3 {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #6b5a4a;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

p {
    margin-bottom: 18px;
    text-align: justify;
    color: #3a2a1a;
}

ul {
    margin-left: 40px;
    margin-bottom: 20px;
    list-style-type: square;
}

li {
    margin-bottom: 10px;
    color: #3a2a1a;
}

main a {
    color: #6b5a4a;
    text-decoration: underline;
    text-decoration-color: #8b7355;
    transition: all 0.3s ease;
}

main a:hover {
    color: #4a3a2a;
    text-decoration-color: #5a4a3a;
    background: rgba(139, 115, 85, 0.1);
    padding: 2px 4px;
    margin: -2px -4px;
}

footer {
    border-top: 2px solid #8b7355;
    padding-top: 25px;
    text-align: center;
    font-size: 14px;
    color: #6b5a4a;
    position: relative;
    z-index: 1;
}

footer a {
    color: #6b5a4a;
    text-decoration: none;
    border-bottom: 1px dotted #8b7355;
    transition: all 0.3s ease;
}

footer a:hover {
    color: #4a3a2a;
    border-bottom-color: #4a3a2a;
}

/* Мобильная адаптация */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        padding: 25px 20px;
        border-width: 2px;
    }
    
    header h1 {
        font-size: 32px;
        letter-spacing: 2px;
    }
    
    nav {
        flex-direction: column;
        gap: 15px;
    }
    
    nav a {
        display: block;
        padding: 10px;
        border: 1px solid #d4c4a8;
        background: rgba(255, 255, 255, 0.5);
    }
    
    nav a::after {
        display: none;
    }
    
    section {
        padding: 15px;
        margin-bottom: 30px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    h3 {
        font-size: 20px;
    }
    
    ul {
        margin-left: 25px;
    }
    
    p {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 20px 15px;
    }
    
    header h1 {
        font-size: 28px;
        letter-spacing: 1px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    body {
        font-size: 15px;
    }
}
