/* menu.css */

:root{
  --header-h: 52px;
  --bg: #0f172a;
  --panel: #111827;
  --panel-2: #0b1220;
  --text: #e5e7eb;
  --muted: rgba(229,231,235,.75);
  --accent: #3b82f6;
  --danger: #ef4444;
  --shadow: 0 10px 30px rgba(0,0,0,.25);
  --border: rgba(255,255,255,.10);
}

*{ box-sizing: border-box; }

html, body{
  height: 100%;
}

body{
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

.app{
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.header{
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  background: rgba(17,24,39,.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
}

.header__left,
.header__right{
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Buttons */
.btn{
  border: 1px solid var(--border);
  background: rgba(59,130,246,.92);
  color: #fff;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 16px rgba(0,0,0,.18);
  transition: transform .08s ease, filter .15s ease;
  user-select: none;
}

.btn:hover{ filter: brightness(1.06); }
.btn:active{ transform: translateY(1px); }

.btn--danger{
  background: rgba(239,68,68,.92);
  padding: 8px 11px;
  font-size: 16px;
}

/* Main layout */
.main{
  display: flex;
  flex: 1;
  padding-top: var(--header-h);
  height: calc(100vh - var(--header-h));
  position: relative;
}

/* Sidebar */
.sidebar{
  width: 260px;
  background: linear-gradient(180deg, rgba(17,24,39,.96), rgba(11,18,32,.96));
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .22s ease, width .22s ease;
  z-index: 50;
}

.sidebar--hidden{
  width: 0;
  transform: translateX(-260px);
  overflow: hidden;
  border-right: none;
}

.sidebar__top{
  padding: 10px 10px 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar__close{
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(255,255,255,.06);
  cursor: pointer;
  font-size: 16px;
  user-select: none;
}

.sidebar__close:hover{ background: rgba(255,255,255,.10); }

.sidebar__title{
  font-weight: 800;
  letter-spacing: .2px;
  color: var(--text);
}

.sidebar__list{
  padding: 8px;
  overflow: auto;
}

.sidebar__link{
  display: block;
  padding: 12px 12px;
  margin: 6px 0;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  transition: background .15s ease, transform .08s ease;
}

.sidebar__link:hover{
  background: rgba(59,130,246,.15);
}

.sidebar__link:active{
  transform: translateY(1px);
}

/* Content */
.content{
  flex: 1;
  position: relative;
  background: var(--panel-2);
}

.iframe{
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #000;
}

/* Tap layer: ловит клик по контенту, чтобы закрыть меню
   (iframe клики не пробрасывает) */
.content__taplayer{
  position: absolute;
  inset: 0;
  border: 0;
  background: transparent;
  display: none;
  cursor: default;
}

.content__taplayer.is-on{
  display: block;
}

/* Mobile */
@media (max-width: 768px){
  .sidebar{
    position: absolute;
    left: 0;
    top: 0;
    height: calc(100vh - var(--header-h));
  }

  .sidebar--hidden{
    transform: translateX(-280px);
  }
}
