/* Сброс базовых стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Основной фон - ЧЁРНЫЙ */
body {
    font-family: 'Arial', sans-serif;
    background-color: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
    position: relative;
}

/* Контейнер для звёзд */
#stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Звёзды */
.star {
    position: absolute;
    background-color: #fff;
    border-radius: 50%;
    animation: twinkle 3s infinite;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* Контейнеры для слоёв */
#back-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 8;
    pointer-events: none;
}

#front-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 12;
    pointer-events: none;
}

/* Летающие объекты */
.flying-object {
    position: absolute;
    opacity: 0;
    transition: opacity 0.5s;
}

/* Контент (аватар, текст) */
.content {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    padding: 20px;
}

/* Аватар */
.avatar-container {
    margin-bottom: 30px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.avatar {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

/* Заголовок */
h1 {
    font-size: 2.5em;
    margin-bottom: 40px;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    letter-spacing: 2px;
    color: #fff;
}

/* Ссылки */
.links {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.link-btn {
    display: inline-block;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    text-align: center;
}

.link-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Кнопка Меню */
.menu-btn {
    margin-top: 20px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    width: 250px;
    max-width: 400px;
}

.menu-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.6);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Цитата внизу */
.citate-container {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    z-index: 10;
    padding: 10px;
}

.citate {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9em;
    line-height: 1.6;
    white-space: pre-wrap;
    font-family: 'Courier New', monospace;
    max-width: 80%;
    margin: 0 auto;
}

/* === ВЫЕЗЖАЮЩЕЕ МЕНЮ === */
#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

#sidebar-menu {
    position: fixed;
    top: 0;
    right: -400px;
    width: 350px;
    height: 100%;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    z-index: 9999;
    padding: 30px 20px 30px 20px;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
    transition: right 0.3s ease;
    overflow-y: auto;
}

#sidebar-menu.active {
    right: 0;
}

#menu-content {
    margin-top: 50px;
}

.sidebar-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2em;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sidebar-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.menu-item {
    margin-bottom: 15px;
}

.menu-item-header {
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    width: 100%;
    text-align: left;
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.menu-item-header:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.5);
}

.menu-item-header::after {
    content: '▼';
    font-size: 0.8em;
    transition: transform 0.3s ease;
}

.menu-item-header.collapsed::after {
    transform: rotate(-90deg);
}

.submenu-content {
    margin-top: 10px;
    padding-left: 10px;
    border-left: 2px solid rgba(102, 126, 234, 0.5);
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.submenu-content.collapsed {
    max-height: 0;
    opacity: 0;
    padding-left: 0;
    border-left: none;
}

.expandable-section {
    margin-bottom: 20px;
}

.expandable-header {
    padding: 12px;
    background: rgba(102, 126, 234, 0.2);
    color: white;
    border: none;
    border-radius: 8px;
    width: 100%;
    text-align: left;
    font-size: 1em;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.expandable-header:hover {
    background: rgba(102, 126, 234, 0.4);
}

.expandable-content {
    max-height: 500px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

.expandable-content.collapsed {
    max-height: 0;
    opacity: 0;
}

.project-link {
    display: block;
    padding: 10px 15px;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    font-size: 0.95em;
}

.project-link:hover {
    background: rgba(102, 126, 234, 0.3);
    transform: translateX(5px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

/* Убедимся, что фон действительно чёрный */
html, body {
    background-color: #000 !important;
    color: #fff !important;
}

/* Адаптивный дизайн для мобильных устройств */
@media (max-width: 768px) {
    /* Уменьшаем аватар на мобильных */
    .avatar {
        width: 250px;
        height: 250px;
    }
    
    /* Уменьшаем заголовок */
    h1 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    
    /* Уменьшаем кнопки - фиксированная ширина 100px */
    .link-btn {
        padding: 10px 20px;
        font-size: 0.9em;
        width: 100px;
    }
    
    .menu-btn {
        padding: 10px 20px;
        font-size: 0.9em;
        width: 100px;
    }
    
    /* Кнопки в один столбец */
    .links {
        flex-direction: column;
        gap: 10px;
        margin-top: 10px;
        align-items: center;
    }
    
    /* Цитата - теперь точно видна */
    .citate-container {
        position: relative;
        margin-top: 30px;
        padding: 15px;
        background-color: rgba(0, 0, 0, 0.3);
        border-radius: 10px;
        text-align: center;
        max-width: 90%;
        margin: 30px auto 20px;
    }
    
    /* Увеличиваем размер цитаты для лучшей читаемости */
    .citate {
        font-size: 0.95em;
        line-height: 1.5;
        white-space: pre-wrap;
    }
    
    /* Гарантируем, что контент не обрезается */
    .content {
        height: auto;
        min-height: auto;
        padding: 20px 15px;
        margin-bottom: 80px;
    }
    
    /* Уменьшаем звёзды на мобильных (опционально) */
    .star {
        width: 1px !important;
        height: 1px !important;
    }
    
    /* Мобильное меню */
    #sidebar-menu {
        width: 90%;
    }
}

/* Для очень маленьких экранов (телефоны в портретной ориентации) */
@media (max-width: 480px) {
    /* Увеличенный аватар (меньше чем на 768px) */
    .avatar {
        width: 200px;
        height: 200px;
    }
    
    /* Уменьшаем заголовок */
    h1 {
        font-size: 1.6em;
        margin-bottom: 15px;
    }
    
    /* Уменьшаем кнопки - фиксированная ширина 100px */
    .link-btn,
    .menu-btn {
        padding: 8px 15px;
        font-size: 0.85em;
        width: 100px;
    }
    
    /* Уменьшаем отступы */
    .content {
        padding: 15px;
    }
    
    .avatar-container {
        margin-bottom: 15px;
    }
    
    /* Увеличиваем отступ цитаты */
    .citate-container {
        margin-top: 20px;
        padding: 10px;
    }
    
    /* Уменьшаем размер цитаты */
    .citate {
        font-size: 0.85em;
    }
}

/* Стили для летающей тарелки */
.ufo {
  pointer-events: none;
  user-select: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.2s;
}