/* Сброс стилей */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Основные стили */
body, html {
    height: 100%;
    font-family: Arial, sans-serif;
    color: white;
    overflow-x: hidden;
}

/* Фоновая анимация */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('media/background.gif') no-repeat center center fixed;
    background-size: cover;
    z-index: -1;
}

/* Заголовок */
header {
    text-align: center;
    margin-top: 20px;
    position: relative;
}

header h1 {
    font-size: 2em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Обрамление для фото и иконок */
.profile-container {
    max-width: 400px;
    width: 90%;
    margin: 20px auto;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.profile-picture {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    z-index: 1;
    object-fit: cover;
    border: 3px solid white;
}

/* Социальные иконки */
.social-icon {
    width: 40px;
    height: 40px;
}

.social-icon.left {
    position: absolute;
    left: 20px;
}

.social-icon.right {
    position: absolute;
    right: 20px;
}

.social-icon img {
    width: 32px;
    height: 32px;
}

.social-icon:hover {
    transform: scale(1.1);
}

/* Мини-биография */
.bio-container {
    max-width: 400px;
    width: 90%;
    margin: 20px auto;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    text-align: center;
    color: white;
    font-size: 1em;
}

/* Лента проектов */
.carousel {
    width: 100%;
    overflow: hidden;
    cursor: grab;
    margin-top: 20px;
    min-height: 200px;  
}

.carousel:active {
    cursor: grabbing;
}

.carousel-inner {
    display: flex;
    align-items: center;
    transition: transform 0.5s ease;
    will-change: transform;
    min-height: 200px; 
}

/* Карточки проектов */
.project-card {
    width: 80%;
    max-width: 350px;
    height: 200px;
    background-size: cover;
    background-position: center;
    margin: 0 10px;
    border-radius: 10px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    background-blend-mode: darken;
    background-color: rgba(0, 0, 0, 0.5);
    transition: opacity 0.3s, transform 0.3s;
}

.project-info {
    width: 100%;
    text-align: center;
    padding: 10px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 0 0 10px 10px;
}

.project-name {
    font-size: 1.2em;
    cursor: pointer;
    transition: transform 0.3s;
    color: white;
}

.project-name:hover {
    transform: scale(1.05);
}

/* Золотой цвет для Best проекта (если понадобится) */
.project-name.best {
    color: gold !important;
}

.project-description {
    font-size: 0.9em;
    padding: 5px;
    color: white;
}

.carousel-inner .project-card {
    opacity: 0.4;
    transform: scale(0.8);
}

.carousel-inner .project-card.active {
    opacity: 1;
    transform: scale(1);
}

/* Контейнер для тегов и кнопки документов */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: center;
    max-width: 600px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 20px;
    border-radius: 20px;
    margin: 20px auto;
    position: sticky; /* теперь sticky */
    top: 0;           /* "прилипает" к верху при прокрутке */
    z-index: 1000;
}

/* Кнопка для документов */
.doc-button {
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
    transition: background 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-button:hover {
    background: rgba(255,255,255,0.2);
}

.doc-button img {
    width: 24px;
    height: 24px;
}

/* Стили для тегов */
.tag-button {
    padding: 8px 16px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

.tag-button.active,
.tag-button:hover {
    background-color: rgba(255, 255, 255, 0.4);
}

.reset-button {
    background-color: rgba(255, 0, 0, 0.6);
}

.reset-button.disabled {
    opacity: 0.5;
    cursor: default;
}

.reset-button:hover {
    background-color: rgba(255, 0, 0, 0.8);
}

.no-projects-message {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5em;
    text-align: center;
    height: 100%;
}

/* Всплывающее окно */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none; 
    background: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-content {
    background: rgba(0,0,0,0.8);
    width: 80%;
    max-width: 600px;
    max-height: 80%;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
    display: flex;
    flex-direction: column;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    color: white;
    cursor: pointer;
    z-index: 10000;
}

.close-button:hover {
    color: red;
}

.tabs {
    display: flex;
    background: rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin-top: 40px;
}

.tab-button {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    background: transparent;
    border: none;
    color: white;
    font-weight: bold;
    transition: background 0.3s;
}

.tab-button:hover {
    background: rgba(255,255,255,0.2);
}

.tab-button.active {
    background: rgba(255,255,255,0.3);
}

.tab-content {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
    line-height: 1.5;
}

.tab-content a {
    color: cyan; 
    text-decoration: underline; /* по желанию */
}

/* Специальные стили для тега "Best" */
.best-tag {
    background-color: rgba(255, 215, 0, 0.2); /* базовое состояние - светло-золотой полупрозрачный фон */
}

.tag-button.best-tag:hover,
.tag-button.best-tag.active {
    background-color: rgba(255, 215, 0, 0.4);
}

/* Адаптивность */
@media (max-width: 768px) {
    .profile-container {
        max-width: 300px;
        width: 90%;
        padding: 15px;
    }
    .profile-picture {
        width: 150px;
        height: 150px;
    }
    .project-card {
        max-width: 250px;
        height: 150px;
    }
    .bio-container {
        max-width: 300px;
        width: 90%;
    }
}

@media (max-width: 480px) {
    .profile-container {
        max-width: 280px;
        width: 90%;
        padding: 10px;
    }
    .profile-picture {
        width: 120px;
        height: 120px;
    }
    .project-card {
        max-width: 220px;
        height: 120px;
    }
    .bio-container {
        max-width: 280px;
        width: 90%;
    }
    .project-name {
        font-size: 1em;
    }
    .project-description {
        font-size: 0.8em;
    }
}

