/*!
 * Phazer Tech - Modern Dark Theme
 * Overrides Bootstrap 4 light styles with a modern dark look.
 * Load AFTER bootstrap.min.css and modern-business.css.
 */

:root {
  --pt-bg: #0b0e14;
  --pt-bg-soft: #0f1420;
  --pt-surface: #141a29;
  --pt-surface-2: #1a2234;
  --pt-border: #242e45;
  --pt-text: #e6e9f0;
  --pt-text-muted: #9aa7bd;
  --pt-accent: #38bdf8;
  --pt-accent-2: #818cf8;
  --pt-glow: rgba(56, 189, 248, 0.25);
  --pt-radius: 14px;
}

/* ---------- Base ---------- */

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--pt-bg);
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(56, 189, 248, 0.07), transparent 60%),
                    radial-gradient(900px 500px at -10% 30%, rgba(129, 140, 248, 0.06), transparent 60%);
  background-attachment: fixed;
  color: var(--pt-text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--pt-accent);
  color: #06121c;
}

/* Scrollbar (WebKit) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--pt-bg);
}
::-webkit-scrollbar-thumb {
  background: #2a3550;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #384a70;
}

/* ---------- Typography ---------- */

h1, h2, h3, h4, h5, h6 {
  color: var(--pt-text);
  font-weight: 700;
  letter-spacing: 0.015em;
}

/* Gradient underline on main page titles */
h1.my-4, h1.mt-4 {
  position: relative;
  padding-bottom: 12px;
}
h1.my-4::after, h1.mt-4::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72px;
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--pt-accent), var(--pt-accent-2));
}
h1.my-4[style*="margin:0px auto"], h1.mt-4[style*="margin:0px auto"] {
  text-align: center;
}
h1.my-4[style*="margin:0px auto"]::after, h1.mt-4[style*="margin:0px auto"]::after {
  left: 50%;
  transform: translateX(-50%);
}

p, li, td, th {
  color: var(--pt-text);
}

.text-muted, .card-subtitle, small {
  color: var(--pt-text-muted) !important;
}

a {
  color: var(--pt-accent);
  transition: color 0.2s ease;
}
a:hover, a:focus {
  color: #7dd3fc;
  text-decoration: none;
}

hr {
  border: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--pt-border) 20%, var(--pt-border) 80%, transparent);
  opacity: 1;
}

/* ---------- Navigation ---------- */

.navbar {
  background: rgba(11, 14, 20, 0.85) !important;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--pt-border);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.navbar .nav-link {
  color: var(--pt-text-muted) !important;
  font-weight: 500;
  border-radius: 8px;
  padding: 0.45rem 0.85rem !important;
  margin: 0 0.1rem;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--pt-text) !important;
  background-color: rgba(56, 189, 248, 0.1);
}

.dropdown-menu {
  background-color: var(--pt-surface);
  border: 1px solid var(--pt-border);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  padding: 0.4rem;
}

.dropdown-item {
  color: var(--pt-text-muted);
  border-radius: 7px;
  padding: 0.5rem 0.9rem;
}

.dropdown-item:hover, .dropdown-item:focus {
  background-color: rgba(56, 189, 248, 0.12);
  color: var(--pt-text);
}

.navbar-toggler {
  border-color: var(--pt-border);
}

/* ---------- Carousel ---------- */

.carousel-item {
  border-radius: 0 0 var(--pt-radius) var(--pt-radius);
  filter: brightness(0.9);
}

.carousel-caption h3 {
  background-color: rgba(8, 11, 18, 0.65) !important;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.carousel-indicators li {
  background-color: var(--pt-accent);
  border-radius: 4px;
  width: 24px;
  height: 4px;
  transition: all 0.3s ease;
}

/* ---------- Cards ---------- */

.card {
  background-color: var(--pt-surface);
  border: 1px solid var(--pt-border);
  border-radius: var(--pt-radius);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.portfolio-item .card:hover,
.card.mb-4:hover,
.card.my-4:hover {
  transform: translateY(-5px);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--pt-glow);
}

.card-img-top {
  border-bottom: 1px solid var(--pt-border);
}

.portfolio-item .card-img-top {
  transition: transform 0.35s ease;
}
.portfolio-item .card:hover .card-img-top {
  transform: scale(1.03);
}

.card-body {
  padding: 1.35rem;
}

.card-title, .card-title a {
  color: var(--pt-text) !important;
  font-weight: 700;
  /* Normalize title size across pages: store/tutorials use <h2>,
     homepage uses <h4> — render them all the same size */
  font-size: 1.35rem;
  line-height: 1.35;
}
.card-title a:hover {
  color: var(--pt-accent) !important;
}

.card-text {
  color: var(--pt-text-muted);
}

.card-header {
  background: linear-gradient(180deg, var(--pt-surface-2), var(--pt-surface));
  border-bottom: 1px solid var(--pt-border);
  color: var(--pt-text);
  font-weight: 600;
}
/* ---------- Buttons ---------- */

.btn {
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}

.btn-primary, .btn-secondary {
  background: linear-gradient(135deg, var(--pt-accent), var(--pt-accent-2));
  border: none;
  color: #06121c;
  box-shadow: 0 4px 18px rgba(56, 189, 248, 0.25);
}

.btn-primary:hover, .btn-secondary:hover {
  color: #06121c;
  filter: brightness(1.12);
  box-shadow: 0 8px 26px rgba(56, 189, 248, 0.4);
}

.btn-outline-light, .btn-light {
  background: transparent;
  border: 1px solid var(--pt-border);
  color: var(--pt-text);
}
.btn-outline-light:hover, .btn-light:hover {
  background: var(--pt-surface-2);
  border-color: var(--pt-accent);
  color: var(--pt-accent);
}

/* ---------- Breadcrumbs ---------- */

.breadcrumb {
  background-color: transparent;
  border: 1px solid var(--pt-border);
  border-radius: 10px;
  padding: 0.65rem 1rem;
}

.breadcrumb-item a {
  color: var(--pt-accent);
}
.breadcrumb-item a:hover {
  color: #7dd3fc;
}
.breadcrumb-item.active {
  color: var(--pt-text-muted);
}
.breadcrumb-item + .breadcrumb-item::before {
  color: var(--pt-text-muted);
}

/* ---------- Code blocks (tutorials) ---------- */

pre {
  background-color: #0d1220;
  border: 1px solid var(--pt-border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  color: #c9d6ee;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

code {
  color: #7dd3fc;
  background-color: rgba(56, 189, 248, 0.08);
  padding: 0.15em 0.4em;
  border-radius: 5px;
  font-size: 0.9em;
}

pre code {
  background: transparent;
  padding: 0;
  color: #c9d6ee;
}

kbd {
  background-color: var(--pt-surface-2);
  border: 1px solid var(--pt-border);
  border-radius: 5px;
  color: var(--pt-text);
}

blockquote {
  border-left: 3px solid var(--pt-accent);
  background: rgba(56, 189, 248, 0.06);
  border-radius: 0 10px 10px 0;
  padding: 0.75rem 1.25rem;
  color: var(--pt-text-muted);
}

/* ---------- Tables ---------- */

.table {
  color: var(--pt-text);
}

.table td, .table th {
  border-color: var(--pt-border);
}

.table thead th {
  background-color: var(--pt-surface-2);
  color: var(--pt-text);
  border-bottom: 2px solid var(--pt-accent);
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.02);
}

.table-hover tbody tr:hover {
  background-color: rgba(56, 189, 248, 0.07);
}

/* ---------- Forms ---------- */

.form-control {
  background-color: var(--pt-bg-soft);
  border: 1px solid var(--pt-border);
  border-radius: 10px;
  color: var(--pt-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus {
  background-color: var(--pt-bg-soft);
  border-color: var(--pt-accent);
  color: var(--pt-text);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}

.form-control::placeholder {
  color: #5c6a85;
}

.input-group-text {
  background-color: var(--pt-surface-2);
  border: 1px solid var(--pt-border);
  color: var(--pt-text-muted);
}

/* ---------- Lists ---------- */

.list-group-item {
  background-color: var(--pt-surface);
  border-color: var(--pt-border);
  color: var(--pt-text);
}

.list-group-item:hover {
  background-color: var(--pt-surface-2);
}

/* ---------- Footer ---------- */

footer.bg-dark {
  background: #07090f !important;
  border-top: 1px solid var(--pt-border);
  position: relative;
}

footer.bg-dark::before {
  content: "";
  display: block;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--pt-accent) 30%, var(--pt-accent-2) 70%, transparent);
  margin-bottom: 1.5rem;
}

footer.bg-dark p {
  color: var(--pt-text-muted);
}

/* ---------- Misc ---------- */

.img-fluid {
  border-radius: 10px;
}

figure img {
  border-radius: 10px;
  border: 1px solid var(--pt-border);
}

figcaption {
  color: var(--pt-text-muted);
}

/* PayPal cart button in navbar */
paypal-cart-button {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0.25rem 0.4rem;
}

/* Light-background product images get a subtle frame instead of clashing */
.card img[src*="pics/store"] {
  background-color: #f4f6fb;
}
