/* Winedroid shared stylesheet */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root {
  --dark:         #1c1a1b;
  --white:        #ffffff;
  --green:        #2b963e;
  --green-dark:   #174b24;
  --bg:           #f4f4f4;
  --surface:      #ffffff;
  --surface-2:    #f0f0f0;
  --border:       #e5e5e5;
  --text:         #1c1a1b;
  --text-muted:   #6b7280;
  --link:         #174b24;
  --link-hover:   #33b149;

  --platinum-bg:  #e4e4e4;
  --platinum-bd:  #aaaaaa;
  --gold-bg:      #f5c400;
  --gold-bd:      #c8a000;
  --silver-bg:    #c0c0c0;
  --silver-bd:    #999999;
  --bronze-bg:    #cd7f32;
  --bronze-text:  #ffffff;
  --garbage-bg:   #b71c1c;
  --garbage-text: #ffffff;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#page { flex: 1; width: 100%; }

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); }

/* ── Header ── */
#site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

#header-top {
  max-width: 1140px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
}

#logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

#logo img { height: 32px; width: auto; display: block; }

#header-bottom {
  border-top: 1px solid var(--border);
}

#header-bottom > nav {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
}

#main-nav {
  list-style: none;
  display: flex;
}

#main-nav li a {
  display: flex;
  align-items: center;
  padding: 0 14px;
  height: 40px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color .1s;
}

#main-nav li a:hover { color: var(--dark); }
#main-nav li a.active { color: var(--white); background: var(--green); }


#nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 10px 16px;
  margin-left: auto;
  line-height: 0;
}


/* ── Page wrapper ── */
#page { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ── Two-column layout ── */
#layout {
  display: flex;
  gap: 24px;
  margin: 24px 0 36px;
  align-items: flex-start;
}

/* ── Sidebar ── */
#sidebar { width: 196px; flex-shrink: 0; }

.sidebar-box { margin-bottom: 28px; }
.sidebar-box:last-child { margin-bottom: 0; }

.sidebar-box h3 {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding-bottom: 10px;
}

.sidebar-box ul { list-style: none; }

.sidebar-box ul li a {
  display: block;
  padding: 5px 0;
  font-size: 13px;
  color: #444;
  transition: color .1s;
}

.sidebar-box ul li a:hover { color: var(--dark); }
.sidebar-box ul li a.active { color: var(--green-dark); font-weight: 600; }

.sidebar-stat {
  padding: 5px 0;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-stat strong { color: var(--text); }

/* ── Main content ── */
#content {
  flex: 1;
  min-width: 0;
  background: var(--surface);
  padding: 28px;
  border: 1px solid var(--border);
}

#content-full {
  background: var(--surface);
  padding: 28px;
  margin: 24px 0 36px;
  border: 1px solid var(--border);
}

/* ── Headings ── */
h1 { font-size: 24px; font-weight: 700; margin-bottom: 16px; color: var(--dark); letter-spacing: -.3px; }
h2 { font-size: 15px; font-weight: 600; color: var(--dark); padding-bottom: 8px; margin: 28px 0 14px; border-bottom: 1px solid var(--border); }
h2:first-child { margin-top: 0; }
h3 { font-size: 14px; font-weight: 600; margin: 18px 0 8px; color: var(--dark); }
p { margin-bottom: 12px; }
p:last-child { margin-bottom: 0; }

#content ul, #content ol,
#content-full ul, #content-full ol { padding-inline-start: 0; list-style-position: inside; margin-bottom: 12px; }
#content li, #content-full li { margin-bottom: 4px; }

/* ── Tables ── */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: .5px;
}
td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* ── Rating badges ── */
.rating {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: default;
}
.platinum {
  background: linear-gradient(105deg, #b8b8b8 0%, #d8d8d8 20%, #f8f8f8 38%, #ffffff 43%, #f0f0f0 48%, #c8c8c8 62%, #e0e0e0 80%, #cccccc 100%);
  background-size: 300% 100%;
  animation: platinum-shimmer 4s ease-in-out infinite;
  color: #1a1a1a;
  border: 1px solid #a0a0a0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), 0 1px 3px rgba(0,0,0,.18);
  text-shadow: 0 1px 0 rgba(255,255,255,.5);
}

@keyframes platinum-shimmer {
  0%   { background-position: 0% center; }
  50%  { background-position: 100% center; }
  100% { background-position: 0% center; }
}
.gold {
  background: linear-gradient(135deg, #b87800 0%, #e6a817 25%, #f5c400 50%, #fada5e 60%, #c8860a 100%);
  color: #3d1f00;
  border: 1px solid #9a6500;
  box-shadow: inset 0 1px 0 rgba(255,250,180,.5), 0 1px 3px rgba(0,0,0,.2);
  text-shadow: 0 1px 0 rgba(255,240,100,.3);
}
.silver {
  background: linear-gradient(135deg, #787878 0%, #b0b0b0 35%, #c8c8c8 50%, #909090 75%, #b8b8b8 100%);
  color: #111;
  border: 1px solid #686868;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 3px rgba(0,0,0,.2);
  text-shadow: 0 1px 0 rgba(255,255,255,.25);
}
.bronze {
  background: linear-gradient(135deg, #7a3b10 0%, #b5651d 35%, #cd853f 55%, #a0522d 80%, #8b4513 100%);
  color: #fff;
  border: 1px solid #5c2e0a;
  box-shadow: inset 0 1px 0 rgba(255,200,140,.2), 0 1px 3px rgba(0,0,0,.25);
  text-shadow: 0 1px 1px rgba(0,0,0,.4);
}
.barely-works {
  background: linear-gradient(135deg, #6b1a00 0%, #a83000 35%, #c04000 55%, #8b2800 80%, #6b1a00 100%);
  color: #fff;
  border: 1px solid #4d1200;
  box-shadow: inset 0 1px 0 rgba(255,120,80,.15), 0 1px 3px rgba(0,0,0,.25);
  text-shadow: 0 1px 1px rgba(0,0,0,.4);
}
.garbage {
  background: linear-gradient(135deg, #2a1800 0%, #4d3010 35%, #5c3a18 55%, #3d2408 80%, #2a1800 100%);
  color: #d4a870;
  border: 1px solid #1a0f00;
  box-shadow: inset 0 1px 0 rgba(200,150,80,.15), 0 1px 3px rgba(0,0,0,.3);
  text-shadow: 0 1px 1px rgba(0,0,0,.5);
}

/* ── Hero ── */
.hero {
  min-height: 50vh;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 48px;
  margin: 24px 0 0;
}
.hero-text { flex: 1; min-width: 0; }
.hero-visual { flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.hero-visual img { width: 400px; height: auto; display: block; }
.hero h1 { font-size: 52px; color: var(--dark); margin-bottom: 18px; letter-spacing: -1.5px; line-height: 1.1; max-width: 700px; }
.hero p { font-size: 17px; color: var(--text-muted); max-width: 520px; margin-bottom: 28px; line-height: 1.65; }
.hero p:last-child { margin-bottom: 0; }

/* ── Home: what-is ── */
.what-is {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 28px 32px;
  margin: 20px 0 0;
}

.what-is h2 { margin-top: 0; font-size: 17px; }
.what-is p { color: var(--text-muted); max-width: 760px; margin-bottom: 0; font-size: 15px; line-height: 1.7; }

/* ── Home: nav cards ── */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 2px;
  margin: 2px 0 0;
}

.nav-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px 20px;
  display: block;
  text-decoration: none;
  transition: border-color .15s;
}

.nav-card:hover { border-color: var(--green); text-decoration: none; }
.nav-card:hover .nav-card-title { color: var(--green-dark); }

.nav-card-icon {
  width: 44px;
  height: 44px;
  background: rgba(51,177,73,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: var(--green-dark);
}

.nav-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
  transition: color .15s;
}

.nav-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Home: news strip ── */
.home-news {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 24px 28px;
  margin: 20px 0;
}

.home-news h2 { margin-top: 0; }

/* ── Home grid (legacy, kept for other uses) ── */
.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 2px 0 0; }

.home-box {
  background: var(--surface);
  padding: 24px;
  border: 1px solid var(--border);
}

.home-box h2 { margin-top: 0; }

/* ── News ── */
.news-item { padding: 18px 0; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; padding-bottom: 0; }
.news-item h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; color: var(--dark); }
.news-item h3 a { color: var(--dark); }
.news-item h3 a:hover { color: var(--green-dark); }
.news-date { color: var(--text-muted); font-size: 11px; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .8px; font-weight: 500; }
.news-meta { display: flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; }
.news-meta .news-date { margin-bottom: 0; }
.news-sep { color: var(--text-muted); }
#content-full .news-item h3 { font-size: 22px; margin-bottom: 6px; }

/* ── App page ── */
.app-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.app-icon {
  width: 60px;
  height: 60px;
  background: var(--dark);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  color: var(--green);
  user-select: none;
  overflow: hidden;
}

.app-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

.app-meta h1 { margin-bottom: 4px; }
.tagline { color: var(--text-muted); font-size: 13px; margin-bottom: 10px; }

.detail-table td:first-child {
  font-weight: 500;
  width: 180px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-top: 24px;
}

.tab {
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: default;
}

.tab.active {
  color: var(--dark);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--green-dark);
}

.tab-content { padding: 20px 0; }

/* ── Download ── */
.download-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px; margin: 16px 0; }

.download-card {
  background: var(--surface-2);
  padding: 20px;
  border: 1px solid var(--border);
}

.download-card h3 { margin-bottom: 6px; color: var(--dark); font-size: 15px; }
.download-card p { font-size: 13px; color: var(--text-muted); }

.badge-wip {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  background: #fef9ec;
  color: #92650a;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: .6px;
  border: 1px solid #f0d080;
}

.btn {
  display: inline-block;
  margin-top: 12px;
  background: var(--green);
  color: var(--white);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .1s;
}

.btn:hover { background: var(--green-dark); color: var(--white); }
.btn-secondary { background: var(--dark); color: var(--white); }
.btn-secondary:hover { background: #333; color: var(--white); }

/* ── Callout boxes ── */
.info-box {
  border-left: 3px solid var(--green);
  background: #f2faf3;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--text);
}

.warn-box {
  border-left: 3px solid #d4900a;
  background: #fef9ec;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--text);
}

/* ── Code ── */
pre, code {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
}

pre {
  background: var(--dark);
  color: #d4d4d4;
  padding: 16px 20px;
  overflow-x: auto;
  margin: 14px 0;
  line-height: 1.55;
}

code { background: var(--surface-2); color: #174b24; padding: 1px 5px; border: 1px solid var(--border); }

/* ── Footer ── */
#site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  margin-top: 2px;
}

#site-footer-inner {
  max-width: 1140px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

#site-footer .footer-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

#site-footer .footer-logo img { height: 40px; width: auto; display: block; }

#site-footer nav a {
  font-size: 13px;
  color: var(--text-muted);
  margin-left: 20px;
}

#site-footer nav a:hover { color: var(--dark); }

#site-footer .footer-legal {
  width: 100%;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

/* ── Responsive ── */
@media (max-width: 760px) {
  #layout { flex-direction: column; align-items: stretch; }
  #sidebar { width: 100%; }
  #header-top { padding: 12px 16px; }
  #header-bottom { display: flex; flex-wrap: wrap; align-items: center; }
  #nav-toggle { display: flex; }
  #header-bottom > nav { display: none; width: 100%; padding: 0; border-top: 1px solid var(--border); }
  #header-bottom > nav.open { display: block; }
  #main-nav { flex-direction: column; }
  #main-nav li a { height: auto; padding: 12px 20px; border-bottom: 1px solid var(--border); }
  .home-grid { grid-template-columns: 1fr; }
  .app-header { flex-direction: column; }
  .hero { flex-direction: column; gap: 24px; }
  .hero-visual img { width: 240px; }
  .hero h1 { font-size: 34px; letter-spacing: -.8px; }
  #page { padding: 0 16px; }
  #content { padding: 16px; min-width: 0; max-width: 100%; }
  #content-full { padding: 16px; min-width: 0; max-width: 100%; }
  #content table, #content-full table { display: block; width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .detail-table td:first-child { white-space: normal; width: auto; }
  pre { overflow-x: auto; max-width: 100%; }
  code { word-break: break-all; }
  #site-footer-inner { flex-direction: column; align-items: flex-start; gap: 12px; }
  #site-footer nav a { margin-left: 0; margin-right: 16px; }
}
