@import url('https://fonts.googleapis.com/css2?family=Comfortaa:wght@300..700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Comfortaa", sans-serif;
    font-size: 16px;
    background-color: #262626;
    color: white;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body.no-scroll {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

/* Header Styles */
header {
    background-color: #1f1f1f;
    color: white;
    padding: 10px 15px;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    z-index: 1000;
    position: fixed;
    top: 0;
    left: 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-icon {
    width: 30px;
    height: 30px;
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.menu-icon span {
    width: 100%;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

.menu-icon.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-icon.active span:nth-child(2) {
    opacity: 0;
}

.menu-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.logo {
    height: 45px;
    width: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .logo {
        height: 45px;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 40px;
    }
}

@media (max-width: 320px) {
    .logo {
        height: 36px;
    }
}

/* New Search Styles */
.search-container {
    position: relative;
    flex-grow: 1;
    max-width: 600px;
    margin: 0 20px;
}

.search-box {
    display: flex;
    width: 100%;
    position: relative;
}

#searchInput {
    flex-grow: 1;
    padding: 12px 20px 12px 45px;
    border: none;
    border-radius: 30px;
    background-color: #333;
    color: #e0e0e0;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    font-family: "Comfortaa", sans-serif;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#searchInput:focus {
    background-color: #3a3a3a;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ffcc00;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: #262626;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.search-btn:hover {
    background-color: #ffdd33;
    transform: translateY(-50%) scale(1.05);
}

.search-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #2d2d2d;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.search-results.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.search-result-item {
    padding: 12px 20px;
    border-bottom: 1px solid #3a3a3a;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
}

.search-result-item:hover {
    background-color: #3a3a3a;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.search-result-item .info {
    flex: 1;
}

.search-result-item .name {
    font-weight: bold;
    margin-bottom: 3px;
}

.search-result-item .style {
    font-size: 0.85em;
    color: #aaa;
}

.highlight {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

.artist-highlight {
    animation: highlightFade 3s ease-out;
    position: relative;
}

@keyframes highlightFade {
    0% {
        box-shadow: 0 0 15px rgba(255, 204, 0, 0.8);
        transform: scale(1.02);
    }

    100% {
        box-shadow: 0 0 5px rgba(255, 204, 0, 0);
        transform: scale(1);
    }
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #ff6b6b;
    font-weight: bold;
}

.mobile-search-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
}

/* Improved Mobile Search */
@media (max-width: 768px) {
    .search-container {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        margin: 0;
        padding: 0;
        background: transparent;
        display: none;
        z-index: 1001;
        max-width: none;
    }

    .search-container.active {
        display: block;
        animation: slideDown 0.3s ease-out;
    }

    .mobile-search-btn {
        display: block;
    }

    #searchInput {
        padding: 14px 20px 14px 50px;
        font-size: 16px;
        border-radius: 30px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    .search-icon {
        left: 20px;
        font-size: 18px;
    }

    .search-btn {
        width: 40px;
        height: 40px;
    }

    .search-results {
        position: fixed;
        top: 80px;
        left: 10px;
        right: 10px;
        max-height: calc(100vh - 100px);
        border-radius: 10px;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Mobile search backdrop */
.search-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

@media (max-width: 768px) {
    .search-backdrop.active {
        display: block;
    }
}

/* Drawer Menu Styles */
.drawer {
     position: fixed;
    left: -250px;
    top: 60px; /* Было 40px, увеличиваем чтобы соответствовать header */
    width: 250px;
    height: calc(100vh - 60px); /* Учитываем высоту header */
    background: #1f1f1f;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    will-change: transform;
    margin: 0;
    padding: 0;
}

.drawer.open {
    transform: translateX(250px);
}

.overlay {
    position: fixed;
    top: 60px; /* Соответствуем высоте header */
    left: 0;
    width: 100%;
    height: calc(100% - 60px); /* Учитываем высоту header */
    background: rgba(0, 0, 0, 0.5);
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 998;
    pointer-events: none;
}

.overlay.active {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* Заменить стиль для body.menu-open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.menu {
    font-size: 18px;
    list-style: none;
    padding: 20px;
    margin: 0;
}

.menu li {
    position: relative;
    margin: 10px 0;
}

.menu a {
    text-decoration: none;
    color: white;
    display: flex;
    align-items: center;
    padding: 12px;
    transition: 0.2s;
    border-radius: 4px;
}

.menu a:hover {
    background: #2d2d2d;
}

.menu img {
    width: 28px;
    height: 28px;
    margin-right: 12px;
    object-fit: contain;
    transition: 0.3s;
}

.menu span {
    margin-left: 12px;
    transition: 0.3s;
}

.submenu {
    list-style: none;
    padding-left: 15px;
    max-height: 0;
    overflow: hidden;
    transition: 0.3s;
    background: #2d2d2d;
    margin-top: 5px;
    border-radius: 4px;
}

.submenu.active {
    max-height: 600px;
}

.submenu a {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px;
}

.submenu-link:hover {
    color: #ffcc00;
    text-decoration: underline;
}

.has-submenu::after {
    content: '▼';
    margin-left: auto;
    font-size: 12px;
    transition: 0.2s;
    color: white;
}

.has-submenu.active::after {
    transform: rotate(180deg);
}

.separator-menu {
    border-top: 2px solid #fff;
    margin: 10px 0;
}

/* Мобильный профиль пользователя */
.mobile-user-profile {
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: rgba(255, 204, 0, 0.1);
    border-bottom: 1px solid rgba(255, 204, 0, 0.2);
    margin-bottom: 15px;
}

.mobile-user-profile.active {
    display: flex;
}

.mobile-user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffcc00;
    margin-bottom: 10px;
}

.mobile-user-info {
    text-align: center;
    margin-bottom: 15px;
}

.mobile-user-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #ffcc00;
    margin-bottom: 5px;
}

.mobile-user-telegram {
    color: #aaa;
    font-size: 0.9em;
}

.mobile-user-actions {
    display: flex;
    gap: 10px;
    width: 100%;
}

.mobile-profile-btn {
    flex: 1;
    background: linear-gradient(45deg, #ffcc00, #ffdd33);
    color: #262626;
    border: none;
    padding: 10px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mobile-profile-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 204, 0, 0.3);
}

.mobile-logout-btn {
    flex: 1;
    background: transparent;
    color: #ff6b6b;
    border: 1px solid #ff6b6b;
    padding: 10px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.mobile-logout-btn:hover {
    background: rgba(255, 107, 107, 0.1);
}

@media (max-width: 768px) {
    .mobile-user-profile {
        display: flex;
    }
}

/* Banner Styles */
.banner {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
    margin-top: 60px;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1024px) {
    .banner {
        height: 300px;
    }
}

@media (max-width: 996px) {
    .banner {
        height: 300px;
    }
}

@media (max-width: 790px) {
    .banner {
        height: 290px;
    }
}

@media (max-width: 600px) {
    .banner {
        height: 200px;
    }
}

@media (max-width: 390px) {
    .banner {
        height: 140px;
    }
}

.black-stripe {
    width: 100%;
    height: 4px;
    background-color: #2d2d2d;
}

/* Filters Styles */
.filters-container {
    position: relative;
    margin: 20px 20px 0 0;
    display: flex;
    justify-content: flex-end;
}

.filters-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffcc00;
    color: #262626;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.filters-button:hover {
    background: #ffdd33;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.filters-dropdown {
    display: none;
    position: absolute;
    top: 45px;
    right: 0;
    background: #333;
    border-radius: 10px;
    padding: 10px 0;
    width: 200px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.filters-dropdown.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.filters-dropdown a {
    display: block;
    color: #e0e0e0;
    padding: 12px 20px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.filters-dropdown a:hover {
    background: #3a3a3a;
    color: #ffcc00;
    padding-left: 25px;
}

.active-filter {
    color: #ffcc00 !important;
    background: #404040 !important;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filters Styles */
.filters-container {
    position: relative;
    margin: 20px 20px 0 0;
    display: flex;
    justify-content: flex-end;
    z-index: 500;
    /* Добавляем z-index для правильного отображения */
}

.filters-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffcc00;
    color: #262626;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-size: 16px;
    /* Добавляем явный размер шрифта */
}

.filters-button svg {
    width: 16px;
    height: 16px;
    transition: all 0.3s ease;
}

/* Адаптация для планшетов */
@media (max-width: 768px) {
    .filters-container {
        margin: 15px 15px 0 0;
    }

    .filters-button {
        padding: 8px 16px;
        font-size: 14px;
    }

    .filters-button svg {
        width: 14px;
        height: 14px;
    }
}

/* Адаптация для мобильных */
@media (max-width: 480px) {
    .filters-container {
        margin: 10px 10px 0 0;
    }

    .filters-button {
        padding: 6px 12px;
        font-size: 12px;
        gap: 6px;
    }

    .filters-button svg {
        width: 12px;
        height: 12px;
    }

    .filters-dropdown {
        width: 160px;
        /* Уменьшаем ширину выпадающего меню */
        top: 40px;
        /* Корректируем позицию */
    }

    .filters-dropdown a {
        padding: 10px 15px;
        font-size: 12px;
    }
}

/* Artist Profile Styles */
.profile-section {
    display: flex;
    align-items: center;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    background-color: #2d2d2d;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-top: 30px;
    transition: all 0.5s ease;
    opacity: 1;
    transform: translateY(0);
}

.profile-section.hidden {
    opacity: 0;
    transform: translateY(-20px);
    height: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
    overflow: hidden;
    border: none;
}

.avatar {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin-right: 16px;
    object-fit: cover;
    border: 4px solid #ffcc00;
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.4),
        0 0 0 8px rgba(45, 45, 45, 0.7);
    filter: brightness(1.05) contrast(1.1);
    position: relative;
    z-index: 2;
}

.avatar-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin-right: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.avatar-border {
    position: absolute;
    width: calc(100% + 12px);
    height: calc(100% + 12px);
    border-radius: 50%;
    background: linear-gradient(45deg,
            #ff0000, #ff7300, #fffb00, #48ff00,
            #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    background-size: 400% 400%;
    animation: gradientBorder 8s ease infinite;
    z-index: 1;
    filter: blur(5px);
    opacity: 0.7;
}

.avatar-border::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: 50%;
    background: linear-gradient(45deg,
            #ff0000, #ff7300, #fffb00, #48ff00,
            #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000);
    background-size: 400% 400%;
    animation: gradientBorder 8s ease infinite;
    z-index: -1;
    filter: blur(10px);
    opacity: 0.5;
}

@keyframes gradientBorder {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.avatar:hover {
    transform: scale(1.03);
}

/* Стили для кнопки профиля */
.profile-button {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ffcc00;
    color: #262626;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 3;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.avatar-container:hover .profile-button {
    opacity: 1;
    bottom: -15px;
}

.avatar-container {
    cursor: pointer;
    position: relative;
}

.avatar-container:hover .avatar {
    transform: scale(1.03);
}

@media (max-width: 768px) {

    .profile-button {
        font-size: 0.8rem;
        padding: 5px 12px;
    }
}

@media (max-width: 480px) {

    .profile-button {
        font-size: 0.7rem;
        padding: 4px 10px;
        opacity: 1;
        bottom: -10px;
    }
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .profile-section {
        flex-direction: column;
        text-align: center;
        padding: 30px 15px;
        min-height: auto;
    }

    .avatar-container {
        margin-right: 0;
        margin-bottom: 20px;
    }

    .profile-info {
        padding: 0;
    }
}

@media (max-width: 480px) {
    .avatar-container {
        width: 120px;
        height: 120px;
    }

    .avatar {
        width: 120px;
        height: 120px;
        border-width: 3px;
    }
}

.profile-info {
    flex: 1;
}

.profile-info h1 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #ffcc00;
    word-break: break-word;
}

.profile-info a {
    color: #ffcc00;
    text-decoration: none;
    font-size: 1.2em;
    display: block;
    margin-bottom: 10px;
    transition: opacity 0.3s;
    word-break: break-all;
}

.profile-info a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.profile-info p {
    font-size: 1.1em;
    color: #e0e0e0;
    word-break: break-word;
}

.favorite-works {
    text-align: center;
    padding: 30px 0 20px;
    width: 100%;
    color: white;
    font-size: 2em;
    margin-top: 30px;
    transition: all 0.5s ease;
    word-break: break-word;
}

.favorite-works.hidden {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
    overflow: hidden;
}

/* Works Carousel Styles */
.works-carousel {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    padding: 0 60px;
    transition: all 0.5s ease;
}

.works-carousel.hidden {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
    overflow: hidden;
}

.works-inner {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
    padding: 20px 0;
    gap: 20px;
}

.work-thumb {
    width: 400px;
    height: 260px;
    object-fit: scale-down;
    border-radius: 10px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.work-thumb-1 {
    width: 300px;
    height: 260px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.work-thumb-2 {
    width: 300px;
    height: 260px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.work-thumb-3 {
    width: 200px;
    height: 260px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.work-thumb-1:hover,
.work-thumb:hover,
.work-thumb-2:hover,
.work-thumb-3:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.works-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.works-control:hover {
    background: rgba(0, 0, 0, 0.9);
}

.works-control.prev {
    left: 10px;
}

.works-control.next {
    right: 10px;
}

/* Show Works Button */
.show-works-btn {
    display: block;
    margin: 20px auto;
    padding: 12px 30px;
    background: #ffcc00;
    color: #262626;
    border: none;
    cursor: pointer;
    font-size: 16px;
    border-radius: 25px;
    transition: all 0.5s ease;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 90%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.show-works-btn.hidden {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
    overflow: hidden;
}

.show-works-btn:hover {
    background: #ffdd33;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    overflow-y: auto;
    z-index: 1000;
    padding: 20px;
}

.modal-header {
    color: white;
    text-align: center;
    padding: 30px 20px 20px;
    font-size: 24px;
}

.modal-content {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.modal-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.modal-img:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
}

.close-btn {
    position: fixed;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1001;
}

.close-btn:hover,
.close-btn:focus {
    color: #ffcc00;
    text-decoration: none;
    cursor: pointer;
}

/* Image Modal Styles - ОБНОВЛЕННЫЕ СТИЛИ */
.image-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 1100;
    overflow: hidden;
    touch-action: none;
}

.image-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-modal-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: grab;
}

.image-modal-img:active {
    cursor: grabbing;
}

.image-close-btn {
    position: fixed;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 1101;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-close-btn:hover {
    color: #ffcc00;
    background: rgba(255, 204, 0, 0.2);
}

.modal-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1101;
    opacity: 0.6;
    transition: opacity 0.2s;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 60px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.modal-nav-btn:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

.image-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 15px;
    border-radius: 20px;
    z-index: 1101;
}

@keyframes zoom {
    from {
        transform: scale(0);
    }

    to {
        transform: scale(1);
    }
}

/* Footer */
.footer-container {
    background-color: #1f1f1f;
    padding: 30px 15px;
    margin-top: auto;
    width: 100%;
}

.footer-main-section {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid #333;
}

.footer-brand-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.footer-brand-link:hover {
    transform: scale(1.05);
}

.footer-brand-logo {
    height: 36px;
    width: auto;
}

.footer-navigation {
    display: flex;
    gap: 20px;
}

.footer-nav-item {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s ease;
}

.footer-nav-item:hover {
    color: #FFD700;
}

.footer-nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #FFD700;
    transition: width 0.3s ease;
}

.footer-nav-item:hover::after {
    width: 100%;
}

.footer-secondary-section {
    max-width: 1200px;
    margin: 20px auto 0;
    text-align: center;
}

.footer-copyright {
    color: #aaa;
    font-size: 0.85rem;
}

.footer-social-links {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
}

.social-media-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.social-media-icon:hover {
    background-color: #FFD700;
    transform: translateY(-3px);
}

.social-media-icon:hover svg {
    fill: #333;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .footer-main-section {
        flex-direction: column;
        gap: 15px;
    }

    .footer-navigation {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
}

/* Back to Top Button */
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #ffcc00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.back-to-top-btn:hover {
    background-color: #ffdd33;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.back-to-top-btn.active {
    opacity: 1;
    visibility: visible;
}

/* Social Links */
.social-links {
    --icon-size: 2rem;
    --icon-gap: 0.75rem;
    --hover-scale: 1.15;
    --active-scale: 0.95;
    --transition-duration: 0.2s;

    display: flex;
    gap: var(--icon-gap);
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
    justify-content: flex-start;
    flex-wrap: wrap;
    width: 100%;
}

.social-link {
    display: block;
    width: var(--icon-size);
    height: var(--icon-size);
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    transform: scale(1);
    transition:
        transform var(--transition-duration) ease,
        filter var(--transition-duration) ease;
    will-change: transform;
    filter: grayscale(20%) brightness(0.9);
}

.social-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.social-link:hover {
    transform: scale(var(--hover-scale));
    filter: grayscale(0%) brightness(1.05);
    z-index: 1;
}

.social-link:active {
    transform: scale(var(--active-scale));
}

/* Profile Link */
.profile-link {
    color: #ffcc00;
    text-decoration: none;
    font-size: 1.2em;
    display: inline-flex;
    align-items: center;
    margin-bottom: 15px;
    transition: all 0.3s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.profile-link:hover {
    color: #fff;
    text-decoration: underline;
}

.profile-link-icon {
    width: 20px;
    height: 20px;
    margin-left: 8px;
    filter: brightness(0.9);
}

/* Responsive Styles */
@media (max-width: 1024px) {
    .work-thumb {
        width: 220px;
        height: 220px;
    }

    .work-thumb-1 {
        width: 300px;
        height: 220px;
    }

    .work-thumb-2 {
        width: 220px;
        height: 220px;
    }

    .work-thumb-3 {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 900px) {
    .footer-links {
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .profile-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px 15px;
    }

    .avatar {
        width: 150px;
        height: 150px;
        margin: 0 0 20px 0;
    }

    .profile-info h1 {
        font-size: 1.8em;
    }

    .profile-info a {
        font-size: 1em;
    }

    .profile-info p {
        font-size: 1em;
    }

    .favorite-works {
        font-size: 1.8em;
        padding: 25px 0 15px;
    }

    .modal-header {
        font-size: 20px;
        padding: 20px 15px;
    }

    .modal-content {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }

    .modal-img {
        height: 200px;
    }

    .works-carousel {
        padding: 0 15px !important;
    }

    .work-thumb {
        width: 180px;
        height: 180px;
    }

    .work-thumb-1 {
        width: 260px;
        height: 180px;
    }

    .work-thumb-2 {
        width: 180px;
        height: 180px;
    }

    .work-thumb-3 {
        width: 180px;
        height: 180px;
    }

    .works-control {
        display: none !important;
    }

    .footer-content {
        flex-direction: column;
        gap: 30px;
        text-align: center;
        padding-bottom: 30px;
    }

    .footer-section {
        flex-direction: column;
        gap: 20px;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px 30px;
    }

    .footer-link {
        font-size: 0.95rem;
    }

    .update-text {
        font-size: 0.95rem;
    }

    .back-to-top-btn {
        width: 40px;
        height: 40px;
        bottom: 20px;
        right: 20px;
    }

    .social-links {
        justify-content: center;
    }

    /* Адаптация модального окна изображений для мобильных */
    .modal-nav-btn {
        display: none;
    }

    .image-modal-img {
        max-width: 95%;
        max-height: 95%;
    }

    .image-close-btn {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    .image-counter {
        bottom: 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .profile-section {
        padding: 20px 10px;
    }

    .avatar {
        width: 120px;
        height: 120px;
        border-width: 3px;
    }

    .profile-info h1 {
        font-size: 1.5em;
        margin-bottom: 8px;
    }

    .profile-info a {
        font-size: 0.9em;
        margin-bottom: 8px;
    }

    .profile-info p {
        font-size: 0.9em;
    }

    .favorite-works {
        font-size: 1.5em;
        padding: 20px 0 10px;
    }

    .modal-header {
        font-size: 18px;
        padding: 15px 10px;
    }

    .modal-content {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .modal-img {
        height: 150px;
    }

    .close-btn {
        font-size: 30px;
        right: 20px;
    }

    .works-carousel {
        padding: 0 40px;
    }

    .work-thumb {
        width: 150px;
        height: 150px;
    }

    .work-thumb-1 {
        width: 230px;
        height: 150px;
    }

    .work-thumb-2 {
        width: 150px;
        height: 150px;
    }

    .work-thumb-3 {
        width: 150px;
        height: 150px;
    }

    .works-control {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    .site-footer {
        padding: 30px 15px 20px;
    }

    .footer-links {
        flex-direction: column;
        gap: 15px;
    }

    .footer-link {
        font-size: 0.9rem;
        padding: 4px 0;
    }

    .update-text {
        font-size: 0.9rem;
    }

    .footer-logo {
        height: 30px;
    }

    .social-link {
        font-size: 1.2rem;
    }

    .social-links {
        gap: 12px;
    }

    .image-modal-img {
        max-width: 95%;
        max-height: 85vh;
    }

    .image-close-btn {
        font-size: 30px;
        right: 20px;
        top: 15px;
    }

    .show-works-btn {
        padding: 8px 20px;
        font-size: 14px;
        margin: 10px auto;
        white-space: normal;
        max-width: 95%;
    }

    .show-works-btn:hover {
        transform: none;
        background: #ffcc00;
    }

    .show-works-btn:active {
        background: #ffdd33;
        transform: translateY(1px);
    }
}

/* Добавим начальные стили и анимации */
.profile-section,
.favorite-works,
.works-carousel,
.show-works-btn {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.profile-section.visible,
.favorite-works.visible,
.works-carousel.visible,
.show-works-btn.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Модифицируем скрытие элементов */
.profile-section.hidden {
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    overflow: hidden;
    transition: all 0.4s ease;
}

/* Анимация для модальных окон */
.modal-content img {
    opacity: 0;
    transform: scale(0.95);
    transition: all 0.3s ease;
}

.modal-content img.visible {
    opacity: 1;
    transform: scale(1);
}

/* Header Auth Buttons Styles - ОБНОВЛЕННЫЕ СТИЛИ */
.header-auth {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.auth-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    border: none;
    white-space: nowrap;
}

.login-btn {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.login-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.register-btn {
    background: linear-gradient(45deg, #ffcc00, #ffdd33);
    color: #262626;
}

.register-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.3);
}

/* ОБНОВЛЕННЫЙ СТИЛЬ ДЛЯ КНОПКИ ПОЛЬЗОВАТЕЛЯ */
.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(45deg, #2d2d2d, #3a3a3a);
    color: white;
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    border: 1px solid rgba(255, 204, 0, 0.3);
    white-space: nowrap;
    text-decoration: none;
    position: relative;
}

.user-profile-btn:hover {
    background: linear-gradient(45deg, #3a3a3a, #4a4a4a);
    border-color: rgba(255, 204, 0, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.2);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffcc00;
}

.user-name {
    font-weight: 600;
    color: #ffcc00;
}

/* Выпадающее меню профиля для ПК */
.user-profile-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #2d2d2d;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    width: 200px;
    padding: 10px 0;
    margin-top: 10px;
    display: none;
    z-index: 1000;
    border: 1px solid rgba(255, 204, 0, 0.2);
}

.user-profile-dropdown.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.user-profile-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #e0e0e0;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-family: "Comfortaa", sans-serif;
    font-size: 14px;
}

.user-profile-dropdown-item:hover {
    background: rgba(255, 204, 0, 0.1);
    color: #ffcc00;
}

.user-profile-dropdown-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.user-profile-dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 5px 0;
}

/* Mobile auth in menu */
.mobile-auth {
    display: none;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

.mobile-auth .auth-btn {
    width: 100%;
    text-align: center;
    padding: 12px;
}

/* Registration Modal Styles */
.registration-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
    -webkit-overflow-scrolling: touch;
}

.registration-modal-content {
    position: relative;
    background: linear-gradient(135deg, #2d2d2d 0%, #1f1f1f 100%);
    margin: 5% auto;
    padding: 25px 20px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    animation: modalSlideIn 0.4s ease-out;
    border: 1px solid rgba(255, 204, 0, 0.2);
    min-height: auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.registration-modal-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.registration-modal-title {
    font-size: clamp(1.4em, 5vw, 1.8em);
    background: linear-gradient(45deg, #ffcc00, #ffdd33);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    font-weight: bold;
    line-height: 1.3;
    padding: 0 10px;
}

.registration-modal-subtitle {
    color: #e0e0e0;
    font-size: clamp(0.9em, 3.5vw, 1em);
    line-height: 1.4;
    padding: 0 10px;
}

.registration-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    color: #ffcc00;
    font-weight: bold;
    font-size: clamp(0.9em, 3.5vw, 0.95em);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #444;
    border-radius: 10px;
    background: #333;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: "Comfortaa", sans-serif;
    box-sizing: border-box;
    -webkit-appearance: none;
}

.form-input:focus {
    outline: none;
    border-color: #ffcc00;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.2);
    background: #3a3a3a;
}

.submit-btn {
    background: linear-gradient(45deg, #ffcc00, #ffdd33);
    color: #262626;
    border: none;
    padding: 16px;
    font-size: clamp(1em, 4vw, 1.1em);
    font-weight: bold;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.submit-btn:hover {
    background: linear-gradient(45deg, #ffdd33, #ffcc00);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.instructions {
    background: rgba(51, 51, 51, 0.7);
    padding: 18px;
    border-radius: 10px;
    margin-top: 20px;
    text-align: left;
    border-left: 3px solid #ffcc00;
}

.instructions-title {
    color: #ffcc00;
    margin-bottom: 10px;
    font-weight: bold;
    font-size: clamp(1em, 4vw, 1.1em);
}

.instructions-list {
    list-style-type: decimal;
    padding-left: 20px;
    color: #e0e0e0;
    margin-bottom: 0;
    font-size: clamp(0.85em, 3.5vw, 0.9em);
}

.instructions-list li {
    margin-bottom: 8px;
    line-height: 1.4;
}

.instructions-link {
    color: #ffcc00;
    text-decoration: none;
    transition: all 0.2s ease;
    word-break: break-all;
}

.instructions-link:hover {
    text-decoration: underline;
    color: #ffdd33;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 24px;
    color: #aaa;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 10;
}

.close-modal:hover {
    color: #ffcc00;
    background: rgba(255, 204, 0, 0.1);
}

.message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    display: none;
    font-weight: bold;
    animation: fadeIn 0.3s ease;
    font-size: clamp(0.9em, 3.5vw, 1em);
}

.message.success {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.message.error {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.bot-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px 0;
    padding: 10px;
    background: rgba(255, 204, 0, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 204, 0, 0.2);
    flex-wrap: wrap;
}

.bot-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.bot-link {
    color: #ffcc00;
    font-weight: bold;
    text-decoration: none;
    word-break: break-all;
    text-align: center;
}

.bot-link:hover {
    text-decoration: underline;
}

/* УЛУЧШЕННАЯ АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ */
@media (max-width: 768px) {
    .header-auth {
        display: none;
    }

    .mobile-auth {
        display: flex;
    }

    .registration-modal-content {
        margin: 10% auto;
        padding: 20px 16px;
        width: 95%;
        max-width: 400px;
        border-radius: 14px;
    }

    .registration-modal-title {
        margin-bottom: 6px;
    }

    .form-input {
        padding: 12px 14px;
        font-size: 16px;
    }

    .submit-btn {
        padding: 14px;
        min-height: 52px;
    }

    .instructions {
        padding: 15px;
        margin-top: 15px;
    }

    .instructions-list {
        padding-left: 18px;
    }

    .bot-info {
        padding: 8px;
        gap: 6px;
    }

    .user-profile-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .user-avatar {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .registration-modal-content {
        margin: 5% auto;
        padding: 18px 14px;
        border-radius: 12px;
        width: 92%;
    }

    .registration-modal-title {
        font-size: 1.3em;
    }

    .registration-modal-subtitle {
        font-size: 0.9em;
    }

    .registration-form {
        gap: 15px;
    }

    .form-input {
        padding: 11px 13px;
    }

    .submit-btn {
        padding: 13px;
        min-height: 50px;
        font-size: 1em;
    }

    .instructions {
        padding: 12px;
        margin-top: 12px;
    }

    .instructions-list {
        padding-left: 16px;
    }

    .instructions-list li {
        margin-bottom: 6px;
    }

    .close-modal {
        top: 8px;
        right: 12px;
        width: 28px;
        height: 28px;
        font-size: 20px;
    }

    .bot-info {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
}

@media (max-width: 360px) {
    .registration-modal-content {
        padding: 15px 12px;
        margin: 3% auto;
    }

    .form-input {
        padding: 10px 12px;
    }

    .submit-btn {
        padding: 12px;
        min-height: 48px;
        font-size: 0.95em;
    }
}

/* Специальные стили для очень высоких экранов */
@media (min-height: 800px) and (max-width: 768px) {
    .registration-modal-content {
        margin: 15% auto;
    }
}

/* Предотвращение масштабирования на iOS при фокусе */
@media screen and (max-width: 768px) {
    .form-input {
        font-size: 16px !important;
    }
}

/* Улучшение для landscape режима на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
    .registration-modal-content {
        margin: 2% auto;
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* Для очень маленьких экранов в portrait режиме */
@media (max-width: 320px) {
    .registration-modal-content {
        padding: 12px 10px;
    }

    .form-input {
        padding: 9px 11px;
    }

    .submit-btn {
        padding: 11px;
        min-height: 46px;
    }
}

/* Плавная анимация для всех интерактивных элементов */
.auth-btn,
.submit-btn,
.form-input,
.close-modal {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Улучшение доступности для фокуса */
.auth-btn:focus-visible,
.submit-btn:focus-visible,
.form-input:focus-visible {
    outline: 2px solid #ffcc00;
    outline-offset: 2px;
}

/* Поддержка prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {

    .auth-btn,
    .submit-btn,
    .form-input,
    .close-modal,
    .message {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .auth-btn:hover,
    .submit-btn:hover {
        transform: none;
    }
}

/* Profile Setup Modal Styles */
.profile-setup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 3000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
    -webkit-overflow-scrolling: touch;
}

.profile-setup-content {
    position: relative;
    background: linear-gradient(135deg, #2d2d2d 0%, #1f1f1f 100%);
    margin: 2% auto;
    padding: 30px 25px;
    border-radius: 16px;
    max-width: 700px;
    width: 95%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    animation: modalSlideIn 0.4s ease-out;
    border: 1px solid rgba(255, 204, 0, 0.3);
    min-height: auto;
}

.profile-setup-header {
    text-align: center;
    margin-bottom: 25px;
    position: relative;
}

.profile-setup-title {
    font-size: clamp(1.6em, 5vw, 2em);
    background: linear-gradient(45deg, #ffcc00, #ffdd33);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    font-weight: bold;
    line-height: 1.3;
}

.profile-setup-subtitle {
    color: #e0e0e0;
    font-size: clamp(0.95em, 3.5vw, 1.1em);
    line-height: 1.4;
}

.profile-setup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-section {
    background: rgba(51, 51, 51, 0.6);
    padding: 20px;
    border-radius: 12px;
    border-left: 3px solid #ffcc00;
}

.section-title {
    color: #ffcc00;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: clamp(1.1em, 4vw, 1.3em);
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title svg {
    width: 20px;
    height: 20px;
}

.avatar-upload-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffcc00;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #444;
    color: #888;
    font-size: 14px;
    text-align: center;
    padding: 10px;
}

.upload-btn {
    background: linear-gradient(45deg, #ffcc00, #ffdd33);
    color: #262626;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: clamp(0.9em, 3.5vw, 1em);
}

.upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.3);
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    text-align: left;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    color: #ffcc00;
    font-weight: bold;
    font-size: clamp(0.9em, 3.5vw, 0.95em);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #444;
    border-radius: 8px;
    background: #333;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: "Comfortaa", sans-serif;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #ffcc00;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.2);
    background: #3a3a3a;
}

/* Стили для заблокированного поля описания */
.form-textarea.disabled {
    background: #2a2a2a;
    color: #888;
    border-color: #555;
    cursor: not-allowed;
    resize: none;
}

.form-textarea.disabled::placeholder {
    color: #666;
}

/* Стили для социальных сетей */
.social-link-input {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    background: rgba(68, 68, 68, 0.3);
    border-radius: 8px;
    border: 1px solid #555;
    transition: all 0.3s ease;
}

.social-link-input:hover {
    border-color: #777;
}

.social-platform-select {
    min-width: 140px;
    flex-shrink: 0;
    background: #444;
    border: 2px solid #555;
    border-radius: 6px;
    padding: 10px;
    color: white;
    font-family: "Comfortaa", sans-serif;
    cursor: pointer;
}

.social-platform-select:focus {
    outline: none;
    border-color: #ffcc00;
}

.social-link-input-group {
    display: flex;
    flex: 1;
    gap: 8px;
    align-items: center;
}

.social-link-prefix {
    color: #aaa;
    font-size: 14px;
    white-space: nowrap;
    flex-shrink: 0;
}

.social-link-input-field {
    flex: 1;
    min-width: 0;
}

.social-limit-warning {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 5px;
    text-align: center;
    display: none;
}

.social-limit-warning.show {
    display: block;
}

.add-social-btn.disabled {
    background: transparent;
    color: #666;
    border: 2px dashed #666;
    cursor: not-allowed;
}

.add-social-btn.disabled:hover {
    background: transparent;
    transform: none;
    box-shadow: none;
}

/* Стили для счетчика работ */
.works-counter {
    color: #aaa;
    font-size: 12px;
    text-align: right;
    margin-top: 5px;
}

.works-counter.warning {
    color: #ffcc00;
}

.works-counter.error {
    color: #ff6b6b;
}

/* Автоматическое изменение высоты текстового поля */
.form-textarea {
    min-height: 80px;
    resize: none;
    overflow-y: hidden;
    line-height: 1.5;
    transition: height 0.2s ease-out;
}

.social-links-setup {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-link-input {
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-icon-select {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #444;
    border: 2px solid #555;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.social-icon-select.active {
    border-color: #ffcc00;
    background: rgba(255, 204, 0, 0.1);
}

.social-icon-select img {
    width: 20px;
    height: 20px;
    filter: brightness(0.8);
}

.social-icon-select.active img {
    filter: brightness(1);
}

.add-social-btn {
    background: transparent;
    color: #ffcc00;
    border: 2px dashed #ffcc00;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    margin-top: 5px;
}

.add-social-btn:hover {
    background: rgba(255, 204, 0, 0.1);
}

/* Стили для загрузки работ по ссылкам */
.works-link-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.work-link-preview {
    width: 100%;
    height: 100px;
    border-radius: 8px;
    background: #444;
    border: 2px solid #666;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.work-link-preview:hover {
    border-color: #ffcc00;
}

.work-link-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.work-link-placeholder {
    color: #888;
    font-size: 12px;
    text-align: center;
    padding: 10px;
}

.work-link-input-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.work-link-input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

.work-link-input {
    flex: 1;
}

.add-work-link-btn {
    background: linear-gradient(45deg, #ffcc00, #ffdd33);
    color: #262626;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.add-work-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.3);
}

.add-work-link-btn.disabled {
    background: #666;
    color: #aaa;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.work-link-hint {
    color: #aaa;
    font-size: 12px;
    margin-top: 5px;
    text-align: center;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 20px;
    flex-wrap: wrap;
}

.save-btn {
    background: linear-gradient(45deg, #ffcc00, #ffdd33);
    color: #262626;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: clamp(1em, 4vw, 1.1em);
    min-width: 160px;
}

.save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.4);
}

.skip-btn {
    background: transparent;
    color: #aaa;
    border: 2px solid #666;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: clamp(1em, 4vw, 1.1em);
}

.skip-btn:hover {
    color: #ffcc00;
    border-color: #ffcc00;
}

.remove-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 5px;
}

.remove-btn:hover {
    background: #d32f2f;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .profile-setup-content {
        margin: 5% auto;
        padding: 20px 15px;
        width: 95%;
        max-width: 500px;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
    }

    .form-section {
        padding: 15px;
    }

    .avatar-preview {
        width: 100px;
        height: 100px;
    }

    .works-link-container {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .work-link-preview {
        height: 80px;
    }

    .form-actions {
        flex-direction: column;
    }

    .save-btn,
    .skip-btn {
        width: 100%;
        min-width: auto;
    }

    .social-link-input {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .social-platform-select {
        min-width: 100%;
    }

    .social-link-input-group {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    .social-link-prefix {
        text-align: center;
    }

    .work-link-input-group {
        flex-direction: column;
        align-items: stretch;
    }

    .add-work-link-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .profile-setup-content {
        margin: 3% auto;
        padding: 15px 12px;
    }

    .social-link-input {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .social-icon-select {
        width: 35px;
        height: 35px;
    }

    .works-link-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {

    /* Скрываем стрелки навигации в модальных окнах изображений */
    .modal-nav-btn,
    .works-control,
    .profile-works-modal-nav,
    .cabinet-fullscreen-nav {
        display: none !important;
    }

    /* Увеличиваем область для свайпа */
    .image-modal-img,
    .profile-works-modal-img,
    .cabinet-fullscreen-img {
        cursor: default;
    }

    /* Улучшаем отображение на мобильных */
    .image-modal-content,
    .profile-works-modal-content,
    .cabinet-fullscreen-content {
        padding: 10px;
    }
}

/* Дополнительные улучшения для мобильного UX */
@media (max-width: 480px) {

    .image-close-btn,
    .profile-works-modal-close,
    .cabinet-fullscreen-close {
        top: 10px;
        right: 10px;
        width: 35px;
        height: 35px;
        font-size: 24px;
    }

    .image-counter,
    .profile-works-modal-counter,
    .cabinet-fullscreen-counter {
        bottom: 10px;
        font-size: 12px;
        padding: 3px 10px;
    }
}

/* Стили для полноэкранного просмотра работ в модальном окне регистрации */
.profile-works-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 4000;
    overflow: hidden;
}

.profile-works-modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-works-modal-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
    cursor: grab;
}

.profile-works-modal-img:active {
    cursor: grabbing;
}

.profile-works-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.profile-works-modal-close:hover {
    background: rgba(255, 0, 0, 0.7);
    transform: scale(1.1);
}

.profile-works-modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.profile-works-modal-nav:hover {
    background: rgba(255, 204, 0, 0.7);
    transform: translateY(-50%) scale(1.1);
}

.profile-works-modal-prev {
    left: 30px;
}

.profile-works-modal-next {
    right: 30px;
}

.profile-works-modal-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 16px;
    font-weight: bold;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .profile-works-modal-nav {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .profile-works-modal-prev {
        left: 15px;
    }

    .profile-works-modal-next {
        right: 15px;
    }

    .profile-works-modal-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    .profile-works-modal-counter {
        bottom: 20px;
        font-size: 14px;
    }
}

/* ОБНОВЛЕННЫЙ ДИЗАЙН ЛИЧНОГО КАБИНЕТА */
.personal-cabinet-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 5000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

.personal-cabinet-content {
    position: relative;
    background: linear-gradient(135deg, #2d2d2d 0%, #1f1f1f 100%);
    margin: 2% auto;
    padding: 30px 25px;
    border-radius: 16px;
    max-width: 800px;
    width: 95%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    animation: modalSlideIn 0.4s ease-out;
    border: 1px solid rgba(255, 204, 0, 0.3);
}

.personal-cabinet-header {
    text-align: center;
    margin-bottom: 25px;
}

.personal-cabinet-title {
    font-size: clamp(1.6em, 5vw, 2em);
    background: linear-gradient(45deg, #ffcc00, #ffdd33);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    font-weight: bold;
}

.personal-cabinet-subtitle {
    color: #e0e0e0;
    font-size: clamp(0.95em, 3.5vw, 1.1em);
    line-height: 1.4;
}

/* ОБНОВЛЕННЫЙ ДИЗАЙН ЛИЧНОГО КАБИНЕТА */
.cabinet-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 20px 0;
}

.cabinet-profile-section {
    background: rgba(51, 51, 51, 0.7);
    border-radius: 12px;
    padding: 25px;
    border-left: 3px solid #ffcc00;
}

.cabinet-profile-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    position: relative;
}

.cabinet-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ffcc00;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.cabinet-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cabinet-username {
    font-size: 1.8em;
    color: #ffcc00;
    margin-bottom: 0;
    font-weight: bold;
}

.cabinet-user-id {
    color: #aaa;
    font-size: 0.9em;
    margin-bottom: 0;
}

.cabinet-telegram-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #ffcc00;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    padding: 8px 15px;
    background: rgba(255, 204, 0, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 204, 0, 0.3);
    width: fit-content;
}

.cabinet-telegram-link:hover {
    background: rgba(255, 204, 0, 0.2);
    transform: translateY(-2px);
}

.cabinet-telegram-icon {
    width: 20px;
    height: 20px;
}

.cabinet-section {
    background: rgba(51, 51, 51, 0.7);
    border-radius: 12px;
    padding: 20px;
    border-left: 3px solid #ffcc00;
}

.cabinet-section-title {
    font-size: 1.3em;
    color: #ffcc00;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cabinet-section-title svg {
    width: 20px;
    height: 20px;
}

.cabinet-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.cabinet-social-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e0e0e0;
    text-decoration: none;
    padding: 8px 15px;
    background: rgba(68, 68, 68, 0.5);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.cabinet-social-link:hover {
    background: rgba(255, 204, 0, 0.2);
    color: #ffcc00;
}

.cabinet-social-icon {
    width: 20px;
    height: 20px;
}

.cabinet-description {
    color: #e0e0e0;
    line-height: 1.6;
    padding: 15px;
    background: rgba(68, 68, 68, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: rgba(68, 68, 68, 0.3);
    border-radius: 8px;
    border: 2px dashed #666;
    text-align: center;
}

.premium-icon {
    font-size: 2em;
    color: #ffcc00;
}

.premium-text {
    color: #aaa;
    font-size: 0.9em;
}

.cabinet-works-btn {
    background: linear-gradient(45deg, #ffcc00, #ffdd33);
    color: #262626;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: 1em;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px auto 0;
}

.cabinet-works-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.4);
}

.cabinet-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
}

.cabinet-action-btn {
    background: linear-gradient(45deg, #ffcc00, #ffdd33);
    color: #262626;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: clamp(1em, 4vw, 1.1em);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cabinet-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.4);
}

.cabinet-action-btn.secondary {
    background: transparent;
    color: #aaa;
    border: 2px solid #666;
}

.cabinet-action-btn.secondary:hover {
    color: #ffcc00;
    border-color: #ffcc00;
}

/* Модальное окно для работ в личном кабинете */
.cabinet-works-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 6000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

.cabinet-works-content {
    position: relative;
    background: linear-gradient(135deg, #2d2d2d 0%, #1f1f1f 100%);
    margin: 2% auto;
    padding: 30px 25px;
    border-radius: 16px;
    max-width: 1000px;
    width: 95%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    animation: modalSlideIn 0.4s ease-out;
    border: 1px solid rgba(255, 204, 0, 0.3);
}

.cabinet-works-header {
    text-align: center;
    margin-bottom: 25px;
}

.cabinet-works-title {
    font-size: clamp(1.6em, 5vw, 2em);
    background: linear-gradient(45deg, #ffcc00, #ffdd33);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    font-weight: bold;
}

.cabinet-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.cabinet-work-item {
    width: 100%;
    height: 150px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.cabinet-work-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cabinet-work-item:hover img {
    transform: scale(1.05);
}

.cabinet-work-item:hover {
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.3);
}

/* Модальное окно для полноэкранного просмотра работ в личном кабинете */
.cabinet-fullscreen-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 7000;
    overflow: hidden;
    touch-action: none;
}

.cabinet-fullscreen-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cabinet-fullscreen-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    transition: transform 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    cursor: grab;
}

.cabinet-fullscreen-img:active {
    cursor: grabbing;
}

.cabinet-fullscreen-close {
    position: fixed;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 7001;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cabinet-fullscreen-close:hover {
    color: #ffcc00;
    background: rgba(255, 204, 0, 0.2);
}

.cabinet-fullscreen-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 7001;
    opacity: 0.6;
    transition: opacity 0.2s;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    width: 60px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

.cabinet-fullscreen-nav:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
}

.cabinet-fullscreen-prev {
    left: 20px;
}

.cabinet-fullscreen-next {
    right: 20px;
}

.cabinet-fullscreen-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 15px;
    border-radius: 20px;
    z-index: 7001;
}

@media (max-width: 768px) {
    .personal-cabinet-content {
        margin: 5% auto;
        padding: 20px 15px;
    }

    .cabinet-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .cabinet-avatar {
        width: 80px;
        height: 80px;
    }

    .cabinet-username {
        font-size: 1.5em;
    }

    .cabinet-actions {
        flex-direction: column;
    }

    .cabinet-action-btn {
        width: 100%;
        justify-content: center;
    }

    .cabinet-works-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .cabinet-work-item {
        height: 120px;
    }

    /* Адаптация для модального окна полноэкранного просмотра */
    .cabinet-fullscreen-nav {
        display: none;
    }

    .cabinet-fullscreen-img {
        max-width: 95%;
        max-height: 95%;
    }

    .cabinet-fullscreen-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    .cabinet-fullscreen-counter {
        bottom: 15px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .header-right {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .header-auth {
        display: none;
    }

    .mobile-search-btn {
        display: block;
    }

    .search-container {
        display: none;
    }
}

/* Новое расположение поисковой строки на ПК */
@media (min-width: 769px) {
    header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 20px;
    }

    .header-left {
        display: flex;
        align-items: center;
        gap: 15px;
    }

    .header-right {
        display: flex;
        align-items: center;
        gap: 25px;
        flex: 1;
        justify-content: flex-end;
    }

    .search-container {
        flex: 0 0 350px;
        margin: 0;
    }

    .header-auth {
        margin-left: 0;
    }

    .mobile-user-profile {
        display: none !important;
    }

    .mobile-auth {
        display: none !important;
    }
}

/* Стили для поисковой строки */
.search-container {
    position: relative;
}

.search-box {
    display: flex;
    width: 100%;
    position: relative;
}

#searchInput {
    flex-grow: 1;
    padding: 12px 20px 12px 45px;
    border: none;
    border-radius: 30px;
    background-color: #333;
    color: #e0e0e0;
    font-size: 15px;
    outline: none;
    transition: all 0.3s ease;
    font-family: "Comfortaa", sans-serif;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

#searchInput:focus {
    background-color: #3a3a3a;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
    pointer-events: none;
}

/* Добавьте в существующие стили */
#cabinetUserId:hover {
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

/* Для мобильных устройств - отключаем выделение при долгом нажатии */
@media (max-width: 768px) {
    #cabinetUserId {
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
    }
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background-color: #ffcc00;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    color: #262626;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.search-btn:hover {
    background-color: #ffdd33;
    transform: translateY(-50%) scale(1.05);
}

.search-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    background: #2d2d2d;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.search-results.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.search-result-item {
    padding: 12px 20px;
    border-bottom: 1px solid #3a3a3a;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
}

.search-result-item:hover {
    background-color: #3a3a3a;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 12px;
    object-fit: cover;
}

.search-result-item .info {
    flex: 1;
}

.search-result-item .name {
    font-weight: bold;
    margin-bottom: 3px;
}

.search-result-item .style {
    font-size: 0.85em;
    color: #aaa;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #ff6b6b;
    font-weight: bold;
}

.mobile-search-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
}

.search-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

/* Improved Mobile Search */
@media (max-width: 768px) {
    .search-container {
        position: fixed;
        top: 10px;
        left: 10px;
        right: 10px;
        margin: 0;
        padding: 0;
        background: transparent;
        display: none;
        z-index: 1001;
        max-width: none;
        width: auto;
    }

    .search-container.active {
        display: block;
        animation: slideDown 0.3s ease-out;
    }

    .mobile-search-btn {
        display: block;
    }

    #searchInput {
        padding: 14px 20px 14px 50px;
        font-size: 16px;
        border-radius: 30px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    .search-icon {
        left: 20px;
        font-size: 18px;
    }

    .search-btn {
        width: 40px;
        height: 40px;
    }

    .search-results {
        position: fixed;
        top: 80px;
        left: 10px;
        right: 10px;
        max-height: calc(100vh - 100px);
        border-radius: 10px;
    }

    .search-backdrop.active {
        display: block;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-20px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .mobile-user-profile {
        display: flex;
    }

    .mobile-auth {
        display: flex;
    }
}

/* НОВЫЕ СТИЛИ ДЛЯ ПОЛЯ ПАРОЛЯ */
.password-section {
    background: rgba(51, 51, 51, 0.6);
    padding: 20px;
    border-radius: 12px;
    border-left: 3px solid #ffcc00;
    margin-top: 20px;
}

.password-container {
    position: relative;
    width: 100%;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #444;
    border-radius: 8px;
    background: #333;
    color: white;
    font-size: 16px;
    transition: all 0.3s ease;
    font-family: "Comfortaa", sans-serif;
    box-sizing: border-box;
    letter-spacing: 1px;
}

.password-input:focus {
    outline: none;
    border-color: #ffcc00;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.2);
    background: #3a3a3a;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #ffcc00;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

.password-requirements {
    margin-top: 10px;
    padding: 10px;
    background: rgba(68, 68, 68, 0.3);
    border-radius: 6px;
    font-size: 12px;
    color: #aaa;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 5px;
}

.requirement.valid {
    color: #4CAF50;
}

.requirement.invalid {
    color: #ff6b6b;
}

.requirement-icon {
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Модальное окно с кодом профиля */
.code-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 6000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease-out;
}

.code-modal-content {
    position: relative;
    background: linear-gradient(135deg, #2d2d2d 0%, #1f1f1f 100%);
    margin: 5% auto;
    padding: 30px 25px;
    border-radius: 16px;
    max-width: 600px;
    width: 95%;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    animation: modalSlideIn 0.4s ease-out;
    border: 1px solid rgba(255, 204, 0, 0.3);
    text-align: center;
}

.code-modal-header {
    text-align: center;
    margin-bottom: 25px;
}

.code-modal-title {
    font-size: clamp(1.6em, 5vw, 2em);
    background: linear-gradient(45deg, #ffcc00, #ffdd33);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    font-weight: bold;
}

.code-modal-subtitle {
    color: #e0e0e0;
    font-size: clamp(0.95em, 3.5vw, 1.1em);
    line-height: 1.4;
}

.code-container {
    background: rgba(51, 51, 51, 0.7);
    border-radius: 10px;
    padding: 30px 20px;
    margin: 20px 0;
    border-left: 3px solid #ffcc00;
    position: relative;
}

.code-text {
    color: #e0e0e0;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 400px;
    overflow-y: auto;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

.code-hidden {
    color: #e0e0e0;
    font-family: monospace;
    font-size: 14px;
    line-height: 1.5;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    margin-bottom: 20px;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.code-hidden::before {
    content: 'Копируйте код и отправляйте';
    letter-spacing: 2px;
    font-size: 16px;
    color: #888;
}

.copy-btn {
    background: linear-gradient(45deg, #ffcc00, #ffdd33);
    color: #262626;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    font-size: clamp(1em, 4vw, 1.1em);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 auto;
    min-width: 200px;
    justify-content: center;
}

.copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.4);
}

.copy-btn.copied {
    background: linear-gradient(45deg, #4CAF50, #45a049);
}

.copy-btn.copied::before {
    content: '✓ ';
    font-weight: bold;
}

.instructions-box {
    background: rgba(51, 51, 51, 0.7);
    padding: 20px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 3px solid #ffcc00;
    text-align: left;
}

.instructions-title {
    color: #ffcc00;
    margin-bottom: 15px;
    font-weight: bold;
    font-size: clamp(1.1em, 4vw, 1.3em);
    text-align: center;
}

.instructions-list {
    list-style-type: decimal;
    padding-left: 20px;
    color: #e0e0e0;
    margin-bottom: 0;
}

.instructions-list li {
    margin-bottom: 10px;
    line-height: 1.5;
}

.instructions-link {
    color: #ffcc00;
    text-decoration: none;
    transition: all 0.2s ease;
}

.instructions-link:hover {
    text-decoration: underline;
    color: #ffdd33;
}

.success-message {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
    padding: 15px;
    border-radius: 8px;
    margin: 15px 0;
    border-left: 3px solid #4CAF50;
    text-align: center;
    display: none;
}

/* Стиль для уведомления об ошибке */
.link-copied-notification.error {
    background: linear-gradient(45deg, #f44336, #d32f2f) !important;
}

.success-message.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

@media (max-width: 768px) {
    .code-modal-content {
        margin: 10% auto;
        padding: 20px 15px;
    }

    .code-text {
        font-size: 12px;
        max-height: 300px;
    }

    .copy-btn {
        width: 100%;
        min-width: auto;
    }
}

.char-counter {
    transition: color 0.3s ease;
}

.char-counter.warning {
    color: #ffcc00;
}

.char-counter.error {
    color: #ff6b6b;
    font-weight: bold;
}

.form-label.required::after {
    content: ' *';
    color: #ff6b6b;
}

.form-input:required,
.form-select:required {
    border-left: 3px solid #ffcc00;
}

.works-counter.minimum-warning {
    color: #ff6b6b;
    font-weight: bold;
}

.social-limit-warning {
    color: #ff6b6b;
    font-size: 12px;
    margin-top: 5px;
    text-align: center;
    display: none;
    font-weight: bold;
    padding: 8px;
    background: rgba(255, 107, 107, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.social-limit-warning.show {
    display: block;
    animation: shake 0.5s ease-in-out;
}

.social-counter {
    transition: all 0.3s ease;
    font-size: 12px;
    margin-bottom: 10px;
    padding: 8px;
    border-radius: 6px;
    text-align: center;
}

.social-counter.warning {
    color: #ff6b6b;
    font-weight: bold;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
}

.social-counter.normal {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

/* Анимация тряски для обязательных полей */
@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

@media (max-width: 768px) {

    /* Центрирование Telegram ссылки в профиле */
    .profile-link {
        justify-content: center;
        text-align: center;
        margin-left: 0;
        margin-right: 0;
    }

    /* Центрирование иконки Telegram в профиле */
    .profile-link-icon {
        margin-left: 8px;
        margin-right: 0;
    }

    /* Центрирование Telegram в мобильном профиле */
    .mobile-user-telegram {
        text-align: center;
        width: 100%;
        display: block;
    }

    /* Центрирование социальных ссылок на мобильных */
    .social-links {
        justify-content: center;
        padding: 10px 0;
    }

    /* Центрирование Telegram в личном кабинете на мобильных */
    .cabinet-telegram-link {
        justify-content: center;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Подсветка секции при ошибке */
.form-section.error {
    border-left-color: #ff6b6b !important;
    background: rgba(255, 107, 107, 0.05) !important;
}

/* Стиль для кнопки "Войти" когда регистрация уже выполнена */
.register-btn.registered {
    background: linear-gradient(45deg, #4CAF50, #45a049) !important;
}

.register-btn.registered:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50) !important;
}

/* Обновленные стили для кнопок личного кабинета на мобильных устройствах */
@media (max-width: 768px) {
    .cabinet-actions {
        flex-direction: column;
        gap: 10px;
        margin-top: 20px;
    }

    .cabinet-action-btn {
        width: 100%;
        justify-content: center;
        padding: 10px 15px;
        font-size: 14px;
        min-height: 44px;
        /* Минимальная высота для удобного нажатия */
    }

    .cabinet-action-btn.secondary {
        background: transparent;
        color: #aaa;
        border: 1px solid #666;
    }

    .cabinet-action-btn.secondary:hover {
        color: #ffcc00;
        border-color: #ffcc00;
    }

    /* Новый контейнер для кнопок закрыть/выйти */
    .cabinet-bottom-actions {
        display: flex;
        gap: 10px;
        width: 100%;
    }

    .cabinet-bottom-actions .cabinet-action-btn {
        flex: 1;
        margin: 0;
    }
}

@media (max-width: 768px) {
    .cabinet-works-btn {
        padding: 10px 15px !important;
        font-size: 14px !important;
        min-height: 44px !important;
        width: 90% !important;
        margin: 10px auto 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        white-space: normal !important;
        line-height: 1.3 !important;
    }

    .cabinet-works-btn svg {
        width: 14px !important;
        height: 14px !important;
        flex-shrink: 0 !important;
    }
}

@media (max-width: 480px) {
    .cabinet-works-btn {
        padding: 8px 12px !important;
        font-size: 13px !important;
        min-height: 40px !important;
        width: 80% !important;
    }

    .cabinet-works-btn svg {
        width: 12px !important;
        height: 12px !important;
    }
}

@media (max-width: 360px) {
    .cabinet-works-btn {
        padding: 6px 10px !important;
        font-size: 12px !important;
        min-height: 36px !important;
    }
}

/* Стили для динамической валидации */
.form-input:valid,
.form-select:valid,
.password-input:valid {
    border-color: #4CAF50 !important;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2) !important;
}

.form-input:invalid:not(:focus):not(:placeholder-shown),
.form-select:invalid:not(:focus),
.password-input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #f44336 !important;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2) !important;
}

.form-section.valid {
    border-left-color: #4CAF50 !important;
}

.form-section.invalid {
    border-left-color: #f44336 !important;
}

/* Анимации для плавных переходов */
.form-input,
.form-select,
.password-input,
.form-section {
    transition: all 0.3s ease;
}

/* Стили для счетчиков */
.char-counter.valid {
    color: #4CAF50 !important;
}

.char-counter.invalid {
    color: #f44336 !important;
}

/* Стили для требований пароля */
.requirement.valid {
    color: #4CAF50;
}

.requirement.invalid {
    color: #f44336;
}

.requirement.valid .requirement-icon::before {
    content: '✓';
    color: #4CAF50;
}

.requirement.invalid .requirement-icon::before {
    content: '✗';
    color: #f44336;
}

/* ДОБАВИМ СТИЛИ ДЛЯ ЗАБЛОКИРОВАННЫХ ПОЛЕЙ */
.form-input:read-only,
.form-select:disabled {
    background-color: #2a2a2a !important;
    color: #888 !important;
    cursor: not-allowed !important;
    border-color: #555 !important;
}

.form-input:read-only:focus,
.form-select:disabled:focus {
    box-shadow: none !important;
    border-color: #555 !important;
}

.locked-field-hint {
    color: #ffcc00;
    font-size: 0.8em;
    margin-left: 5px;
}

.locked-info-message {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для заблокированных полей в секции основной информации */
#mainInfoSection .form-input:read-only,
#mainInfoSection .form-select:disabled {
    background: #2a2a2a !important;
    border: 2px solid #555 !important;
    color: #888 !important;
}

#mainInfoSection .form-group {
    position: relative;
}

/* Индикатор заблокированного поля */
.locked-indicator {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ffcc00;
    font-size: 14px;
}

.form-textarea {
    min-height: 80px;
    resize: none;
    overflow-y: auto;
    line-height: 1.5;
    transition: all 0.3s ease;
    font-family: "Comfortaa", sans-serif;
}

.form-textarea:focus {
    border-color: #ffcc00;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.2);
    background: #3a3a3a;
}

.char-counter.warning {
    color: #ffcc00;
    font-weight: bold;
}

.char-counter.error {
    color: #ff6b6b;
    font-weight: bold;
}

/* Обновленные стили для описания профиля в личном кабинете */
.cabinet-description {
    color: #e0e0e0;
    line-height: 1.6;
    padding: 15px;
    background: rgba(68, 68, 68, 0.3);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 200px;
    /* Ограничиваем максимальную высоту */
    overflow-y: auto;
    /* Добавляем прокрутку если текст не помещается */
    word-wrap: break-word;
    /* Перенос длинных слов */
    overflow-wrap: break-word;
    /* Современный аналог word-wrap */
    white-space: pre-wrap;
    /* Сохраняем переносы строк */
    position: relative;
}

/* Стили для скроллбара в описании */
.cabinet-description::-webkit-scrollbar {
    width: 6px;
}

.cabinet-description::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.cabinet-description::-webkit-scrollbar-thumb {
    background: rgba(255, 204, 0, 0.5);
    border-radius: 3px;
}

.cabinet-description::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 204, 0, 0.7);
}

/* Стили для премиум-заблокированного описания */
.premium-locked {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: rgba(68, 68, 68, 0.3);
    border-radius: 8px;
    border: 2px dashed #666;
    text-align: center;
    max-height: 150px;
    /* Ограничиваем высоту */
    overflow: hidden;
    /* Скрываем переполнение */
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .cabinet-description {
        max-height: 150px;
        /* Уменьшаем высоту на мобильных */
        padding: 12px;
        font-size: 0.9em;
    }

    .premium-locked {
        max-height: 120px;
        padding: 15px;
    }
}

/* Стили для кнопки просмотра пароля в форме входа */
#loginModal .password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

#loginModal .password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

#loginModal .password-toggle:hover {
    color: #ffcc00;
}

#loginModal .password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Убедитесь, что поле ввода пароля имеет правильный отступ */
#loginModal #loginPassword {
    width: 100%;
    padding-right: 45px;
    /* Место для иконки */
}

/* Дополнительные стили для лучшего отображения текста */
.cabinet-description p {
    margin-bottom: 10px;
}

.cabinet-description p:last-child {
    margin-bottom: 0;
}

.expand-description-btn {
    display: none;
    background: transparent;
    color: #ffcc00;
    border: 1px solid #ffcc00;
    padding: 5px 10px;
    border-radius: 15px;
    margin-top: 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    margin-left: auto;
    /* Это выравнивает кнопку по правому краю */
    margin-right: 0;
    width: fit-content;
    /* Ширина по содержимому */
}

/* Для контейнера описания */
.cabinet-description-container {
    position: relative;
}

/* Альтернативный вариант - абсолютное позиционирование */
.expand-description-btn.absolute {
    position: absolute;
    right: 0;
    bottom: -30px;
}

.cabinet-description-container {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Стили для баннера */
.banner-preview {
    width: 100%;
    height: 120px;
    border-radius: 8px;
    background: #333;
    border: 2px dashed #555;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 15px;
}

.banner-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-placeholder {
    color: #888;
    text-align: center;
    padding: 20px;
}

.banner-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.remove-banner-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.remove-banner-btn:hover {
    background: #d32f2f;
}

/* Стили для кнопки просмотра пароля в форме настройки профиля */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.password-toggle:hover {
    color: #ffcc00;
    background: rgba(255, 204, 0, 0.1);
    border-radius: 4px;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
}

/* Убедитесь, что поле ввода пароля имеет правильный отступ */
#profilePassword {
    width: 100%;
    padding-right: 45px;
}

/* Стили для иконки в зависимости от состояния */
.password-toggle .eye-open,
.password-toggle .eye-closed {
    display: none;
}

.password-toggle.show .eye-open,
.password-toggle.hide .eye-closed {
    display: block;
}

.password-toggle.hide .eye-open,
.password-toggle.show .eye-closed {
    display: none;
}

/* Стили для баннера в личном кабинете */
.cabinet-banner-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    margin-bottom: 20px;
    position: relative;
}

/* Уменьшение расстояния между баннером и основной информацией в личном кабинете */
.cabinet-banner-container {
    margin-bottom: 10px !important;
    /* Уменьшаем отступ снизу */
}

.cabinet-profile-section {
    margin-top: 0 !important;
    /* Убираем верхний отступ */
    padding-top: 15px !important;
    /* Уменьшаем верхний паддинг */
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .cabinet-banner-container {
        margin-bottom: 5px !important;
    }

    .cabinet-profile-section {
        padding-top: 10px !important;
    }
}

/* Минимальное расстояние */
.cabinet-banner-container {
    margin-bottom: 5px !important;
}

.cabinet-profile-section {
    margin-top: -5px !important;
    /* Отрицательный отступ для плотного прилегания */
    padding-top: 10px !important;
}

.cabinet-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .cabinet-banner-container {
        height: 150px;
        margin-bottom: 15px;
    }
}

@media (max-width: 480px) {
    .cabinet-banner-container {
        height: 120px;
        margin-bottom: 10px;
    }
}

/* Стили для панели инструментов форматирования */
.formatting-toolbar {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(68, 68, 68, 0.3);
    border-radius: 6px;
    border: 1px solid #555;
}

.format-btn {
    background: #444;
    border: 1px solid #666;
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
}

.format-btn:hover {
    background: #555;
    border-color: #ffcc00;
}

.format-btn.active {
    background: #ffcc00;
    color: #262626;
    border-color: #ffcc00;
}

/* Стили для форматированного текста в описании */
.cabinet-description b,
.cabinet-description strong {
    font-weight: bold;
    color: #ffcc00;
}

.cabinet-description i,
.cabinet-description em {
    font-style: italic;
}

.cabinet-description u {
    text-decoration: underline;
}

.cabinet-description a {
    color: #ffcc00;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cabinet-description a:hover {
    text-decoration: underline;
    color: #ffdd33;
}

/* Стили для кнопки копирования ссылки на профиль */
.avatar-with-share {
    position: relative;
    display: inline-block;
}

.share-link-btn {
    position: absolute;
    top: -10px;
    left: -10px;
    background: linear-gradient(45deg, #ffcc00, #ffdd33);
    color: #262626;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border: 2px solid #262626;
}

.share-link-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 204, 0, 0.4);
    background: linear-gradient(45deg, #ffdd33, #ffcc00);
}

.share-link-btn:active {
    transform: scale(0.95);
}

/* Уведомление об успешном копировании */
.link-copied-notification {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    display: none;
    align-items: center;
    gap: 10px;
    animation: slideInLeft 0.3s ease-out;
    max-width: calc(100% - 40px);
    font-size: 14px;
    font-weight: 500;
}

.link-copied-notification.show {
    display: flex;
}

.link-copied-notification svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.link-copied-notification span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Анимация появления снизу слева */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Анимация исчезновения */
@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .link-copied-notification {
        bottom: 15px;
        left: 15px;
        right: 15px;
        max-width: calc(100% - 30px);
        padding: 10px 16px;
        font-size: 13px;
        border-radius: 20px;
        justify-content: center;
        text-align: center;
    }

    .link-copied-notification span {
        white-space: normal;
    }
}

@media (max-width: 480px) {
    .link-copied-notification {
        bottom: 10px;
        left: 10px;
        right: 10px;
        max-width: calc(100% - 20px);
        padding: 8px 14px;
        font-size: 12px;
    }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .share-link-btn {
        position: absolute;
        top: auto;
        /* Убираем top позиционирование */
        left: auto;
        /* Убираем left позиционирование */
        bottom: -8px;
        /* Располагаем снизу */
        right: -8px;
        /* Располагаем справа */
        width: 28px;
        height: 28px;
        transform: none;
        /* Убираем трансформацию для мобильных */
        border: 2px solid #1f1f1f;
    }

    .share-link-btn svg {
        width: 16px;
        height: 16px;
    }

    /* Убираем hover эффект для тач-устройств */
    .share-link-btn:hover {
        transform: none;
        background: linear-gradient(45deg, #ffcc00, #ffdd33);
    }

    /* Добавляем активное состояние при нажатии */
    .share-link-btn:active {
        transform: scale(0.95);
        background: linear-gradient(45deg, #ffaa00, #ffcc33);
    }

}

/* Для очень маленьких экранов */
@media (max-width: 480px) {
    .share-link-btn {
        width: 26px;
        height: 26px;
        bottom: -6px;
        right: -6px;
    }

    .share-link-btn svg {
        width: 14px;
        height: 14px;
    }
}

/* Для портретной ориентации на мобильных */
@media (max-width: 768px) and (orientation: portrait) {
    .share-link-btn {
        /* Увеличиваем для удобства нажатия пальцем */
        width: 30px;
        height: 30px;
        bottom: -10px;
        right: -10px;
    }
}

/* Для ландшафтной ориентации на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .share-link-btn {
        /* Сделаем немного больше для ландшафтного режима */
        width: 26px;
        height: 26px;
        bottom: -5px;
        right: -5px;
    }
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .cabinet-profile-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .avatar-with-share {
        margin-bottom: 10px;
    }

    .cabinet-user-info {
        text-align: center;
    }

    .publication-status {
        position: static;
        margin-top: 10px;
    }
}

.artist-highlight {
    animation: highlightPulse 2s ease-in-out;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.5);
}

@keyframes highlightPulse {
    0% { box-shadow: 0 0 5px rgba(255, 204, 0, 0.3); }
    50% { box-shadow: 0 0 25px rgba(255, 204, 0, 0.8); }
    100% { box-shadow: 0 0 5px rgba(255, 204, 0, 0.3); }
}
