/* --- Monitoring filters row --- */
.monitoring-filters-row {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 18px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}
.monitoring-filters-row .filter-item {
    display: flex;
    flex-direction: column;
    min-width: 90px;
    max-width: 140px;
    font-size: 13px;
}
.monitoring-filters-row .filter-item label {
    font-weight: 400;
    font-size: 13px;
    color: #222;
}
.monitoring-filters-row input,
.monitoring-filters-row select {
    width: 100%;
    min-width: 70px;
    max-width: 140px;
    font-size: 13px;
    padding: 3px 6px;
    border: 1px solid #bbb;
    border-radius: 3px;
    margin-top: 2px;
    box-sizing: border-box;
}
.monitoring-filters-row .filter-actions {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    gap: 6px;
    min-width: 120px;
    max-width: 160px;
}
.monitoring-filters-row button[type="submit"] {
    background: #007bff;
    color: white;
    padding: 7px 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}
.monitoring-filters-row a {
    margin-left: 6px;
    color: #555;
    font-size: 13px;
    text-decoration: underline;
    align-self: flex-end;
}

.admin-wide {
    max-width: 1170px !important;
    width: 130% !important;
    min-width: 1200px;
    transition: width 0.2s;
}
.topbar-flex {
        margin-top: 20px !important;
    }
    .topbar-flex nav a:active {
        background: rgba(255,255,255,0.25) !important;
        color: #fff !important;
        box-shadow: none !important;
        border: none !important;
        outline: none !important;
        transition: background 0.12s;
    }
@media (max-width: 600px) and (orientation: portrait) {
    header {
        background: rgba(20,20,20,0.97) !important;
        border-radius: 0 0 18px 18px !important;
        box-shadow: 0 2px 12px rgba(0,0,0,0.13);
        padding: 0 0 32px 0 !important;
    }
    header h1 {
        font-size: 1.2em !important;
        line-height: 1.1 !important;
        margin: 0.5em 0 0.2em 0 !important;
        color: #fff !important;
    }
    .topbar-flex {
        background: transparent !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
    .topbar-flex nav {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        width: 100% !important;
        gap: 0 !important;
        overflow-x: auto !important;
        margin: 0 !important;
        white-space: nowrap !important;
        scrollbar-width: thin;
        position: relative !important;
        left: 2px !important;
        justify-content: center !important;
    }
    .topbar-flex nav a {
        display: inline-block !important;
        min-width: calc(14.4vw + 7px) !important;
        padding: 2% 1.6% !important;
        font-size: 0.78em !important;
        text-align: center !important;
        border-radius: 2% !important;
        background: rgba(255,255,255,0.07) !important;
        margin: 0 0 0 -2px !important;
        color: #fff !important;
    }
    .lang-select-top {
        position: static !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin: 18px 0 0 0 !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100vw !important;
        height: auto;
        z-index: 10;
        order: 2;
    }
    .lang-select-top select {
        width: 100% !important;
        font-size: 0.9em !important;
        padding: 1.5% !important;
        min-width: 14vw !important;
        max-width: 30vw !important;
        border-radius: 2px !important;
        background: rgba(255,255,255,0.07) !important;
        border: none !important;
        margin: 0 !important;
        color: #fff !important;
    }
}
@media (max-width: 900px) and (orientation: landscape) {
    .background-photos {
        display: block !important;
        opacity: 0.5 !important;
    }
    .bg-photo-chaos {
        width: 30vw !important;
        opacity: 0.3 !important;
    }
}
@media (max-width: 1080px) and (max-height: 810px) {
    html, body {
        margin: 0 !important;
        padding: 0 !important;
        overflow-x: hidden !important;
        background: #000 !important;
    }
    .sidebar {
        display: none !important;
    }
    #photoModal > div {
        position: relative !important;
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    #modalPhoto {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    max-width: 93vw;
        max-height: 90vh !important;
        object-fit: contain !important;
        background: none !important;
        border: none !important;
        margin: 0 !important;
        display: block !important;
    }
}
.slide-img {
    transition: transform 0.2s ease;
}
.slide-img:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}
@media (max-width: 1024px) {
    .slide-img:active {
        transform: scale(1.02);
        transition: transform 0.2s ease;
    }
}
@media (max-width: 600px) {
    html, body {
        margin: 0 !important;
        padding: 0 0 20px 0 !important; 
        overflow-x: hidden !important;
        background: #000 !important;
        background-image: url('/static/images/bg_photos/bg_table.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
@media (max-width: 1080px) and (max-height: 810px) {
    html, body {
        margin: 0 !important;
        padding: 0 0 20px 0 !important; 
        overflow-x: hidden !important;
        background: #000 !important;
        background-image: url('/static/images/bg_photos/bg_table.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
    .sidebar {
        display: none !important;
    }
    #photoModal > div {
        position: relative !important;
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    #modalPhoto {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    max-width: 93vw;
        max-height: 90vh !important;
        object-fit: contain !important;
        background: none !important;
        border: none !important;
        margin: 0 !important;
        display: block !important;
    }
}
    .sidebar {
        display: none !important;
    }
    #photoModal > div {
        position: relative !important;
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
    }
    #modalPhoto {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
    max-width: 93vw;
        max-height: 90vh !important;
        object-fit: contain !important;
        background: none !important;
        border: none !important;
        margin: 0 !important;
        display: block !important;
    }
}
@media (min-width: 601px) {
    .modal-nav {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 4px !important;
        margin: 0 auto !important;
        width: 100vw !important;
        z-index: 2002 !important;
        justify-content: center !important;
        background: none !important;
    }
}
@media (max-width: 1024px) {
    #photoModal.modal-open {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    #photoModal > div {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        max-width: 100vw !important;
        max-height: 100vh !important;
    }
    #modalPhoto {
        display: block !important;
        margin: 0 auto !important;
        max-width: 93vw;
        max-height: 90vh !important;
        object-fit: contain !important;
        left: unset !important;
        transform: unset !important;
        position: static !important;
    }
}
#photoModal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.9);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    display: flex;
}
#photoModal.modal-open {
    display: flex;
}
#photoModal > div {
    position: relative;
    margin: 0 auto;
    max-width: 98vw;
    max-height: 98vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 100vh;
}
#modalPhoto {
    display: block;
    margin: 0 auto;
    max-width: 98vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    cursor: default;
    left: unset;
    transform: unset;
    position: static;
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: rgba(255,255,255,0.7);
    font-size: 40px;
    font-weight: normal;
    cursor: pointer;
    z-index: 2001;
    background: none;
    border: none;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}
.modal-close:hover {
    opacity: 1;
    color: rgba(255,255,255,0.9);
}
.modal-description {
    color: #fff;
    margin: 20px auto;
    font-size: 18px;
    max-width: 800px;
    line-height: 1.6;
    background: rgba(0,0,0,0.7);
    padding: 15px 20px;
    border-radius: 8px;
    cursor: default;
}
.modal-nav {
    margin-top: 20px;
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}
.modal-nav button {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border: 2px solid #fff;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}
.modal-nav button:hover {
    background: rgba(255,255,255,0.4);
}
#modalCounter {
    color: #fff;
    margin: 0 20px;
    font-size: 16px;
}
.bg-table-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: -2;
    pointer-events: none;
    user-select: none;
}
.background-photos {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}
.bg-photo-chaos {
    position: absolute;
    box-shadow: 0 16px 48px 0 rgba(0,0,0,0.38), 0 4px 16px 0 rgba(0,0,0,0.22);
    border: 12px solid #eee;
    border-radius: 0;
    transition: filter 0.3s;
    filter: grayscale(10%) brightness(0.98) contrast(1.08);
    opacity: 1;
    user-select: none;
}
@media (max-width: 900px) {
    .bg-photo-chaos { width: 22% !important; opacity: 0.5; }
}
@media (max-width: 900px) {
    .background-photos {
        display: block !important;
        opacity: 0.5 !important;
        z-index: -1 !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        pointer-events: none !important;
    }
    .bg-photo-chaos {
        width: 30vw !important;
        opacity: 0.3 !important;
    }
}
.topbar-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 45%;
    margin: 0 auto;
    padding: 0 10%;
}
.lang-select-top {
    min-width: 120px;
    margin-left: 30px;
}
.lang-select-top select {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1em;
}
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 180px;
    height: 100vh;
    background: #222;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 30px 0 0 0;
    z-index: 1100;
    box-shadow: 2px 0 8px #0002;
    align-items: stretch;
}
.sidebar-counter {
    width: 75%;
    margin: 0 auto;
    text-align: center;
    color: #bbb;
    font-size: 0.98em;
    letter-spacing: 0.5px;
    padding: 12px 0 10px 0;
    opacity: 0.85;
    background: none;
    border-top: 1px solid #333;
    margin-top: 10px;
    position: absolute;
    bottom: 47px; 
    left: 0;
    right: 0;
}
.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 100%;
    margin-left: 0;
}
.sidebar nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 24px;
    width: 90%;
    box-sizing: border-box;
    border-radius: 0 16px 16px 0;
    transition: background 0.2s;
}
.sidebar nav a:hover {
    background: #444;
}
@media (max-width: 768px) {
    .sidebar {
        display: none !important; 
    }
    .sidebar-counter {
        display: none !important;
    }
    main {
        margin-left: 0 !important; 
        margin-right: 0 !important; 
        max-width: 100% !important; 
        margin-top: 20px !important; 
        padding: 20px !important; 
    }
    header {
        padding-left: 0 !important;
        width: 100% !important;
        padding: 15px 0 !important; 
    }
    .topbar-flex {
        max-width: 100% !important;
        padding: 0 15px !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    .topbar-flex nav,
    header nav {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important; 
        gap: 0 !important;
        margin: 0 !important;
        scrollbar-width: none !important; /* Firefox */
        -ms-overflow-style: none !important; /* IE and Edge */
    }
    .topbar-flex nav::-webkit-scrollbar,
    header nav::-webkit-scrollbar {
        display: none !important; /* Chrome, Safari and Opera */
    }
    .topbar-flex nav a,
    header nav a {
        margin: 0 4px !important; 
        font-size: 0.75em !important;
        white-space: nowrap !important; 
        padding: 4px 6px !important;
        border-radius: 3px !important;
        display: inline-block !important;
        flex-shrink: 0 !important;
        min-width: auto !important;
    }
    .nav-dropdown-menu {
        display: none !important;
    }
    .nav-dropdown-caret {
        display: none !important;
    }
    .lang-select-top {
        min-width: 70px !important; 
        margin-left: 8px !important; 
        flex-shrink: 0 !important; 
    }
    .lang-select-top select {
        padding: 3px 5px !important; 
        font-size: 0.75em !important; 
        min-width: 60px !important;
        border-radius: 3px !important;
    }
    
    /* Компактные стили для админских ссылок в мобильной версии */
    .topbar-flex nav a[href*="/admin"],
    .topbar-flex nav a[href*="/messages"] {
        font-size: 0.7em !important;
        padding: 3px 4px !important;
        margin: 0 2px !important;
        background: rgba(255, 165, 0, 0.1) !important;
    }
    
    .topbar-flex nav span {
        font-size: 0.6em !important;
        margin: 0 2px !important;
    }
    
    /* Дополнительные оптимизации для мобильной навигации */
    .topbar-flex {
        padding: 0 8px !important;
        gap: 6px !important;
    }
    
    footer {
        padding-left: 0 !important;
        width: 100% !important;
    }
}
@media (max-width: 1024px) and (min-width: 769px) {
    .sidebar {
        display: none !important; 
    }
    .sidebar-counter {
        display: none !important;
    }
    main {
        margin-left: 0 !important; 
        margin-right: 0 !important; 
        max-width: 100% !important; 
        margin-top: 20px !important; 
        padding: 20px !important; 
    }
    header {
        padding-left: 0 !important;
        width: 100% !important;
        padding: 15px 0 !important; 
    }
    .topbar-flex {
        max-width: 100% !important;
        padding: 0 15px !important;
        flex-wrap: nowrap !important;
        justify-content: space-between !important;
        align-items: center !important;
    }
    .topbar-flex nav,
    header nav {
        display: flex !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important; 
        gap: 0 !important;
        margin: 0 !important;
    }
    .topbar-flex nav a,
    header nav a {
        margin: 0 8px !important; 
        font-size: 0.9em !important;
        white-space: nowrap !important; 
        padding: 5px 8px !important;
        border-radius: 3px !important;
        display: inline-block !important;
    }
    .lang-select-top {
        min-width: 84px !important;
        margin-left: 15px !important;
        flex-shrink: 0 !important;
    }
    .lang-select-top select {
        padding: 4px 7px !important;
        font-size: 0.85em !important;
        min-width: 70px !important;
        border-radius: 3px !important;
    }
    footer {
        padding-left: 0 !important;
        width: 100% !important;
    }
    .slider-container {
        margin-bottom: 20px;
        gap: 5px;
    }
    .slider {
        max-width: 100vw;
        margin: 0;
    }
    .slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 1.2em;
    }
    .photo-description {
        max-width: 100vw;
        margin: 10px 0 0 0;
        padding: 10px 15px;
        font-size: 14px;
    }
    h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
        text-align: center;
    }
    form {
        max-width: 100%;
    }
    input, textarea, button {
        font-size: 16px; 
    }
    #photoModal {
        display: none !important;
    }
    #photoModal.modal-open {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 9999 !important;
        background: rgba(0,0,0,0.9) !important;
        align-items: center !important;
        justify-content: center !important;
    }
    #photoModal > div {
        position: relative !important;
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    #photoModal #modalDescription {
        display: none !important;
    }
    #photoModal > div > div:last-child {
        position: absolute !important;
        bottom: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 15px !important;
    }
    #photoModal button {
        padding: 12px 18px !important;
        font-size: 14px !important;
        border-radius: 20px !important;
        background: rgba(0,0,0,0.7) !important;
        color: #fff !important;
        border: 1px solid rgba(255,255,255,0.3) !important;
        cursor: pointer !important;
    }
    #photoModal #modalCounter {
        background: rgba(0,0,0,0.7) !important;
        padding: 8px 12px !important;
        border-radius: 15px !important;
        font-size: 14px !important;
        color: #fff !important;
    }
    #photoModal > div > span {
        position: absolute !important;
        top: 20px !important;
        right: 20px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 28px !important;
        background: none !important;
        z-index: 10000 !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 0 !important;
        color: rgba(255,255,255,0.7) !important;
        border: none !important;
        font-weight: normal !important;
        opacity: 0.7 !important;
        transition: opacity 0.3s ease !important;
    }
    #photoModal > div > span:hover {
        opacity: 1 !important;
        color: rgba(255,255,255,0.9) !important;
    }
}
main {
    max-width: 900px;
    margin: 90px auto 30px auto;
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
#about .responsive-img {
    width: 30%;
    height: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.18);
    border-radius: 14px;
    background: #fff;
}
.slide img,
.slide-img {
    box-shadow: 0 8px 32px rgba(0,0,0,0.35), 0 2px 8px rgba(0,0,0,0.18);
    border-radius: 14px;
    background: #fff;
    max-width: 100%;
    max-height: 100%; 
    width: auto;
    height: auto;
    object-fit: contain; 
}
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0 0 80px 0; 
    background: #f4f4f4;
    color: #222;
    -webkit-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 
}
header {
    background: #222;
    color: #fff;
    padding: 20px 0;
    text-align: center;
    -webkit-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 
}
nav a {
    color: #fff;
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
}
nav a:hover {
    text-decoration: underline;
}
.slider-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 30px;
}
.slider {
    position: relative;
    width: 100%;
    max-width: 90vw;
    aspect-ratio: 25/18;
    overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    background: #eee;
    padding-bottom: 40px; 
    transition: height 260ms ease;
}
.slide {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    z-index: 1;
    pointer-events: none;
    transition: opacity var(--slider-speed, 500ms) ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px; 
    box-sizing: border-box;
    transition: height 260ms ease;
}
.slide.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}
@media (min-width: 900px) {
    .slider {
        max-height: min(calc(1.6 * 96vh), 100vh);
    }
    .slider .slide {
        align-items: center;
        justify-content: center;
    }
    .slider .slide-img.portrait {
        max-height: min(calc(1.6 * (96vh - 64px)), calc(100vh - 64px));
        width: auto;
        height: auto;
        object-fit: contain;
        object-position: center center;
        align-self: center;
    }
    .slider .slide-img.landscape {
        max-height: min(calc(1.3 * 80vh), 90vh);
        align-self: center;
        width: auto;
        height: auto;
        object-fit: contain;
        object-position: center center;
    }
}
:root {
    --slider-speed: 500ms;
}
.photo-description {
    background: #f8f8f8;
    padding: 15px 20px;
    margin: 10px auto 0 auto;
    max-width: 90vw;
    text-align: center;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    color: #333;
    font-size: 16px;
    line-height: 1.4;
    position: relative;
    -webkit-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 
}
.description-text {
    display: none;
    opacity: 0;
    transition: opacity 300ms ease;
    -webkit-user-select: none; 
    -moz-user-select: none; 
    -ms-user-select: none; 
    user-select: none; 
}
.description-text.active {
    display: block;
    opacity: 1;
}
.slider-arrow {
    background: #222;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.5em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    user-select: none;
}
.slider-arrow:hover {
    background: #444;
}
section {
    margin-bottom: 40px;
}
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 100%; 
}
input, textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    -webkit-user-select: text; 
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}
textarea {
    min-height: 200px; 
    width: 100%; 
    resize: both; 
    font-family: inherit; 
    box-sizing: border-box; 
}
button {
    background: #222;
    color: #fff;
    border: none;
    padding: 10px 0;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: background 0.2s;
}
button:hover {
    background: #444;
}
footer {
    text-align: center;
    padding: 0.8% 0;
    background: #222;
    color: #fff;
    position: fixed;
    width: 100%;
    bottom: 0;
    z-index: 1000; 
}
.upload-form {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    transition: background-color 0.3s ease;
}
.upload-form.drag-over {
    background: #e9ecef;
    border: 2px dashed #007bff;
}
.image-preview {
    border: 2px dashed #ddd;
    border-radius: 8px;
    padding: 20px;
    background: #fff;
    text-align: center;
    transition: border-color 0.3s ease;
}
.image-preview:hover {
    border-color: #007bff;
}
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.photo-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #fff;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.photo-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}
.photo-thumbnail {
    max-width: 100%;
    max-height: 150px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}
.photo-thumbnail:hover {
    transform: scale(1.05);
}
.description-edit-form {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}
.btn {
    padding: 6px 12px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
}
.btn-primary {
    background: #007bff;
    color: white;
}
.btn-primary:hover {
    background: #0056b3;
}
.btn-info {
    background: #17a2b8;
    color: white;
}
.btn-info:hover {
    background: #138496;
}
.btn-success {
    background: #28a745;
    color: white;
}
.btn-success:hover {
    background: #1e7e34;
}
.btn-danger {
    background: #dc3545;
    color: white;
}
.btn-danger:hover {
    background: #c82333;
}
.btn-secondary {
    background: #6c757d;
    color: white;
}
.btn-secondary:hover {
    background: #545b62;
}
.notification-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: #ff4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    min-width: 18px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.admin-nav-section {
    border-top: 1px solid #444;
    margin-top: 15px;
    padding-top: 15px;
}
.admin-nav-section a {
    color: #ffa500 !important;
    font-weight: 500;
    font-size: 0.9em;
    margin-bottom: 8px;
    padding: 6px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
}
.admin-nav-section a:hover {
    color: #ffcc66 !important;
    background: rgba(255, 165, 0, 0.1);
}
.admin-nav-section a:first-child {
    font-weight: bold;
    font-size: 1em;
    margin-bottom: 12px;
    border-bottom: 1px solid #444;
    padding-bottom: 8px;
}
.admin-logout {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #444;
    font-size: 0.85em !important;
    color: #ff6b6b !important;
}
.admin-logout:hover {
    color: #ff9999 !important;
    background: rgba(255, 107, 107, 0.1);
}
@media (max-width: 768px) {
    .slider-container {
        margin-bottom: 20px;
        gap: 5px;
    }
    .slider {
        max-width: 100vw;
        margin: 0;
    }
    .slider-arrow {
        width: 32px;
        height: 32px;
        font-size: 1.2em;
    }
    .photo-description {
        max-width: 100vw;
        margin: 10px 0 0 0;
        padding: 10px 15px;
        font-size: 14px;
    }
    h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
        text-align: center;
    }
    form {
        max-width: 100%;
    }
    input, textarea, button {
        font-size: 16px; 
    }
    #photoModal {
        display: none !important;
    }
    #photoModal.modal-open {
        display: flex !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 9999 !important;
        background: rgba(0,0,0,0.9) !important;
        align-items: center !important;
        justify-content: center !important;
    }
    #photoModal > div {
        position: relative !important;
        width: 100% !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    #photoModal #modalDescription {
        display: none !important;
    }
    #photoModal > div > div:last-child {
        position: absolute !important;
        bottom: 20px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 15px !important;
    }
    #photoModal button {
        padding: 12px 18px !important;
        font-size: 14px !important;
        border-radius: 20px !important;
        background: rgba(0,0,0,0.7) !important;
        color: #fff !important;
        border: 1px solid rgba(255,255,255,0.3) !important;
        cursor: pointer !important;
    }
    #photoModal #modalCounter {
        background: rgba(0,0,0,0.7) !important;
        padding: 8px 12px !important;
        border-radius: 15px !important;
        font-size: 14px !important;
        color: #fff !important;
    }
    #photoModal > div > span {
        position: absolute !important;
        top: 20px !important;
        right: 20px !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 28px !important;
        background: none !important;
        z-index: 10000 !important;
        cursor: pointer !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 0 !important;
        color: rgba(255,255,255,0.7) !important;
        border: none !important;
        font-weight: normal !important;
        opacity: 0.7 !important;
        transition: opacity 0.3s ease !important;
    }
    #photoModal > div > span:hover {
        opacity: 1 !important;
        color: rgba(255,255,255,0.9) !important;
    }
}
#photoModal {
    display: none;
}
#photoModal.modal-open {
    display: block;
}
@media (min-width: 900px) {
  .slider .slide {
    display: flex;
    align-items: center; 
    justify-content: center;
    overflow: hidden; 
  }
  .slide-img.portrait {
    height: 100%;    
    width: auto;
    max-width: none;
    align-self: center;
    object-fit: contain; 
    object-position: center center;
    display: block; 
  }
  .slide-img.landscape {
    width: 100%;
    height: auto;
    max-height: 100%;
    align-self: center;
    object-fit: contain;
    display: block;
  }
}
.portfolio-section .slider {
  overflow: hidden;
}
@media (min-width: 900px) {
  .portfolio-section .slider .slide {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
  }
  .portfolio-section .slide-img.portrait {
    height: 100% !important;
    width: auto !important;
    object-fit: contain !important;
    object-position: center center;
    max-width: none !important;
    display: block !important;
  }
  .portfolio-section .slide-img.landscape {
    width: 100% !important;
    height: auto !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center;
    display: block !important;
  }
}
.albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  padding: 30px 20px;
  max-width: 1000px;
  margin: 0 auto;
}
.album-tile {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.album-tile:hover {
  transform: translateY(-5px);
}
.album-cover {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: 8px;
  box-shadow: 
    0 4px 8px rgba(0,0,0,0.2),
    0 2px 4px rgba(0,0,0,0.1);
  background: #808080;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid #666;
}
.album-tile:hover .album-cover {
  box-shadow: 
    0 8px 16px rgba(0,0,0,0.3),
    0 4px 8px rgba(0,0,0,0.2);
}
.album-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.album-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  filter: blur(1px);
}
.decorative-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background-image: 
    radial-gradient(ellipse 25px 12px at 50% 20px, rgba(105,105,105,0.8) 30%, transparent 50%),
    radial-gradient(ellipse 15px 8px at 20% 15px, rgba(128,128,128,0.7) 35%, transparent 60%),
    radial-gradient(ellipse 15px 8px at 80% 15px, rgba(128,128,128,0.7) 35%, transparent 60%),
    radial-gradient(ellipse 8px 12px at 35% 25px, rgba(169,169,169,0.6) 40%, transparent 70%),
    radial-gradient(ellipse 8px 12px at 65% 25px, rgba(169,169,169,0.6) 40%, transparent 70%),
    linear-gradient(90deg, transparent 0%, rgba(105,105,105,0.5) 20%, rgba(105,105,105,0.7) 50%, rgba(105,105,105,0.5) 80%, transparent 100%),
    radial-gradient(circle 2px at 15% 20px, rgba(105,105,105,0.9), transparent),
    radial-gradient(circle 2px at 25% 30px, rgba(105,105,105,0.9), transparent),
    radial-gradient(circle 2px at 75% 30px, rgba(105,105,105,0.9), transparent),
    radial-gradient(circle 2px at 85% 20px, rgba(105,105,105,0.9), transparent);
  background-size: 
    50px 25px, 30px 16px, 30px 16px, 16px 24px, 16px 24px, 100% 2px,
    4px 4px, 4px 4px, 4px 4px, 4px 4px;
  background-position: 
    center 0, 20% center, 80% center, 35% center, 65% center, center 15px,
    15% 50%, 25% 75%, 75% 75%, 85% 50%;
  background-repeat: no-repeat;
  z-index: 3;
  transform: translateZ(10px);
}
.decorative-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  background-image: 
    radial-gradient(ellipse 25px 12px at 50% calc(100% - 20px), rgba(105,105,105,0.8) 30%, transparent 50%),
    radial-gradient(ellipse 15px 8px at 20% calc(100% - 15px), rgba(128,128,128,0.7) 35%, transparent 60%),
    radial-gradient(ellipse 15px 8px at 80% calc(100% - 15px), rgba(128,128,128,0.7) 35%, transparent 60%),
    radial-gradient(ellipse 8px 12px at 35% calc(100% - 25px), rgba(169,169,169,0.6) 40%, transparent 70%),
    radial-gradient(ellipse 8px 12px at 65% calc(100% - 25px), rgba(169,169,169,0.6) 40%, transparent 70%),
    linear-gradient(90deg, transparent 0%, rgba(105,105,105,0.5) 20%, rgba(105,105,105,0.7) 50%, rgba(105,105,105,0.5) 80%, transparent 100%),
    radial-gradient(circle 2px at 15% calc(100% - 20px), rgba(105,105,105,0.9), transparent),
    radial-gradient(circle 2px at 25% calc(100% - 30px), rgba(105,105,105,0.9), transparent),
    radial-gradient(circle 2px at 75% calc(100% - 30px), rgba(105,105,105,0.9), transparent),
    radial-gradient(circle 2px at 85% calc(100% - 20px), rgba(105,105,105,0.9), transparent);
  background-size: 
    50px 25px, 30px 16px, 30px 16px, 16px 24px, 16px 24px, 100% 2px,
    4px 4px, 4px 4px, 4px 4px, 4px 4px;
  background-position: 
    center bottom, 20% center, 80% center, 35% center, 65% center, center calc(100% - 15px),
    15% 50%, 25% 25%, 75% 25%, 85% 50%;
  background-repeat: no-repeat;
  z-index: 3;
  transform: translateZ(10px);
}
.album-title {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) translateZ(15px);
  color: #2C1810;
  padding: 20px 25px;
  font-size: 1.581em;
  font-weight: 700;
  text-align: center;
  font-family: 'Times New Roman', serif;
  text-transform: none;
  letter-spacing: 2px;
  text-shadow: 
    0 2px 4px rgba(255,255,255,0.9),
    0 0 10px rgba(255,255,255,0.8),
    0 4px 8px rgba(0,0,0,0.3);
  background: rgba(255,255,255,0.8);
  border-radius: 8px;
  border: 3px solid #444;
  box-shadow: 
    0 4px 15px rgba(0,0,0,0.4),
    inset 0 2px 6px rgba(255,255,255,0.7),
    inset 0 -2px 6px rgba(0,0,0,0.1);
  backdrop-filter: blur(3px);
  max-width: 80%;
  word-wrap: break-word;
  line-height: 1.2;
  z-index: 4;
}
@media (max-width: 768px) {
  .albums-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 15px;
  }
  .album-cover {
    height: 250px;
  }
  .decorative-top,
  .decorative-bottom {
    height: 25px;
  }
  .album-title {
    font-size: 1.02em;
    padding: 12px 15px;
    max-width: 85%;
    letter-spacing: 1px;
  }
}

/* Album and Portfolio Page Styles */
.album-section h2, .portfolio-section h2 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 1.8em;
  color: #333;
  font-weight: 300;
}

/* Social sharing styles */
.description-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
}

.photo-title {
  display: block;
  text-align: center;
}

.social-share {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.share-label {
  font-size: 0.9em;
  color: #999;
  margin-right: 5px;
}

.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #333;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s ease;
}

.social-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.social-icon .fab.fa-facebook-f {
  color: #1877f2;
}

.social-icon:hover .fab.fa-facebook-f {
  background: #1877f2;
  color: white;
}

.social-icon .fab.fa-twitter {
  color: #1da1f2;
}

.social-icon:hover .fab.fa-twitter {
  background: #1da1f2;
  color: white;
}

.social-icon .fab.fa-vk {
  color: #4680c2;
}

.social-icon:hover .fab.fa-vk {
  background: #4680c2;
  color: white;
}

.social-icon .fab.fa-telegram {
  color: #0088cc;
}

.social-icon:hover .fab.fa-telegram {
  background: #0088cc;
  color: white;
}

.social-icon .fas.fa-link {
  color: #ffa500;
}

.social-icon:hover .fas.fa-link {
  background: #ffa500;
  color: white;
}

/* Mobile responsive */
@media (max-width: 600px) {
  .description-content {
    gap: 8px;
  }
  
  .social-share {
    gap: 6px;
  }
  
  .social-icon {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
  
  .share-label {
    font-size: 0.8em;
  }
}