/* СТИЛИ ПАНЕЛИ */
.site-panel {
    background-color: #0d2957;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 60px;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.site-panel a {
    display: flex;
    align-items: center;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    outline: none;
}

.panel-left {
    margin: 0;
    display: flex;
    align-items: center;
}

.panel-left a {
    padding-left: 5px;
    display: flex;
    align-items: center;
}

.panel-logo {
    width: 2.5em;
    height: 2.5em;
    flex-shrink: 0;
}

.panel-title {
    display: flex;
    align-items: center;
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1.2em;
    padding-left: 10px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7), -1px -1px 2px rgba(0, 0, 0, 0.7);
}

.panel-title-text {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7), -2px -2px 4px rgba(0, 0, 0, 0.7);
    font-size: 1.2em;
    font-weight: bold;
    white-space: nowrap;
}

.panel-right {
    display: flex;
    align-items: center;
    padding: 0;
}

.panel-right a {
    margin-left: 0;
}

.panel-icon {
    width: 3em;
    height: 3em;
}

.panel-right a:not(:last-child) {
    margin-right: 10px;
}

/* Кнопка темы */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.08);
}

.theme-toggle:active {
    transform: scale(0.92);
}

.theme-icon {
    width: 26px;
    height: 26px;
    color: white;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.sun-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    color: white;
}

.moon-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotate(-90deg);
    color: white;
}

[data-theme="dark"] .sun-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotate(90deg);
}

[data-theme="dark"] .moon-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

[data-theme="light"] .sun-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1) rotate(0deg);
}

[data-theme="light"] .moon-icon {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5) rotate(-90deg);
}

.theme-toggle.animating .sun-icon,
.theme-toggle.animating .moon-icon {
    animation: pulse 0.4s ease;
}

/* Кнопка установки PWA в панели */
.pwa-install-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-right: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
}

.pwa-install-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: scale(1.08);
}

.pwa-install-btn:active {
    transform: scale(0.92);
}

.pwa-install-btn i {
    font-size: 2em;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

.pwa-install-btn.hidden {
    display: none !important;
}

/* Индикатор оффлайн режима */
.offline-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #ffcc00;
    margin-right: 5px;
    cursor: default;
}

.offline-indicator i {
    font-size: 1.3em;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Адаптивность панели - теперь всегда показываем mrpltrans */
@media screen and (max-width: 320px) {
    .panel-title-text {
        font-size: 1em;
    }
}

@media screen and (max-width: 270px) {
    .panel-title {
        display: none;
    }
    .panel-left a {
        padding-right: 5px;
    }
}