@charset "utf-8";
body {
    background-image: url('https://kodomo.fbb.msu.ru/~yarasub/Wall.jpeg');
    background-size: cover; 
    background-position: center; 
    min-height: 100vh;
    margin: 0;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: Arial, sans-serif;
}

.content {
    background-color: white; 
    width: 800px;
    min-height: 800px;
    height: auto;
    margin: 20px 0;
    border-radius: 30px;
    padding: 20px; 
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5); 
}

h1 {
    text-align: center; 
    color: #2c3e50;
    margin: 20px 0;
}
        
nav ul {
    list-style-type: none; 
    padding: 0;
    background-color: lightblue; 
    border-radius: 25px; 
    overflow: auto;
    margin: 35px 0 10px 0;
    font-size: 20px;
    display: flex;
    justify-content: center;
}

nav ul li { 
    float: left; 
}
        
nav ul li a { 
    display: block; 
    color: Black; 
    text-align: center; 
    padding: 12px 12px; 
    text-decoration: none; 
    transition: color 0.5s; 
}
        
nav ul li a:hover { 
    color: darkgreen; 
}
        
/* Стили для римских цифр */
.roman-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 30px auto;
    width: 90%;
}
        
.roman-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s;
    padding: 15px;
    border-radius: 10px;
    background-color: #f8f9fa;
}
        
.roman-item:hover {
    transform: translateY(-5px);
    background-color: #e9ecef;
}
        
.roman-number {
    font-size: 4rem;
    color: #3498db;
    margin-bottom: 10px;
    transition: color 0.3s;
    font-weight: bold;
}
        
.roman-item:hover .roman-number {
    color: #2c3e50;
}
        
.roman-caption {
    font-size: 1rem;
    color: #2c3e50;
    text-align: center;
    font-weight: 500;
}
        
/* Адаптивность */
@media (max-width: 850px) {
            .content {
                width: 95%;
                padding: 15px;
            }
            
            .roman-grid {
                grid-template-columns: repeat(2, 1fr);
            }
            
            .roman-number {
                font-size: 3.5rem;
            }
        }
        
        @media (max-width: 600px) {
            .roman-grid {
                grid-template-columns: 1fr;
            }
            
            nav ul {
                flex-direction: column;
                align-items: center;
            }
            
            nav li {
                margin: 5px 0;
            }
        }
