/* ============================================================
   SnippetHub — Theme Cyan (Glassmorphism)
   Подключи во всех PHP файлах:
   <link rel="stylesheet" href="theme-cyan.css">
   ============================================================ */

:root {
  --accent:        #22d3ee;
  --accent-dark:   #0891b2;
  --accent-dim:    rgba(34, 211, 238, 0.1);
  --accent-border: rgba(34, 211, 238, 0.22);
  --accent-glow:   rgba(34, 211, 238, 0.06);
  --bg:            #020c10;
  --bg-card:       rgba(34, 211, 238, 0.05);
  --bg-input:      rgba(0, 0, 0, 0.4);
  --text:          #cff5fa;
  --text-muted:    #3d7a84;
  --text-dim:      #1e4a52;
  --border:        rgba(34, 211, 238, 0.16);
  --border-dashed: rgba(34, 211, 238, 0.28);
  --radius:        10px;
  --radius-lg:     14px;
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: monospace;
  padding: 16px;
  margin: 0;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #67e8f9; }

h1, h2, h3 { color: var(--text); }

.header { margin-bottom: 24px; }
.header h1 {
  font-size: 20px;
  margin: 0 0 6px 0;
  color: var(--accent);
  text-shadow: 0 0 30px rgba(34,211,238,0.25);
}
.header h2 {
  font-size: 13px;
  font-weight: normal;
  color: var(--text-muted);
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.nav { display: flex; gap: 8px; flex-wrap: wrap; }
.nav a {
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  text-decoration: none;
  border: 1px solid var(--accent-border);
  color: var(--text-muted);
  background: transparent;
  transition: 0.2s;
}
.nav a:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-dim); }
.nav a.active { background: var(--accent); color: #020c10; border-color: var(--accent); font-weight: bold; }
.nav a.apps { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-border); }

.post {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  transition: border-color 0.2s;
}
.post:hover { border-color: var(--accent-border); }
.post h2 { font-size: 15px; margin: 0 0 8px 0; }
.post h2 a { color: var(--text); }
.post h2 a:hover { color: var(--accent); }
.post p { color: var(--text-muted); font-size: 13px; margin: 0 0 12px 0; line-height: 1.5; }

.result {
  margin-top: 10px;
  min-height: 40px;
  border: 1px dashed var(--border-dashed);
  padding: 10px;
  border-radius: var(--radius);
  background: var(--accent-glow);
}

button {
  margin: 5px;
  padding: 8px 14px;
  font-family: monospace;
  font-size: 13px;
  border-radius: var(--radius);
  cursor: pointer;
  border: 1px solid var(--accent-border);
  background: transparent;
  color: var(--accent);
  transition: 0.2s;
}
button:hover { background: var(--accent); color: #020c10; border-color: var(--accent); }
button[name="new_post"], button[type="submit"] {
  background: var(--accent);
  color: #020c10;
  border-color: var(--accent);
  font-weight: bold;
  width: 100%;
  padding: 12px;
  margin: 10px 0 0 0;
}
button[name="new_post"]:hover, button[type="submit"]:hover { background: #67e8f9; }

textarea, input[type=text], input[type=password], input[type=number] {
  width: 100%;
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px;
  margin: 6px 0;
  font-family: monospace;
  font-size: 13px;
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
textarea:focus, input:focus { outline: none; border-color: var(--accent); }
textarea { height: 180px; resize: vertical; }

.badge { color: #f472b6; }

pre {
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  padding: 14px;
  border-radius: var(--radius);
  overflow: auto;
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
}

#loader { text-align: center; padding: 20px; color: var(--text-dim); font-size: 13px; }

.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; gap: 10px; }
.back, .back-btn { color: var(--accent); text-decoration: none; font-size: 14px; }
.site-title { font-size: 16px; font-weight: bold; flex: 1; text-align: center; color: var(--accent); }
.btn-create {
  padding: 8px 14px;
  background: var(--accent);
  color: #020c10;
  text-decoration: none;
  border-radius: 20px;
  font-weight: bold;
  font-size: 13px;
  white-space: nowrap;
}
.btn-create:hover { background: #67e8f9; color: #020c10; }

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 16px;
  overflow: hidden;
  transition: border-color 0.2s;
  backdrop-filter: blur(10px);
}
.card:active { border-color: var(--accent); }
.card-body { padding: 14px; }
.card-body h3 { margin: 0 0 6px 0; font-size: 15px; color: var(--text); }
.card-body p { color: var(--text-muted); font-size: 13px; margin: 0 0 12px 0; line-height: 1.5; }

.preview-wrap { width: 100%; height: 380px; background: #fff; position: relative; overflow: hidden; }
.preview-wrap iframe { width: 100%; height: 100%; border: none; pointer-events: none; display: block; }

.code-preview {
  background: rgba(0,0,0,0.5);
  padding: 12px 14px;
  overflow: hidden;
  max-height: 100px;
  position: relative;
  border-bottom: 1px solid var(--border);
}
.code-preview code { font-size: 12px; color: var(--accent); line-height: 1.5; white-space: pre; display: block; }
.code-preview::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40px;
  background: linear-gradient(transparent, #020c10);
}

.card-actions { display: flex; gap: 8px; }
.btn {
  flex: 1;
  text-align: center;
  padding: 10px;
  border-radius: var(--radius);
  font-family: monospace;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  border: none;
  margin: 0;
}
.btn-primary { background: var(--accent); color: #020c10; }
.btn-primary:hover { background: #67e8f9; color: #020c10; }
.btn-outline { background: transparent; color: var(--accent); border: 1px solid var(--accent-border); }
.btn-outline:hover { background: var(--accent); color: #020c10; }

.views { font-size: 12px; color: var(--text-dim); margin-top: 10px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tab {
  padding: 8px 16px;
  border: 1px solid var(--accent-border);
  background: transparent;
  color: var(--text-muted);
  font-family: monospace;
  font-size: 13px;
  cursor: pointer;
  border-radius: 20px;
  margin: 0;
  transition: 0.2s;
}
.tab.active { background: var(--accent); color: #020c10; font-weight: bold; border-color: var(--accent); }

.preview-frame-wrap { margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.preview-frame-wrap iframe { width: 100%; height: 300px; border: none; background: #fff; display: block; }

.actions { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

.premium-block {
  border: 1px solid #f43f5e;
  padding: 15px;
  border-radius: var(--radius);
  margin-bottom: 14px;
  text-align: center;
  background: rgba(244,63,94,0.05);
}

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
label { display: block; color: var(--text-muted); font-size: 13px; margin-bottom: 5px; }
.hint { font-size: 12px; color: var(--text-dim); margin: -10px 0 14px 0; }

#preview-box { margin-top: 20px; border: 1px dashed var(--border-dashed); border-radius: var(--radius-lg); padding: 10px; }
#preview-box h3 { margin: 0 0 10px 0; font-size: 13px; color: var(--text-muted); }
#preview-frame { width: 100%; height: 300px; border: none; background: #fff; border-radius: var(--radius); }

@media (max-width: 600px) {
  button { width: 100%; margin-top: 8px; }
  .cols { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
}
