:root {
  --bg: #e4e6ec;
  --ink: #1d2033;
  --ink-soft: #4a4f66;
  --card: #ffffff;
  --sidebar: #1d2033;
  --sidebar-text: #d6d9ee;
  --line: #c8ccd9;

  --rdr2: #a8322d;      
  --gow: #3b82a4;       
  --batman: #d19a0a;    
  --cyberpunk: #d81b6a; 
  
  --font: system-ui, sans-serif;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  line-height: 1.6;
}

.layout-container {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 95vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 95vh;
  padding: 2rem 1.25rem;
  background: var(--sidebar);
  border-radius: 0 24px 24px 0;
  box-shadow: 4px 0 24px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.sidebar nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: 12px;
  text-decoration: none;
  color: var(--sidebar-text);
  font-weight: 600;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.sidebar nav a:hover {
  background: #1d2033;
  color: #fff;
}

.sidebar nav li:first-child a {
  display: block;
  margin-bottom: 1.25rem;
  padding: 0 0.9rem 1.25rem;
  border-radius: 0;
  border-bottom: 1px solid #ffffff;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.sidebar nav li a::before {
  content: "";
  flex: none;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--dot, #fff);
}

.sidebar nav li:nth-child(2) { --dot: var(--rdr2); }
.sidebar nav li:nth-child(3) { --dot: var(--gow); }
.sidebar nav li:nth-child(4) { --dot: var(--batman); }
.sidebar nav li:nth-child(5) { --dot: var(--cyberpunk); }

.sidebar .footer {
  margin-top: auto;
  padding: 1rem 1rem;
  border-top: 1px solid #ffffff;
  color: var(--sidebar-text);
  font-size: 1rem;
}

.sidebar .footer p {
  margin: 0;
}

.sidebar .footer a {
  display: inline;
  padding: 0;
  font-weight: 800;
}

.sidebar .footer a:hover {
  background: none;
}

.google span:nth-child(1),
.google span:nth-child(4) { color: #4285f4; }
.google span:nth-child(2),
.google span:nth-child(6) { color: #ea4335; }
.google span:nth-child(3) { color: #fbbc05; }
.google span:nth-child(5) { color: #34a853; }

.main-content {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 4vw;
  padding: 5vh;
}

.container-half {
  flex: 1 1 420px;
  min-width: 0;
  max-width: 760px;
}

body.rdr2 { --c: var(--rdr2); }
body.gow { --c: var(--gow); }
body.bm-ak { --c: var(--batman); }
body.cyp2077 { --c: var(--cyberpunk); }

body[class] .container-half h1::before {
  content: "";
  display: block;
  width: 4.5rem;
  height: 0.5rem;
  margin-bottom: 1.25rem;
  border-radius: 4px;
  background: var(--c);
}

.container-half h1 {
  margin: 0 0 1.25rem;
  font-size: 4rem;
  font-weight: 800;
  line-height: 1.05;
  text-wrap: balance;
}

.container-half h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.6rem;
  line-height: 1.2;
}

.container-half p {
  max-width: 62ch;
  color: var(--ink-soft);
}

.main-content .container-half > img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 10px 10px 0;
  border: 3px solid #565656;
  border-radius: 16px;
  box-shadow: 10px 10px 0 var(--c, #293251);
}

.main-content ol {
  display: grid;
  gap: 1rem;
  list-style: none;
  margin: 2.5rem 0;
  padding: 0;
}

.main-content ol li {
  counter-increment: rank;
  margin: 0;
  color: var(--ink);
  font-weight: 700;
}

.main-content ol li:nth-child(1) { --c: var(--rdr2); }
.main-content ol li:nth-child(2) { --c: var(--gow); }
.main-content ol li:nth-child(3) { --c: var(--batman); }
.main-content ol li:nth-child(4) { --c: var(--cyberpunk); }

.main-content ol a {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.1rem 1.75rem;
  background: var(--card);
  border-left: 8px solid var(--c, var(--ink));
  border-radius: 16px;
  box-shadow: 0 2px 10px;
  text-decoration: none;
  color: var(--ink);
  font-size: 1.35rem;
  line-height: 1.2;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.main-content ol a::before {
  content: counter(rank);
  min-width: 1.4ch;
  color: var(--c, var(--ink));
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}

.main-content ol a:hover {
  transform: translateX(6px);
  box-shadow: 0 6px 20px;
}

.footer {
  position: static;
}

.container-half .footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.container-half .footer p {
  margin: 0;
}

.footer img {
  display: block;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.container-half form {
  padding: 2rem 2.25rem;
  background: var(--card);
  border-left: 8px solid var(--sidebar);
  border-radius: 16px;
  box-shadow: 0 2px 10px;
}

.container-half form h2 {
  margin: 0 0 1.25rem;
  font-size: 1.6rem;
  font-weight: 800;
}

.container-half form table,
.container-half form tbody,
.container-half form tr,
.container-half form td {
  display: block;
  width: 100%;
  padding: 0;
}

.container-half form tr {
  margin-bottom: 1.1rem;
}

.container-half form td:first-child {
  margin-bottom: 0.35rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
}

.container-half form input[type="text"],
.container-half form input[type="email"],
.container-half form textarea {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 1rem;
  background: var(--bg);
  border: 2px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font: inherit;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.container-half form textarea {
  min-height: 9rem;
  max-height: 20rem;
  resize: vertical;
}

.container-half form input:focus,
.container-half form textarea:focus {
  outline: none;
  background: #fff;
  border-color: var(--sidebar);
}

.container-half form input[type="submit"] {
  margin-top: 0.5rem;
  padding: 0.75rem 2rem;
  background: var(--sidebar);
  border: none;
  border-radius: 12px;
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.container-half form input[type="submit"]:hover {
  transform: translateX(6px);
  box-shadow: 0 6px 20px;
}

.container-half form .error {
  display: block;
  margin-top: 0.3rem;
  color: var(--rdr2);
  font-size: 0.9rem;
  font-weight: 600;
}

.container-half form p.success {
  max-width: none;
  margin: 1.25rem 0 0;
  padding: 0.75rem 1rem;
  background: #e3f3e6;
  border-left: 6px solid #2e8b4a;
  border-radius: 12px;
  color: #1f5d33;
  font-weight: 600;
}
