@import url('style.css');

body {
    display: block !important;
    align-items: initial !important;
}

a {
    text-decoration: none !important;
}

.main-wrapper {
    min-height: 100vh;
    padding-top: 20px;
    max-width: 1100px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
    display: flex;
    flex-direction: column;
}

.header-main {
    text-align: center;
    margin-bottom: 2px;
    padding-top: 20px;
    padding-bottom: 20px;
}

.header-main h1 {
    font-size: 2rem;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin: 0;
    animation: none !important;
}

.header-main h1 .it {
    color: var(--accent-it);
    text-shadow: var(--shadow-it);
    animation: none !important;
}

.header-main h1 .car {
    color: var(--accent-car);
    text-shadow: var(--shadow-car);
    animation: none !important;
}

/* Стили для страницы правил */
.rules-block {
    background: var(--panel-bg);
    border: 2px solid #333;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-left: 4px solid var(--accent-it);
    border-right: 4px solid var(--accent-car);
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.rules-block h2 {
    font-size: 1.3rem;
    margin: 25px 0 15px;
    color: var(--accent-it);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.rules-block p {
    margin-bottom: 15px;
    line-height: 1.8;
    font-size: 1.05rem;
    color: var(--text-main);
}

.rules-block a {
    color: var(--accent-it);
    /* Убрали display: inline-block и width: max-content, как вы просили */
    text-decoration: none; /* Убираем стандартное подчеркивание, которое портит вид */
    transition: var(--transition);
}

.rules-block a:hover {
    color: var(--accent-car);
    text-decoration: underline; /* Подчеркивание появится только при наведении, чтобы не портить вид в покое */
}

.rules-block ul {
    margin: 15px 0;
    padding-left: 25px;
}

.rules-block li {
    margin-bottom: 10px;
    line-height: 1.6;
    color: var(--text-main);
}

.rules-block .date-info {
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid #333;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-align: center;
}

/* Навигация назад */
.back-link {
    text-align: center;
    margin-top: 30px;
}

.back-link a {
    display: inline-block;
    padding: 12px 28px;
    background: var(--accent-car);
    color: var(--bg-dark);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 0 10px rgba(255, 60, 0, 0.3);
}

.back-link a:hover {
    background: #ff5500;
    transform: translateY(-2px);
    box-shadow: var(--shadow-car);
}

/* Список страниц */
.pages-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    background: var(--panel-bg);
    /* Рамка удалена */
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
}

.page-item:hover {
    background: rgba(0, 210, 255, 0.1);
    /* Если хотите, чтобы при наведении появлялась рамка, оставьте border-color, 
       если нет — удалите эту строку */
    border-color: var(--accent-it);
    transform: translateX(5px);
    box-shadow: var(--shadow-it);
}

.page-item-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-it);
    border-radius: 8px;
    color: var(--bg-dark);
    font-size: 16px;
    flex-shrink: 0;
}

.page-item-info {
    flex: 1;
}

.page-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.page-item-url {
    display: none;
}

.page-item-arrow {
    color: var(--accent-it);
    font-size: 18px;
    transition: var(--transition);
}

.page-item:hover .page-item-arrow {
    transform: translateX(5px);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--accent-it);
    opacity: 0.5;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a,
.pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 15px;
    background: var(--panel-bg);
    border: 1px solid rgba(0, 210, 255, 0.2);
    border-radius: 8px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.pagination a:hover {
    background: rgba(0, 210, 255, 0.1);
    border-color: var(--accent-it);
    box-shadow: var(--shadow-it);
}

.pagination span.active {
    background: var(--accent-it);
    border-color: var(--accent-it);
    color: var(--bg-dark);
    box-shadow: var(--shadow-it);
}

/* Дополнительные стили для контента страниц */
.page-content {
    padding: 60px 0;
    min-height: 60vh;
}

.page-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.page-title {
    font-size: 42px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 30px;
    line-height: 1.2;
}

.page-body {
    font-size: 18px;
    line-height: 1.8;
    color: #333;
}

.page-body h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 40px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.page-body h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 30px 0 15px 0;
}

.page-body p {
    margin-bottom: 20px;
}

.page-body ul,
.page-body ol {
    margin-bottom: 20px;
    padding-left: 30px;
}

.page-body ul li {
    margin-bottom: 10px;
}

.page-body ol li {
    margin-bottom: 10px;
}

.page-body a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.page-body a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.page-body blockquote {
    border-left: 4px solid #667eea;
    padding: 20px;
    margin: 30px 0;
    background: #f8f9fa;
    font-style: italic;
    color: #555;
}

.page-body code {
    background: #f4f4f4;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.page-body pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.page-body pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.page-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 20px 0;
}

.page-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.page-body th,
.page-body td {
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    text-align: left;
}

.page-body th {
    background: #f8f9fa;
    font-weight: 600;
}

.page-body hr {
    border: none;
    height: 2px;
    background: #e0e0e0;
    margin: 40px 0;
}

@media (max-width: 768px) {
    .page-content {
        padding: 40px 0;
    }
    
    .page-title {
        font-size: 32px;
    }
    
    .page-body {
        font-size: 16px;
    }
    
    .page-body h2 {
        font-size: 24px;
    }
    
    .page-body h3 {
        font-size: 20px;
    }
}