/* ============================================================
   Sekai — rail.css
   Правая панель: часы, орба, профиль, быстрые действия,
   погода, баннер (декор + ссылки на существующие разделы).
============================================================ */

.rail {
  width: var(--rail-w);
  min-width: var(--rail-w);
  height: calc(100vh - 32px);
  margin: 16px 0 16px 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 18px;
  background: var(--glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-line);
  border-radius: 30px;
  box-shadow: var(--glass-shadow);
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 20;
}

.rail::-webkit-scrollbar { width: 0; }

/* ============================================================
   ЧАСЫ
============================================================ */
.rail-clock {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 16px 18px 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--glass-line);
  border-radius: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.rail-time {
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  line-height: 1;
  text-shadow: 0 0 30px rgba(120, 150, 255, 0.45);
}

.rail-date {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: lowercase;
  color: var(--text-3);
}

/* ============================================================
   ОРБА (декоративная)
============================================================ */
.rail-orb {
  position: relative;
  height: 138px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.orb-sphere {
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, rgba(120, 150, 255, 0.55), rgba(40, 56, 120, 0.55) 45%, rgba(8, 11, 26, 0.98) 78%),
    #070a18;
  box-shadow:
    inset -12px -14px 30px rgba(0, 0, 0, 0.75),
    inset 8px 10px 26px rgba(130, 160, 255, 0.22),
    0 0 46px rgba(90, 120, 255, 0.40);
  position: relative;
  z-index: 2;
}

.orb-glow {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: radial-gradient(circle,
    rgba(110, 130, 255, 0.35) 0%,
    rgba(150, 90, 255, 0.18) 45%,
    transparent 70%);
  filter: blur(14px);
  z-index: 1;
  animation: orbBreath 5s ease-in-out infinite alternate;
}

.orb-ring {
  position: absolute;
  width: 138px;
  height: 138px;
  z-index: 3;
  animation: orbSpin 16s linear infinite;
  pointer-events: none;
}

.orb-ring::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(158, 184, 255, 0.55);
  border-right-color: rgba(150, 100, 255, 0.85);
  border-bottom-color: transparent;
  transform: scaleY(0.44) rotate(-24deg);
  box-shadow: 0 0 16px rgba(120, 150, 255, 0.35);
}

.orb-ring-2 {
  width: 168px;
  height: 168px;
  animation: orbSpin 26s linear infinite reverse;
}

.orb-ring-2::before {
  border: 1px solid rgba(150, 175, 255, 0.30);
  border-left-color: rgba(140, 200, 255, 0.55);
  border-top-color: transparent;
  transform: scaleY(0.36) rotate(34deg);
}

@keyframes orbSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

@keyframes orbBreath {
  from { opacity: 0.7; transform: scale(0.96); }
  to   { opacity: 1;   transform: scale(1.05); }
}

/* ============================================================
   КАРТОЧКИ (профиль / статус)
============================================================ */
.rail-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  text-align: left;
  cursor: pointer;
  transition: all var(--t);
  position: relative;
  overflow: hidden;
}

.rail-card:hover {
  background: rgba(79, 125, 255, 0.10);
  border-color: rgba(125, 155, 255, 0.38);
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(10, 20, 60, 0.45);
}

.rail-card:active { transform: scale(0.99); }

.rail-card-status { cursor: default; }
.rail-card-status:hover {
  background: rgba(255, 255, 255, 0.045);
  border-color: var(--glass-line);
  transform: none;
  box-shadow: none;
}

.rail-card-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(79, 125, 255, 0.16);
  border: 1px solid rgba(125, 155, 255, 0.30);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9db6ff;
  flex-shrink: 0;
}

.rail-card-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.6;
}

.rail-status-icon {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.30);
}

.rail-status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 12px rgba(52, 211, 153, 0.9);
  position: relative;
}

.rail-status-dot::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1px solid rgba(52, 211, 153, 0.45);
  animation: statusPulse 2.4s ease-out infinite;
}

.rail-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rail-card-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.1px;
}

.rail-card-sub {
  font-size: 11px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-card-arrow,
.rail-quick-arrow {
  font-size: 17px;
  font-weight: 400;
  color: var(--text-4);
  line-height: 1;
  flex-shrink: 0;
  transition: transform var(--t-fast), color var(--t-fast);
}

.rail-card:hover .rail-card-arrow { color: var(--text-2); transform: translateX(2px); }

.rail-spark {
  width: 56px;
  height: 22px;
  flex-shrink: 0;
  opacity: 0.75;
}

/* ============================================================
   БЫСТРЫЕ ДЕЙСТВИЯ
============================================================ */
.rail-quick {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rail-quick-title {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 0 2px;
}

.rail-quick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  text-align: left;
  cursor: pointer;
  transition: all var(--t);
}

.rail-quick-item:hover {
  background: rgba(79, 125, 255, 0.10);
  border-color: rgba(125, 155, 255, 0.36);
  transform: translateX(2px);
}

.rail-quick-item:active { transform: scale(0.99); }

.rail-quick-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  flex-shrink: 0;
  transition: all var(--t);
}

.rail-quick-item:hover .rail-quick-icon {
  background: rgba(79, 125, 255, 0.22);
  border-color: rgba(125, 155, 255, 0.40);
  color: #cfe0ff;
}

.rail-quick-icon svg {
  width: 15px;
  height: 15px;
  stroke-width: 1.6;
}

.rail-quick-label {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-quick-item:hover .rail-quick-label { color: var(--text); }
.rail-quick-item:hover .rail-quick-arrow { color: var(--text-2); transform: translateX(2px); }

/* ============================================================
   ПОГОДА
============================================================ */
.rail-weather {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--glass-line);
  border-radius: 18px;
  cursor: default;
}

.rail-weather-icon {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: rgba(79, 125, 255, 0.16);
  border: 1px solid rgba(125, 155, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #a8beff;
  flex-shrink: 0;
}

.rail-weather-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.5;
}

.rail-weather-temp {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.6px;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.rail-weather-city {
  flex: 1;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-3);
}

/* ============================================================
   БАННЕР
============================================================ */
.rail-banner {
  position: relative;
  margin-top: auto;
  min-height: 128px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(140, 165, 255, 0.24);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(30, 42, 92, 0.65) 0%, rgba(46, 34, 110, 0.75) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.rail-banner-wave {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(120% 75% at 15% 100%, rgba(79, 125, 255, 0.85), transparent 62%),
    radial-gradient(110% 85% at 85% 110%, rgba(168, 116, 255, 0.85), transparent 64%),
    radial-gradient(95% 65% at 55% 130%, rgba(80, 200, 255, 0.55), transparent 62%),
    linear-gradient(180deg, rgba(40, 54, 118, 0.75) 0%, rgba(60, 44, 138, 0.85) 100%);
  animation: bannerFlow 9s ease-in-out infinite alternate;
}

.rail-banner-wave::after {
  content: '';
  position: absolute;
  left: -20%;
  right: -20%;
  top: 36%;
  height: 130%;
  background:
    radial-gradient(60% 50% at 30% 40%, rgba(255, 255, 255, 0.28), transparent 70%),
    radial-gradient(70% 60% at 75% 60%, rgba(160, 200, 255, 0.34), transparent 70%);
  filter: blur(12px);
}

@keyframes bannerFlow {
  from { transform: translate(-4%, 2%) scale(1.05); }
  to   { transform: translate(4%, -3%) scale(1.12); }
}

.rail-banner-body {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.rail-banner-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 2.4px;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.rail-banner-sub {
  font-size: 11.5px;
  color: rgba(235, 242, 255, 0.78);
}

.rail-banner-arrow {
  position: relative;
  z-index: 2;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #fff;
  flex-shrink: 0;
  margin-left: auto;
}

/* ============================================================
   АДАПТИВ
============================================================ */
@media (max-width: 1500px) {
  .rail { display: none; }
}
