.fon{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("/img/fon.jpg");
    background-size: cover;
    z-index: -1;
}

body{
    display: flex;
    margin: 0;
    padding: 0;
    background-color: rgb(0, 0, 0);
    color: #fff;
}

header {
    background-color: rgba(255, 255, 255, 0.103);
    color: #fff; 
    border: rgb(255 255 255 / .4) 3px solid;
    backdrop-filter: blur(10px);

    font-family: sans-serif;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 1px;

    position: fixed;
    width: 90vw;
    height: 3vw;
    border-radius: 10em;
    margin: 1vw 4vw 0 4vw;
    outline: none;
    display: flex;
    text-align: center;
    align-items: center;
    justify-content: space-evenly;
    text-decoration: none;


    /* Плавность анимации */
    transition: transform 0.1s ease, background-color 0.2s ease;
    cursor: pointer; /* Чтобы было понятно, что это кнопка */
    user-select: none; /* Чтобы текст не выделялся при клике */
}

/* Анимация при нажатии */
header:active {
    transform: scale(0.98); /* Легкое уменьшение всей панели */
    background-color: rgba(255, 255, 255, 0.2); /* Чуть больше яркости при клике */
}
.title {
    position: absolute;
    top: 4vw;
    width: 100%;
    text-align: center;
    font-size: 3.5vw;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1vw;
}

.Header_home{
    color:#fff;

}
.go_to{
    color:#fff;
    text-align: center;
    display: flex;
    text-decoration: none;
}

.go_to:hover{
    font-size: 1.2rem;
}

.container{
    display: flex;
    width: 100vw;
    justify-content: center;
    height: 100vh;
    padding: 10vw;
}

.big_dipper{
    display: flex;
    justify-content: center;
}

.box_text{
    height: auto;
    width: 30vw;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1vw;
    background-color: rgba(255, 255, 255, 0.103);
    border-radius: .5em;
    border: rgb(255 255 255 / .4 ) 3px solid;
    outline: none;
    margin: 1vw 4vw 0 4vw;
    padding: 1vw;
}

.More{
    position: absolute;
    left: 13vw;
    top: 40vw;
    height: 5vh;
    width: 30vw;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1vw;
    background-color: rgba(255, 255, 255, 0.103);
    border-radius: 1em;
    border: rgb(255 255 255 / .4 ) 3px solid;
    cursor: pointer;
}

.More:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.More:active {
    transform: translateY(-2px);
}

.stars{
    width: 30vw; 
    position: absolute; 
    left: 12vw;
    height: 60vh;
    min-height: 500px;
    transform-style: preserve-3d;
    transform: rotateX(var(--move-y)) rotateY(var(--move-x));
    will-change: transform;
    transition: transform var(--transition);
}


.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
    backdrop-filter: blur(10px);
}  

.modal-content {
    position: absolute;
    background-color: white;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 90%;
    max-width: 800px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.2s forwards;
    opacity: 0;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.1vw;
    background-color: rgba(255, 255, 255, 0.103);
    border-radius: 1em;
    border: rgb(255 255 255 / .4 ) 3px solid;
    backdrop-filter: blur(10px);
}

.modal.closing {
    animation: fadeOut 0.3s ease forwards;
}

.modal.closing .modal-content {
    animation: popOut 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

.modal-header {
    background-color: rgba(255, 255, 255, 0.103);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
    backdrop-filter: blur(10px);
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
}

.close-btn {
    background-color: rgba(255, 255, 255, 0.103);
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-left: 15px;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
    font-size: 16px;
    line-height: 1.8;
    max-height: 70vh;
    overflow-y: auto;
}

/* Стили для анимации печати текста */
.typewriter-text {
    overflow: hidden;
    white-space: pre-wrap;
    margin: 0;
    padding: 0;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

.typewriter-title {
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid white;
    animation: typing 1.5s steps(20, end), blink-caret 0.75s step-end infinite;
    margin: 0;
    padding: 0;
    flex-grow: 1;
}

/* Курсор для печатающегося текста */
.typewriter-cursor {
    display: inline-block;
    width: 3px;
    background-color: #333;
    animation: blink 1s infinite;
    margin-left: 2px;
}

/* Анимация печати для заголовка */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

/* Анимация мигающего курсора */
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: white; }
}

/* Анимация для курсора в тексте */
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Анимации для модального окна */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes popIn {
    0% {
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 0;
    }
    70% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

@keyframes popOut {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    30% {
        transform: translate(-50%, -50%) scale(1.05);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(0.7);
        opacity: 0;
    }
}

/* Анимация появления текста по частям */
.fade-in-text {
    opacity: 0;
    animation: fadeInText 0.8s ease forwards;
}

@keyframes fadeInText {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для спиннера загрузки */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #688ea7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #7f8c8d;
    font-style: italic;
}


/* Адаптивность */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: 95%;
    }
    
    .modal-header {
        padding: 15px;
        min-height: 70px;
    }
    
    .modal-header h2 {
        font-size: 20px;
    }
    
    .modal-body {
        padding: 20px;
        max-height: 80vh;
    }
}

@media (max-width: 480px) {
    .modal-header h2 {
        font-size: 18px;
    }
    
    .close-btn {
        width: 35px;
        height: 35px;
        font-size: 24px;
    }
}