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

body {
    font-family: Arial, sans-serif;
    background-color: #16091E;
    color: white;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    z-index: 1;
}

/* Fixed gradient backgrounds */
body::before, body::after {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    pointer-events: none;
    z-index: -1;
}

body::before {
    top: -200px;
    left: -200px;
    background: radial-gradient(circle, #FF00E5 0%, transparent 70%);
}

body::after {
    bottom: -200px;
    right: -200px;
    background: radial-gradient(circle, #21FF00 0%, transparent 70%);
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    z-index: 100;
    display: flex;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

header.visible {
    transform: translateY(0);
}

#main-title {
    font-family: 'Onder', sans-serif;
    font-size: 1.5rem;
    color: white;
    opacity: 0;
    transition: opacity 0.4s ease 0.2s;
}

#main-title.visible {
    opacity: 1;
}

/* History page styles */
.history-container {
    position: relative;
    min-height: 100vh;
}

.history-period {
    min-height: 100vh;
    padding: 100px 20px 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.history-period.active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

.period-content {
    max-width: 900px;
    margin: 0 auto;
    background-color: rgba(22, 9, 30, 0.8);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
}

.period-image {
    width: 100%;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    margin: 20px 0;
}

.period-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.period-image:hover img {
    transform: scale(1.03);
}

.fact-box {
    background: linear-gradient(135deg, rgba(255,0,229,0.2), rgba(33,255,0,0.2));
    border-radius: 10px;
    padding: 20px;
    margin: 25px 0;
    border: 1px solid rgba(255,255,255,0.1);
}

.dates-list {
    margin: 25px 0;
}

.dates-list li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.dates-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #FF00E5;
    font-size: 1.5rem;
}

.error-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    margin-top: 20px;
    display: inline-block;
    text-decoration: none;
    font-family: 'Etud Noire', sans-serif;
    font-size: 0.9rem;
    padding: 10px 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.error-btn:hover {
    background: rgba(255,255,255,0.2);
}

.final-screen {
    text-align: center;
    padding: 100px 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.final-screen.active {
    opacity: 1;
    transform: translateY(0);
}

.final-content {
    max-width: 900px;
    margin: 0 auto;
    background-color: rgba(22, 9, 30, 0.8);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.3);
}

.home-btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px;
    font-family: 'Onder', sans-serif;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #FF00E5, #21FF00);
    color: white;
    text-decoration: none;
    margin-top: 20px;
    border: none;
}

.home-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255,0,229,0.4);
}

/* Footer */
.footer {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 3rem 2rem 1rem;
    position: relative;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer h3 {
    font-family: 'Onder', sans-serif;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: white;
}

.footer ul {
    list-style-type: none;
}

.footer li {
    margin-bottom: 0.8rem;
}

.footer a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer a:hover {
    color: #FF00E5;
}

.footer-copyright {
    text-align: center;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

/* Responsive styles */
@media (max-width: 768px) {
    .history-period {
        padding: 80px 15px 60px;
    }
    
    .period-content {
        padding: 20px;
    }
    
    .period-image {
        height: 250px;
    }
    
    body::before, body::after {
        width: 400px;
        height: 400px;
    }
}

@media (max-width: 480px) {
    .history-period {
        padding: 70px 10px 50px;
    }
    
    .period-image {
        height: 200px;
    }
    
    .home-btn, .error-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    body::before, body::after {
        width: 300px;
        height: 300px;
        filter: blur(60px);
    }
}

/* Стили для плавного появления периодов */
.history-period {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease;
    min-height: 100vh;
    padding: 100px 20px;
    position: relative;
}

.history-period.active {
    opacity: 1;
    transform: translateY(0);
}

.final-screen {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s ease;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.final-screen.active {
    opacity: 1;
    transform: translateY(0);
}

/* Убираем position: absolute у периодов */
.history-container {
    position: relative;
}

@font-face {
    font-family: 'Onder';
    src: url('fonts/Onder.ttf') format('truetype');
}

@font-face {
    font-family: 'Nauryz RedKeds';
    src: url('fonts/NAURYZREDKEDS.ttf') format('truetype');
}

@font-face {
    font-family: 'BIM';
    src: url('fonts/BIM.otf') format('truetype');
}

@font-face {
    font-family: 'font-face {
    font-family: 'Onder';
    src: url('fonts/Onder.ttf') format('truetype');
}

@font-face {
    font-family: 'Nauryz RedKeds';
    src: url('fonts/NAURYZREDKEDS.ttf') format('truetype');
}

@font-face {
    font-family: 'BIM';
    src: url('fonts/BIM.otf') format('truetype');
}

@font-face {
    font-family: 'Etud Noire';
    src: url('fonts/EtudNoire.ttf') format('truetype');
}


h2 {
    font-family: 'Onder';
    font-size: 0.6rem;
}

p {
    font-family: 'BIM' ;
}