:root {
  --primary-color: #1a73e8;
  --secondary-color: #34a853;
  --dark-color: #202124;
  --light-color: #f8f9fa;
  --text-color: #e8eaed;
  --bg-color: #121212;
  --card-bg: rgba(30, 30, 30, 0.85);
  --overlay: rgba(0,0,0,0.5); /* UI overlay generico */
  --border-color: rgba(255,255,255,0.1);
}

html.light-init body, body.light-mode {
  --primary-color: #1a73e8;
  --secondary-color: #34a853;
  --dark-color: #202124;
  --light-color: #f8f9fa;
  --text-color: #5f6368;
  --bg-color: #ffffff;
  --card-bg: rgba(255,255,255,0.9);
  --overlay: rgba(0,0,0,0.3);
  --border-color: rgba(0,0,0,0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background-color: var(--bg-color); color: var(--text-color); line-height: 1.6; overflow-x: hidden; transition: background-color .3s, color .3s; }

/* Header */
header {
  background-color: var(--card-bg);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky; top: 0; z-index: 1000; padding: 1rem 5%; transition: background-color .3s;
}
.header-container { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; }
.logo { font-size: 1.8rem; font-weight: 700; color: var(--primary-color); text-decoration: none; display: flex; align-items: center; }
.logo img { height: 2rem; margin-right: 10px; }

/* Nav */
nav { position: relative; }
nav ul { display: flex; list-style: none; }
nav > ul > li { position: relative; margin-left: 1.5rem; }
nav > ul > li > a {
  text-decoration: none; color: var(--text-color); font-weight: 500; transition: color .3s;
  position: relative; display: flex; align-items: center; padding: .5rem 0;
}
nav > ul > li > a:hover { color: var(--primary-color); }
nav > ul > li > a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0; background-color: var(--primary-color); transition: width .3s; }
nav > ul > li > a:hover::after { width: 100%; }
/* Circle highlight */
nav > ul > li > a::before {
  content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0; border-radius: 50%;
  background: rgba(26,115,232,.2); transform: translate(-50%,-50%); transition: width .4s, height .4s; z-index: -1;
}
nav > ul > li > a:hover::before { width: 40px; height: 40px; }

/* Dropdown */
nav ul li ul {
  display: none; position: absolute; top: 100%; left: 0; background-color: var(--card-bg);
  min-width: 220px; box-shadow: 0 5px 15px rgba(0,0,0,0.2); border-radius: 8px; padding: .5rem 0;
  z-index: 1000; flex-direction: column; opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s;
}
nav ul li:hover > ul { display: flex; opacity: 1; transform: translateY(0); }
nav ul li ul li { margin: 0; width: 100%; }
nav ul li ul li a { display: block; padding: .7rem 1.5rem; color: var(--text-color); text-decoration: none; transition: background-color .3s, color .3s; }
nav ul li ul li a:hover { background-color: rgba(26,115,232,.1); color: var(--primary-color); }

/* Toggles */
.theme-toggle, .video-toggle {
  background: none; border: none; color: var(--text-color); font-size: 1.5rem; cursor: pointer; margin-left: 1rem; transition: color .3s;
}
.theme-toggle:hover, .video-toggle:hover { color: var(--primary-color); }

/* Mobile */
.mobile-menu { display: none; font-size: 1.5rem; cursor: pointer; color: var(--text-color); }
@media (max-width: 1200px) { nav > ul > li { margin-left: 1rem; } }
@media (max-width: 992px) {
  nav ul { display: none; }
  .mobile-menu { display: block; }
  .nav-active { display: flex !important; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background-color: var(--card-bg);
    box-shadow: 0 5px 10px rgba(0,0,0,0.1); padding: 1rem 0; border: 1px solid var(--border-color); }
  .nav-active li { margin: .5rem 0; text-align: center; }
  .nav-active li ul { position: static; display: none; box-shadow: none; background-color: transparent; }
  .nav-active li:hover > ul { display: none; }
  .nav-active li.show-dropdown > ul { display: flex !important; }
}
