/**
 * OCEWeb Shortcuts - Modern Stylesheet (Glassmorphism & Realistic Keyboard Keys)
 * Copyright (C) 2007-2026 Renato Brunetti - OCEWeb
 */

:root {
  --bg-main: #0a0d14;
  --bg-card: rgba(18, 24, 38, 0.75);
  --bg-card-hover: rgba(26, 34, 52, 0.9);
  --bg-glass: rgba(15, 20, 32, 0.85);
  --border-glass: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(0, 102, 255, 0.5);
  
  --primary-color: #0066ff;
  --primary-gradient: linear-gradient(135deg, #0066ff 0%, #7928ca 100%);
  --accent-cyan: #00f2fe;
  --accent-gold: #ffb800;
  
  --text-main: #f0f4fc;
  --text-muted: #8b9bb4;
  --text-dim: #5c6b84;

  /* Keyboard Key Colors */
  --kbd-bg-top: #242b3d;
  --kbd-bg-bottom: #161b26;
  --kbd-border: #384259;
  --kbd-shadow: #0b0e14;
  --kbd-text: #e2e8f0;
  --kbd-active: #0066ff;

  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

/* Base Setup */
body {
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(0, 102, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 80%, rgba(121, 40, 202, 0.08) 0%, transparent 40%);
  background-attachment: fixed;
  color: var(--text-main);
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.2s ease;
}
a:hover {
  color: #3b82f6;
}

/* Typography & Badges */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  letter-spacing: -0.02em;
}

.text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.badge-custom {
  font-size: 0.75rem;
  padding: 0.35rem 0.65rem;
  border-radius: 20px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

/* Glassmorphic Navbar */
.glass-nav {
  background: var(--bg-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-glass);
  position: sticky;
  top: 0;
  z-index: 1030;
  transition: all 0.3s ease;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
}

.brand-icon {
  width: 34px;
  height: 34px;
}

.nav-link {
  color: var(--text-muted) !important;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0.9rem !important;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-main) !important;
  background: rgba(255, 255, 255, 0.05);
}

/* Platform OS Switcher Pill */
.os-switcher {
  display: inline-flex;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-glass);
  border-radius: 30px;
  padding: 3px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
}

.os-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 5px 14px;
  border-radius: 25px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.os-btn.active {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.4);
}

.os-btn:hover:not(.active) {
  color: var(--text-main);
}

/* Hero Section */
.hero-section {
  padding: 3.5rem 0 2rem;
  position: relative;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 102, 255, 0.12);
  border: 1px solid rgba(0, 102, 255, 0.3);
  border-radius: 30px;
  color: #60a5fa;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

/* Global Search Bar */
.search-container {
  max-width: 680px;
  margin: 0 auto;
  position: relative;
}

.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrapper i.search-icon {
  position: absolute;
  left: 20px;
  font-size: 1.25rem;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input-wrapper .search-shortcut-hint {
  position: absolute;
  right: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-glass);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: var(--text-muted);
  pointer-events: none;
}

.main-search-input {
  width: 100%;
  padding: 16px 80px 16px 54px;
  background: rgba(18, 24, 38, 0.9);
  border: 2px solid rgba(255, 255, 255, 0.12);
  border-radius: 35px;
  color: #fff;
  font-size: 1.1rem;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.main-search-input:focus {
  outline: none;
  background: #151c2d;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.25), 0 10px 40px rgba(0, 0, 0, 0.6);
}

.main-search-input::placeholder {
  color: var(--text-dim);
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 1rem;
}

.quick-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 4px 10px;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-tag:hover {
  background: rgba(0, 102, 255, 0.15);
  border-color: rgba(0, 102, 255, 0.4);
  color: #93c5fd;
}

/* Glass Cards */
.glass-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  transition: all 0.25s ease;
  overflow: hidden;
}

.glass-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

/* App Grid Cards */
.app-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  position: relative;
}

.app-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.app-card .app-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.app-card .app-tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.app-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-glass);
  padding-top: 0.85rem;
  margin-top: auto;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ===================================================
   REALISTIC 3D KEYBOARD KEYCAPS (<kbd>)
   =================================================== */
.kbd-combo {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  vertical-align: middle;
}

.kbd-plus {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-dim);
  padding: 0 2px;
}

.kbd-or {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0 4px;
  font-style: italic;
}

.kbd-then {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 600;
  padding: 0 4px;
}

.kbd-key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 30px;
  padding: 0 8px;
  font-family: 'JetBrains Mono', 'SF Mono', Consolas, Menlo, Monaco, monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--kbd-text);
  background: linear-gradient(180deg, var(--kbd-bg-top) 0%, var(--kbd-bg-bottom) 100%);
  border: 1px solid var(--kbd-border);
  border-bottom: 3px solid var(--kbd-shadow);
  border-radius: 6px;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
  white-space: nowrap;
  user-select: none;
  transition: all 0.1s ease;
  cursor: default;
}

.kbd-key:hover {
  filter: brightness(1.15);
  border-color: #4f5d7e;
}

.kbd-key:active, .kbd-key.pressed {
  transform: translateY(2px);
  border-bottom-width: 1px;
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.4),
    inset 0 1px 2px rgba(0, 0, 0, 0.5);
  background: #1e2538;
}

.kbd-modifier {
  background: linear-gradient(180deg, #2b344a 0%, #1a2030 100%);
  border-color: #424e6b;
  color: #93c5fd;
}

.kbd-symbol {
  font-size: 0.95rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin-right: 2px;
}

.kbd-special {
  background: linear-gradient(180deg, #332845 0%, #1f182b 100%);
  border-color: #584177;
  color: #e9d5ff;
}

.kbd-function {
  color: #6ee7b7;
}

/* Shortcut Table / Rows */
.shortcut-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.shortcut-row {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}

.shortcut-row td {
  padding: 12px 16px;
  vertical-align: middle;
}

.shortcut-row td:first-child {
  border-top-left-radius: var(--radius-md);
  border-bottom-left-radius: var(--radius-md);
}

.shortcut-row td:last-child {
  border-top-right-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

.shortcut-row:hover {
  background: var(--bg-card-hover);
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.action-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  border-color: var(--border-glass);
}

.action-btn.star-btn:hover, .action-btn.star-btn.active {
  color: var(--accent-gold);
}

.action-btn.copy-btn:hover {
  color: var(--accent-cyan);
}

/* Virtual Keyboard Explorer */
.virtual-keyboard {
  background: #11151f;
  border: 2px solid #232a3b;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
  max-width: 1000px;
  margin: 0 auto;
  overflow-x: auto;
}

.kb-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
  justify-content: center;
}

.kb-key-cap {
  height: 44px;
  min-width: 44px;
  background: linear-gradient(180deg, #242c3d 0%, #151a24 100%);
  border: 1px solid #37435d;
  border-bottom: 4px solid #090b10;
  border-radius: 8px;
  color: #cbd5e1;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: all 0.1s ease;
  position: relative;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.kb-key-cap:hover {
  filter: brightness(1.25);
  border-color: #55688f;
}

.kb-key-cap.active, .kb-key-cap:active {
  background: var(--primary-gradient);
  color: #fff;
  border-color: #60a5fa;
  transform: translateY(3px);
  border-bottom-width: 1px;
  box-shadow: 0 0 15px rgba(0, 102, 255, 0.6);
}

.kb-w-15 { flex: 1.5; }
.kb-w-175 { flex: 1.75; }
.kb-w-20 { flex: 2; }
.kb-w-225 { flex: 2.25; }
.kb-w-60 { flex: 6; }

/* Interactive Shortcut Tester Box */
.tester-box {
  background: radial-gradient(circle at center, #1b2336 0%, #0d111a 100%);
  border: 2px dashed rgba(0, 102, 255, 0.4);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tester-box:hover, .tester-box.listening {
  border-color: var(--primary-color);
  box-shadow: 0 0 30px rgba(0, 102, 255, 0.25);
  background: radial-gradient(circle at center, #202b44 0%, #0f1420 100%);
}

.tester-detected-keys {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 1.5rem 0;
}

/* Category Filter Tabs */
.filter-pill {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-glass);
  color: var(--text-muted);
  border-radius: 25px;
  padding: 8px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.filter-pill:hover, .filter-pill.active {
  background: rgba(0, 102, 255, 0.15);
  border-color: var(--primary-color);
  color: #fff;
}

/* Footer */
.site-footer {
  background: #080a0f;
  border-top: 1px solid var(--border-glass);
  padding: 3rem 0 1.5rem;
  margin-top: 5rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-logo {
  height: 28px;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.footer-logo:hover {
  opacity: 1;
}

/* Toast Notifications */
.custom-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #151d2d;
  color: #fff;
  border: 1px solid rgba(0, 102, 255, 0.4);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.custom-toast.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Stats Counter Badge */
.stat-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Print utility buttons */
.btn-glass {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-glass);
  color: var(--text-main);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-primary-gradient {
  background: var(--primary-gradient);
  border: none;
  color: #fff;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
  transition: all 0.2s ease;
}

.btn-primary-gradient:hover {
  box-shadow: 0 6px 20px rgba(0, 102, 255, 0.5);
  filter: brightness(1.1);
  color: #fff;
}

/* Highlight matching search text */
mark.search-highlight {
  background: rgba(255, 184, 0, 0.3);
  color: #ffe699;
  padding: 0 2px;
  border-radius: 3px;
}
