:root {
  --bg-default: #0f0f10;
  --panel: #141824;
  --panel2: #1f2233;
  --text: #eef1ff;
  --subtext: #b5bbd1;
  --border: 1px solid rgba(255,255,255,.12);
  --shadow: 0 30px 60px rgba(0,0,0,.5);
  --accent: #6ea8fe;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-default);
  color: var(--text);
  font-family: "Roboto Mono", "IBM Plex Mono", "Courier New", monospace;
}

.theme-light {
  --bg-default: #f9fafb;
  --panel: #ffffff;
  --panel2: #f3f4f6;
  --text: #1c1c1c;
  --subtext: #5c5f6a;
  --border: 1px solid rgba(28,28,28, .08);
  --shadow: 0 25px 50px rgba(0,0,0,.08);
}

.theme-saint-patricks {
  --bg-default: #0f2c1a;
  --panel: #163b22;
  --panel2: #1e4a2b;
  --text: #eef9f0;
  --subtext: #b8d8bf;
  --border: 1px solid rgba(198, 241, 204, .22);
  --shadow: 0 25px 50px rgba(0,0,0,.28);
  --accent: #8fd66e;
}

.theme-easter {
  --bg-default: #fff8fb;
  --panel: #ffffff;
  --panel2: #f5f0ff;
  --text: #3a3247;
  --subtext: #7d7192;
  --border: 1px solid rgba(122, 104, 153, .18);
  --shadow: 0 25px 50px rgba(110,90,140,.14);
  --accent: #ff8fb1;
}

.theme-fourth-july {
  --bg-default: #0b1b45;
  --panel: #13357d;
  --panel2: #1a4ba8;
  --text: #ffffff;
  --subtext: #e1e9ff;
  --border: 1px solid rgba(255,255,255,.28);
  --shadow: 0 25px 50px rgba(0,0,0,.36);
  --accent: #d92532;
}

body.theme-fourth-july {
  background:
    radial-gradient(circle at 12px 12px, rgba(255,255,255,.26) 0 2px, transparent 2.4px) 0 0/44px 44px,
    repeating-linear-gradient(180deg, rgba(217,37,50,.10) 0 16px, rgba(255,255,255,.06) 16px 32px),
    linear-gradient(140deg, #0b1b45 0%, #13357d 55%, #1a4ba8 100%);
}

.site-header {
  position: relative;
  background: linear-gradient(135deg, var(--panel), var(--panel2));
  border-bottom: var(--border);
  height: 68px;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: "Courier New", Courier, monospace;
}

.site-header .logo img {
  height: 48px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
}

.header-messenger-btn{
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.08);
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .18s ease, transform .14s ease;
  color: #f7f8ff;
}
.header-messenger-btn:hover{ background: rgba(255,255,255,.16); transform: translateY(-1px); }
.header-messenger-btn:active{ transform: translateY(0); }

.header-messenger-icon{
  width: 20px;
  height: 20px;
  display: block;
  background-repeat: no-repeat;
  background-size: contain;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><defs><linearGradient id='g' x1='0' y1='0' x2='1' y2='1'><stop offset='0%' stop-color='%236ddcff'/><stop offset='100%' stop-color='%237f60f9'/></linearGradient></defs><path fill='url(%23g)' d='M12 3C6.7 3 2.5 6.9 2.5 11.7c0 2.6 1.2 4.9 3.1 6.5V21l3.3-1.8c1 .3 2 .5 3.1.5 5.3 0 9.5-3.9 9.5-8.7C21.5 6.9 17.3 3 12 3Zm4.1 8.1-2.4-.7-1.9 2.1-2.1-2.1-3.1.7 4.5-4.1 2.1 2 2.9.1-2.8 2z'/></svg>");
}

.header-messenger-link{
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.24);
  padding: 10px 14px;
  background: rgba(255,255,255,.08);
  color: #f7f8ff;
  font-size: 14px;
  text-decoration: none;
  transition: background .18s ease, transform .14s ease;
}
.header-messenger-link:hover{ background: rgba(255,255,255,.16); transform: translateY(-1px); }
.header-messenger-link:active{ transform: translateY(0); }

.sr-only{
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
}

.header-bubble {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  cursor: pointer;
  overflow: hidden;
  padding: 0;
  background: transparent;
  border: none;
  display: inline-flex;
  align-items: stretch;
}

.header-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.theme-toggle {
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  background: rgba(255,255,255,.12);
  color: var(--text);
  font-size: 14px;
  cursor: pointer;
}

.theme-toggle:hover {
  background: rgba(255,255,255,.2);
}

.header-messenger-panel{
  position: fixed;
  left: auto;
  right: 16px;
  top: 76px;
  width: 360px;
  max-width: calc(100vw - 24px);
  min-height: 420px;
  height: 520px;
  max-height: calc(100vh - 32px);
  background: #0f0f12;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  box-shadow: 0 18px 48px rgba(0,0,0,.4);
  overflow: hidden;
  display: none;
  z-index: 12000;
}
.header-messenger-panel.open{ display:block; }
.header-messenger-frame-wrap{
  width: 100%;
  height: calc(100% - 44px);
  background: #0f0f12;
}
.header-messenger-frame-wrap iframe{
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
}
.header-messenger-actions{
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: rgba(255,255,255,.05);
  border-top: 1px solid rgba(255,255,255,.12);
}
.header-messenger-btn-min{
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.1);
  color: var(--text);
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
}
.header-messenger-btn-min:hover{ background: rgba(255,255,255,.18); }

/* Floating messenger shared (layout handled by messenger-embed.css) */
.msgr-float{ z-index:12000; }

.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: var(--panel);
  border: var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  min-width: 220px;
  gap: 8px;
}

.dropdown-menu a,
.dropdown-menu button {
  text-decoration: none;
  color: var(--text);
  background: none;
  border: none;
  text-align: left;
  padding: 8px 12px;
  border-radius: 10px;
  font-family: "Courier New", Courier, monospace;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
  background: rgba(255,255,255,.08);
}

.dropdown-icon {
  width: 20px;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
}

main {
  padding: calc(68px + 32px) 32px 48px;
}

.hero {
  background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(255,255,255,.02));
  border-radius: 16px;
  border: var(--border);
  padding: 28px;
  box-shadow: var(--shadow);
}

footer {
  width: min(1280px, calc(100% - 32px));
  margin: 18px auto 24px;
  padding: 6px 2px;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-family: "Courier New", Courier, monospace;
  color: var(--subtext);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

footer p {
  margin: 0;
}

footer a {
  color: var(--accent);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
