/* ===================================
   RESPONSIVE CSS - 5 BREAKPOINTS
   Mobile First: 320px → 480px → 768px → 1024px → 1280px → 1440px
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Saira:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Mozilla+Text:wght@200..700&family=Saira:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Cause:wght@100..900&family=Exo:ital,wght@0,100..900;1,100..900&family=Mozilla+Text:wght@200..700&family=Saira:ital,wght@0,100..900;1,100..900&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap');

/* ===================================
   CSS VARIABLES
   =================================== */
:root {
    /* Color Variables */
    --dark-bg: #020617;
    --main-bg: #090f20;
    --card-bg: #212536;
    --purple-glow: #3e3a5a;
    --green-glow: #00ff73;
    --border-color: #3b3f54;
    --dark-green: #009900;
    --color-green: #00ff00;
    --light-text: #E1E9C9;
    --light-green: #00ff73;
    --color-navy: #1347b7;
    --accent-blue: #007bff;
    --accent-cyan: #00D9FF;
    --accent-magenta: #FF0080;
    --terminal-bg: #0c0c0c;
    --terminal-border: #333;
    --terminal-text: #00ff00;
    --terminal-prompt: #00ccff;
    --terminal-comment: #888;
    --terminal-output: #fff;
    --terminal-header: #2d2d2d;
    --legend-border: #444;
    --bg-secondary: #16161D;
    --transition-speed: 0.3s;

    --color-orange: #f97316;
    --color-blue: #1673bd;
    --color-red: #dc2626;
    --color-green: #00ff00;
    --color-purple: #5e11e3;
    --color-pink: #B9375D;
    --color-navy: #1347b7;
    --accent-cyan: #00D9FF;
    --accent-magenta: #FF0080;

    /* Fluid Typography using clamp() */
    --font-p: clamp(14px, 1.2vw + 12px, 18px);
    --font-h1: clamp(1.5rem, 2.5vw + 1rem, 1.875rem);
    --font-h2: clamp(1.2rem, 2vw + 0.8rem, 1.55rem);
    --font-h3: clamp(1.08rem, 1.5vw + 0.7rem, 1.39rem);
    --font-h4: clamp(1.02rem, 1.2vw + 0.6rem, 1.2rem);
    --font-li: clamp(14px, 1.2vw + 12px, 18.5px);
    --font-a: clamp(14px, 1.1vw + 12px, 17px);
    --font-i: clamp(13.5px, 1vw + 11px, 16px);
    --font-table: clamp(14px, 1.1vw + 12px, 17px);
}

/* ===================================
   BASE STYLES (Mobile: 320px+)
   =================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Saira", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--dark-bg);
    color: #f0f0f0;
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga" 1, "kern" 1;
    transform: translateZ(0);
    will-change: transform;
}

/* Typography */
p {
    font-size: var(--font-p);
    font-weight: 500;
    color: #cccccc;
}

strong {
    font-weight: 600;
    color: #f0f0f0;
}

li {
    font-size: var(--font-li);
    font-weight: 500;
    color: #cccccc;
}

a {
    font-size: var(--font-a);
}

i, pre {
    font-size: var(--font-i);
}

table {
    font-size: var(--font-table);
    font-weight: 400;
}

h1 {
    font-size: var(--font-h1);
    font-weight: 700;
    color: var(--color-green);
}

h2 {
    font-size: var(--font-h2);
    font-weight: 600;
}

h3 {
    font-size: var(--font-h3);
    font-weight: 550;
}

h4 {
    font-size: var(--font-h4);
    font-weight: 600;
}

hr {
    border: 0;
    height: 0.5px;
    background-color: var(--color-green);
    margin-top: 30px;
}

.definition {
    font-family: Mozilla Text, Helvetica Neue, Arial, X-LocaleSpecific, sans-serif;
    word-spacing: -5%;
    color: #D27522;
}

/* Container */
.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* ==========================================================================
   NAVBAR
   ========================================================================== */

.navbar {
    background-color: var(--main-bg);
    padding: 5px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1000;
}

.navbar::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg,
            purple 0%, purple 16.67%,
            orange 16.67%, orange 33.33%,
            green 33.33%, green 50%,
            navy 50%, navy 66.67%,
            hotpink 66.67%, hotpink 83.33%,
            red 83.33%, red 100%);
    background-size: 120px 2px;
    animation: navbarSlidingBorder 2s linear infinite;
}

@keyframes navbarSlidingBorder {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 120px 0;
    }
}


@keyframes moveBorder {
    0% {
        left: -100%;
        transform: scaleX(0.5);
    }

    50% {
        transform: scaleX(1);
    }

    100% {
        left: 100%;
        transform: scaleX(0.5);
    }
}

.navbar .container {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.navbar .logo {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--light-text);
    width: 100%;
    justify-content: space-between;
}

.logo img {
    width: 24px;
    height: 24px;
}

.logo-text {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}

.logo-text a {
  text-decoration: none;
  margin-top: 5px;
}

.typewriter {
    font-family: "Saira", sans-serif;
    white-space: pre;
    position: relative;
    font-optical-sizing: auto;
    font-weight: 500;
    color: #f0f0f0;
}

.typewriter::after {
    content: "_";
    /* cursor */
    margin-left: 2px;
    animation: blink 1s steps(1) infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .typewriter::after {
        animation: none;
    }
}

.navbar nav ul {
    display: flex;
    flex-direction: column;
    list-style: none;
    margin: 0;
    padding: 0;
    text-align: center;
}

.navbar nav ul li:hover a.home {
    color: #FFAA00;
    background-color: #2c2b25;
}

.navbar nav ul li:hover a.projects {
    color: var(--color-purple);
    background-color: #27252c;
}

.navbar nav ul li:hover a.programming {
    color: var(--color-orange);
    background-color: #282323;
}

.navbar nav ul li:hover a.hacking {
    color: var(--color-green);
    background-color: #273323;
}

.navbar nav ul li:hover a.networking {
    color: var(--color-blue);
    background-color: #212528;
}

.navbar nav ul li:hover a.ai {
    color: var(--color-pink);
    background-color: #2b2326;
}

.navbar nav ul li:hover a.game {
    color: var(--color-red);
    background-color: #332923;
}

.navbar nav ul li a {
    color: #f0f0f0;
    padding: 10px 45px;
    width: 97%;
    display: inline-block;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    margin: 5px 0;
}

.navbar .search-bar {
    display: flex;
    align-items: center;
    background-color: var(--dark-bg);
    border-radius: 5px;
    padding: 8px 12px;
    width: calc(100% - 40px);
    margin: 15px auto 0 auto;
    border: 1px solid #444;
}

.navbar .search-bar:focus-within {
    border-color: var(--button-primary-hover);
}

.navbar .search-bar i {
    color: #aaa;
    margin-right: 10px;
}

.navbar .search-bar input {
    background-color: var(--dark-bg);
    border: none;
    outline: none;
    color: var(--light-text);
    font-size: 1rem;
    width: 100%;
}

.navbar .search-bar input::placeholder {
    color: #aaa;
}

.navbar button i {
    color: #8B5CF6;
}

.menu-toggle {
  display: block;
  font-size: 1.3rem;
  cursor: pointer;
  background: var(--dark-blue);
  border: 2px solid #8B5CF6;
  padding: 2px 4px;
}

.nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--main-bg);
    overflow: hidden;
    max-height: 0;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
    transition: max-height 0.3s ease-out;
    /* padding-top: 10px; */
}

.nav-links.active {
    max-height: 450px;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown > a {
    cursor: pointer;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 5px);
    right: 10%;
    transform: translateY(-20px);
    background-color: var(--card-bg);
    min-width: 320px;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform-origin: top center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1001;
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    max-height: 0;
    overflow: auto;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    max-height: 500px;
}

.dropdown-menu li {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 14px 20px;
    color: var(--terminal-output);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid rgba(59, 63, 84, 0.3);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.dropdown-menu li:first-child a {
    border-radius: 8px 8px 0 0;
}

.dropdown-menu li:last-child a {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.dropdown-menu li a:hover {
    background-color: rgba(0, 255, 0, 0.1);
    color: var(--color-green);
    transform: translateX(5px);
}

.fa-chevron-down {
    transition: transform 0.3s ease;
    font-size: 0.75rem;
    margin-left: 5px;
}

.dropdown:hover .fa-chevron-down {
    transform: rotate(180deg);
}

/* ===================================
   MAIN CONTENT LAYOUT
   =================================== */
.main-content-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0 auto;
    padding: 20px 10px;
    gap: 20px;
}

.left-column,
.right-column {
    padding: 0 10px;
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-right: 20px;
}

.right-column img {
    width: 100%;
    height: auto;
}

.keywords {
    font-family: "Saira", sans-serif;
    font-optical-sizing: auto;
    color: var(--color-orange); 
    font-style: normal;
    font-variation-settings:
        "wdth" 100;
}

.keywords strong {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.subtitle {
    color: var(--terminal-output);
}

/* ===================================
   CARDS & CONTENT
   =================================== */
.card {
    background-color: var(--main-bg);
    padding: 20px;
    border-radius: 5px;
    border: 0.1px solid var(--color-green);
    margin-top: 10px;
}

.card-header span {
    padding: 2px 10px;
    border-radius: 20px;
    background-color: var(--color-green);
    color: aliceblue;
}

.content h1 {
    font-weight: 700;
    margin-top: 10px;
    color: var(--color-green);
}

.content p,
.card p {
    width: 100%;
    margin: 0 auto;
    text-align: justify;
}

/* Learning Objectives */
.learning-objectives-card .card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.learning-objectives-card .card-header i {
    color: yellow;
}

.learning-objectives-card h2,
.introduction-card h2 {
    color: #f0f0f0;
    margin: 0;
}

.objective-item {
    background-color: rgba(0, 255, 0, 0.05);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid rgba(0, 255, 0, 0.2);
}

.objective-item i {
    color: var(--color-green);
    margin-bottom: 15px;
}

.objective-item p {
    color: #cccccc;
}

.objective-item strong {
    color: #f0f0f0;
}

.objective-item a {
    color: #ccc;
    text-decoration: none;
}

.objective-item a:hover {
    color: var(--color-green);
    text-decoration: underline;
}

/* Linux Card */
.linux-card,
.module-summary {
    background-color: var(--main-bg);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--color-green);
    margin-bottom: 20px;
}

.linux-card .card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.linux-card .card-header h2 {
    color: var(--dark-green);
}

.linux-card h3 {
    color: var(--accent-blue);
    margin-bottom: 5px;
    margin-top: 10px;
}

.linux-card .sub {
    margin-bottom: 5px;
    color: #d2d4e0;
}

.linux-card strong.subtitle {
    text-decoration: underline;
    text-underline-offset: 5px;
}

.linux-card .content {
    margin: 10px 0;
}

.linux-card h4 {
    color: red;
    margin-bottom: 3px;
    margin-top: 5px;
}

.linux-card .list ol {
    padding-left: 30px;
}

.linux-card .list ol li::marker {
    color: var(--terminal-prompt);
}

.linux-card .list ul {
    padding-left: 0.2rem;
    list-style-type: none;
}

.list ul li::before {
    font-family: "Font Awesome 6 Free";
    content: "\f101";
    margin-right: 5px;
    color: var(--color-green);
    font-weight: 600;
}

.linux-card .link {
  position: relative;
  display: inline-block;
  color: var(--accent-blue); /* #3b82f6 or your blue color */
  text-decoration: underline;
  text-underline-offset: 3px;
  
  /* The Fix: Change vertical-align from 'baseline' to 'bottom' or 'text-bottom' */
  vertical-align: text-bottom; 
  
  overflow: hidden; 
  padding: 0 2px; /* Adjusted padding: horizontal only is usually better for inline flow */
  transition: color 0.3s;
}

/* Pseudo-element for the scan effect (Unchanged) */
.linux-card .link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%; 
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%, 
    rgba(255, 255, 255, 0.5) 50%, 
    rgba(255, 255, 255, 0) 100% 
  );
  transform: skewX(-20deg); 
  opacity: 0.7; 
  pointer-events: none; 
}

.linux-card .link:hover::before {
  animation: scan-left-to-right 0.8s ease-in-out;
}

@keyframes scan-left-to-right {
  0% { left: -100%; }
  100% { left: 100%; }
}


.linux-card .list a,
.linux-card .link {
    color: #3396D3;
    text-decoration: dotted underline;
    text-underline-offset: 5px;
    transition: color 0.3s ease;
    word-break: break-all;
}

.linux-card .list a:hover,
.linux-card .link:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

.linux-card .pro-tips p {
    background-color: rgba(0, 255, 0, 0.05);
    border-left: 4px solid var(--color-green);
    padding: 10px 15px;
    margin: 20px 0;
    color: #ccc;
    border-radius: 5px;
}

.linux-card .tip {
    background: rgba(0, 255, 0, 0.05);
    padding: 10px;
    border-radius: 5px;
}

/* Tables */
.linux-card .table-container {
    overflow-x: auto;
    width: 100%;
    margin: 5px 0;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 400px;
    border-collapse: collapse;
    margin: 5px 0;
    margin-bottom: 1rem;
}

th,
td {
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    text-align: left;
    color: #ccc;
}

th {
    background-color: #131c2e;
    font-weight: 600;
}

td.green {
    color: var(--color-green);
}

table code.code {
    color: var(--color-green);
}

/* Code Blocks */
.code {
    background-color: #131c2e;
    padding: 3px 5px;
    border-radius: 5px;
    color: #f0f0f0;
}

pre {
    padding: 5px 15px;
    cursor: pointer;
}

.code-block,
.explanation pre {
    background-color: var(--dark-bg);
    border-radius: 5px;
    color: #e5e7eb;
    overflow-x: auto;
    font-family: "Ubuntu Mono", monospace;
    line-height: 1.5;
    border: 1px solid #2d3748;
    margin: 10px 0;
}

.code-block .title {
    padding: 3px 0;
}

.code-block .title p {
    margin-left: 15px;
}

/* Card Images */
.card-image-output {
    border-radius: 5px;
    border: 1px solid var(--border-color);
    margin: 10px 0;
}

.card-image-output img {
    display: block;
    width: 100%;
    height: inherit;
    object-fit: cover;
}

.card-image {
    margin: 10px 0;
}

.card-image img {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.card-image-output p {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    padding-left: 15px;
    background-color: var(--dark-bg);
    color: white;
    margin: 0;
}

code {
    font-family: "Fira Code", "Ubuntu Mono", "DejaVu Sans Mono", "Consolas", "Courier New", monospace;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    transform: translateZ(0);
    backface-visibility: hidden;
}

code.code-bg,
code.color {
    background-color: #1c2434;
    padding: 3px;
    border-radius: 5px;
    color: var(--color-green);
    font-size: 0.8rem;
}

ol {
    padding-left: 17px;
}

.bg-color {
    border-radius: 5px;
    background-color: var(--dark-bg);
    color: var(--terminal-output);
    border: 1px solid var(--terminal-border);
    margin: 10px 0;
    overflow-x: auto;
    padding: 5px ;
}


code.code-red {
    color: red;
}

.module-summary.linux-card ul li {
    list-style: none;
    padding-left: 10px;
}

.module-summary.linux-card ul li::before {
    content: "✅";
    margin-right: 5px;
}

.congrats {
    background-color: rgba(0, 255, 0, 0.05);
    border-left: 4px solid yellow;
    padding: 10px 15px;
    margin: 20px 0;
    color: #ccc;
    border-radius: 5px;
}

/* Next Section */
.next {
    border: 1px solid var(--color-green);
    padding-top: 10px;
    border-left: 5px solid var(--color-green);
    border-radius: 5px;
    background-color: rgba(0, 102, 255, 0.05);
    position: relative;
    margin-bottom: 20px;
    padding-left: 15px;
}

.next .header h3 {
    color: var(--color-green);
    margin: 0;
}

.next .header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

.next .header p {
    background: var(--terminal-text);
    padding-left: 10px;
    padding-right: 40px;
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
    color: var(--terminal-output);
}

.next .content {
    padding-bottom: 40px;
}

.next .content p {
    padding-right: 20px;
}

.next .content .next-button {
    position: absolute;
    right: 30px;
    bottom: 10px;
    color: #DC143C;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s ease;
}

.next .content .next-button::after {
    content: '➜';
    margin-left: 6px;
    display: inline-block;
    transition: transform 0.3s ease, margin-left 0.3s ease;
}

.next .content .next-button:hover {
    color: #ff0033;
}

.next .content .next-button:hover::after {
    transform: translateX(2px);
    margin-left: 8px;
}

/* Rainbow Text Animation */
.rainbow-text {
    font-weight: bold;
    background: linear-gradient(45deg,
        #ff0000, #ff8000, #ffff00, #80ff00,
        #00ff00, #00ff80, #00ffff, #0080ff,
        #0000ff, #8000ff, #ff00ff, #ff0080);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: rainbowShift 3s ease-in-out infinite;
    text-shadow: 10px 10px 0 30px rgba(255, 255, 255, 0.3);
}

@keyframes rainbowShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.upcoming-module {
    background-color: var(--dark-bg);
    padding: 20px;
    border: 1px solid red;
    border-radius: 5px;
    border-left: 5px solid red;
    margin-top: 10px;
}

.upcoming-module h3 {
    margin-top: 0;
    background-color: #007bff;
    border-radius: 15px;
    color: #f0f0f0;
    text-align: center;
    margin-bottom: 10px;
    width: 30%;
}

.upcoming-module p strong {
    color: var(--color-green);
}

.upcoming-module p a {
    text-decoration: underline;
    color: #f0f0f0;
}

.upcoming-module p a:hover {
    color: #00ccff;
}

/* ===================================
   SIDEBAR & TOPICS
   =================================== */
.about-website,
.related-topics,
.related-tags {
    background-color: var(--main-bg);
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--color-green);
}

.about-website h3,
.ad-block h3,
.related-topics h3,
.related-tags h3 {
    color: var(--terminal-output);
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 10px;
    text-align: center;
}

.about-website h3::after,
.ad-block h3::after,
.related-tags h3::after {
    content: "";
    position: absolute;
    width: 98%;
    height: 1px;
    background-color: var(--accent-blue);
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    border-radius: 2px;
}

.about-website p {
    color: #ccc;
    text-align: left;
    padding: 10px 0;
}

.about-website .homepage {
  color: #007bff;
  font-weight: 500;
  text-decoration: underline;
}

.about-website .homepage:hover {
  color: var(--accent-blue);
  text-underline-offset: 5px;
}

.typewriter-scan {
  position: relative;
  display: inline-block;
  background: linear-gradient(90deg, var(--accent-blue) 50%, #f0f0f0 50%);
  background-size: 200% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: background-position 0.8s ease;
}

.typewriter-scan:hover {
  background-position: 0 0;
}

/* Related Topics */
.related-topics ul {
    list-style: none;
    padding: 0;
    margin-top: 20px;
}

.related-topics ul li {
    border-bottom: 1px solid var(--legend-border);
    padding: 10px 0;
}

.related-topics ul li:last-child {
    border-bottom: none;
}

.related-topics .content li {
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    text-align: left;
    gap: 10px;
}

.related-topics p {
    text-decoration-color: var(--color-green);
    text-decoration: underline;
    text-underline-offset: 5px;
}

.related-topics li a {
    color: var(--terminal-output);
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
    padding: 5px 0;
    text-align: left;
}

.related-topics li i {
    background: rgba(48, 174, 48, 0.509);
    border-radius: 6px;
    padding: 10px;
    transition: padding-left 0.5s ease;
}

.related-topics li:hover {
    padding-left: 8px;
}

.related-topics li:hover i {
    background: var(--color-green);
    color: whitesmoke;
    box-shadow: 0 0 15px rgba(58, 237, 106, 0.5);
}

/* Button Styling */
.button-container {
    margin-top: 35px;
    display: flex;
    justify-content: center;
}

.btn-cyber {
    position: relative;
    background: transparent;
    border: none;
    padding: 12px 30px;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
}

.btn-bg {
    position: absolute;
    inset: 0;
    background: var(--color-green);
    transform: translate(-6px, -6px);
    border-radius: 4px;
    z-index: 1;
    transition: transform 0.2s ease;
}

.btn-border {
    position: absolute;
    inset: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    z-index: 2;
}

.btn-text {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-topics .button-container .btn-cyber a {
    color: whitesmoke;
    text-decoration: none;
}

.btn-cyber:hover .btn-bg {
    transform: translate(0, 0);
}

.blink {
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

/* Tags */
.related-tags {
    display: flex;
    flex-direction: column;
}

.related-tags .tag-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    justify-content: center;
}

.related-tags .tag {
    background-color: var(--light-text);
    color: var(--main-bg);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 400;
    transition: background-color 0.3s ease, transform 0.1s ease;
    cursor: pointer;
    border: none;
}

.related-tags a {
    text-decoration: none;
}

.related-tags a:hover .tag {
    background-color: var(--color-green);
    color: var(--light-text);
    transform: translateY(-2px);
}

/* Moving Border Animation */
@property --glow-deg {
    syntax: "<angle>";
    inherits: true;
    initial-value: -90deg;
}

@property --clr-1 {
    syntax: "<color>";
    inherits: true;
    initial-value: #4285f4;
}

@property --clr-2 {
    syntax: "<color>";
    inherits: true;
    initial-value: #ea4335;
}

@property --clr-3 {
    syntax: "<color>";
    inherits: true;
    initial-value: #fbbc05;
}

@property --clr-4 {
    syntax: "<color>";
    inherits: true;
    initial-value: #34a853;
}

.about-website.moving-border {
    --gradient-glow: var(--clr-1), var(--clr-2), var(--clr-3), var(--clr-4), var(--clr-1);
    position: relative;
    padding: 20px;
    background: #1f1f1f;
    border: 3px solid transparent;
    border-radius: 15px;
    background:
        linear-gradient(#1f1f1f 0 0) padding-box,
        conic-gradient(from var(--glow-deg), var(--gradient-glow)) border-box;
    font-size: 16px;
    font-weight: 500;
    color: #e8eaed;
    cursor: pointer;
    isolation: isolate;
    transition: all 0.3s ease;
    animation: breathe-glow 3s ease-in-out infinite;
}

@keyframes breathe-glow {
    0%, 100% {
        transform: scale(1.0);
        box-shadow: 0 0 0 rgba(255, 255, 255, 0);
    }
    50% {
        transform: scale(1.01);
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    }
}

/* Wallpaper & Color Palette */
.wallpaper,
.color-palette {
    border: 1px solid var(--color-green);
    padding: 10px;
    border-radius: 5px;
}

.wallpaper h3,
.color-palette h3,
.related-topics h3 {
    color: var(--terminal-output);
    text-align: center;
    background: var(--color-green);
}

.wallpaper p,
.color-palette p,
.related-topics p {
    color: #ccc;
    text-align: center;
    margin-bottom: 15px;
    margin-top: 10px;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 800px;
    margin: 0 auto 20px;
}

.image-card img {
    width: 100%;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.image-card img:hover {
    transform: scale(1.02);
    border: 1px solid var(--color-green);
}

.button {
    text-align: center;
    margin-bottom: 10px;
}

.button .wallpaper-button,
.button .color-button {
    margin-top: 15px;
    border: 1px dashed var(--color-green);
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none;
    font-size: clamp(0.75rem, 1vw + 0.6rem, 1rem);
}

.button .wallpaper-button:hover,
.button .color-button:hover {
    background-color: var(--color-green);
}

/* Palette Grid */
.palette-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.palette-card {
    background: var(--bg-secondary);
    border: 1px solid var(--terminal-border);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease;
    cursor: pointer;
    position: relative;
}

.palette-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-magenta));
    border-radius: 20px;
    opacity: 0;
    transition: 0.3s;
    z-index: -1;
}

.palette-card:hover::before {
    opacity: 0.5;
}

.palette-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.color-wave {
    height: 180px;
    display: flex;
    position: relative;
    overflow: hidden;
}

.wave-bar {
    flex: 1;
    position: relative;
    transition: 0.3s;
    cursor: pointer;
}

.wave-bar:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    z-index: 10;
}

.color-wave.colors-4 .wave-bar:nth-child(1),
.color-wave.colors-4 .wave-bar:nth-child(4) {
    transform: translateY(-10px);
}

.color-wave.colors-4 .wave-bar:nth-child(2),
.color-wave.colors-4 .wave-bar:nth-child(3) {
    transform: translateY(-35px);
}

.palette-card:hover .color-wave.colors-4 .wave-bar:nth-child(1),
.palette-card:hover .color-wave.colors-4 .wave-bar:nth-child(4) {
    transform: translateY(-20px);
}

.palette-card:hover .color-wave.colors-4 .wave-bar:nth-child(2),
.palette-card:hover .color-wave.colors-4 .wave-bar:nth-child(3) {
    transform: translateY(-45px);
}

.color-wave.colors-5 .wave-bar:nth-child(1),
.color-wave.colors-5 .wave-bar:nth-child(5) {
    transform: translateY(0);
}

.color-wave.colors-5 .wave-bar:nth-child(2),
.color-wave.colors-5 .wave-bar:nth-child(4) {
    transform: translateY(-20px);
}

.color-wave.colors-5 .wave-bar:nth-child(3) {
    transform: translateY(-40px);
}

.palette-card:hover .color-wave.colors-5 .wave-bar:nth-child(1),
.palette-card:hover .color-wave.colors-5 .wave-bar:nth-child(5) {
    transform: translateY(-10px);
}

.palette-card:hover .color-wave.colors-5 .wave-bar:nth-child(2),
.palette-card:hover .color-wave.colors-5 .wave-bar:nth-child(4) {
    transform: translateY(-30px);
}

.palette-card:hover .color-wave.colors-5 .wave-bar:nth-child(3) {
    transform: translateY(-50px);
}

.wave-bar::after {
    content: attr(data-color);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Source Code Pro', monospace;
    font-size: 10px;
    font-weight: 600;
    color: white;
    background: rgba(0, 0, 0, 0.9);
    padding: 5px 9px;
    border-radius: 6px;
    opacity: 0;
    transition: opacity 0.3s;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

.wave-bar:hover::after {
    opacity: 1;
}

.card-info {
    padding: 24px;
    color: var(--terminal-output);
}

.card-title {
    font-size: var(--font-p);
    font-weight: 600;
    color: var(--terminal-output);
    letter-spacing: 0.5px;
}

.card-tags {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.card-actions {
    display: flex;
    gap: 8px;
}

.card-btn {
    flex: 1;
    padding: 10px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: #ccc;
    font-size: var(--font-i);
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: 0.3s;
}

.card-btn:hover {
    background: var(--main-bg);
    color: var(--light-text);
    border-color: var(--accent-cyan);
}

/* Scroll Up Button */
/* ===================================
   SCROLL TO TOP BUTTON (Base Styles)
   =================================== */
#scrollUpBtn {
    /* Fixed positioning - floats on screen */
    position: fixed;
    bottom: 20px;
    right: 20px;
    
    /* Size (mobile base) */
    width: 45px;
    height: 45px;
    
    /* Initial state - hidden */
    display: none;
    opacity: 0;
    
    /* Visual styling */
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-green) 0%, #00cc00 100%);
    border: 2px solid rgba(0, 255, 0, 0.3);
    cursor: pointer;
    
    /* Layer above all content */
    z-index: 9999;
    
    /* Shadow for depth */
    box-shadow: 0 4px 12px rgba(0, 255, 0, 0.3);
    
    /* Smooth transitions */
    transition: all 0.3s ease, opacity 0.3s ease;
}

/* Show state with fade-in */
#scrollUpBtn.show {
    display: block !important;
    opacity: 1;
}

/* Hover effect */
#scrollUpBtn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 255, 0, 0.5);
    border-color: var(--color-green);
}

/* Active/Click effect */
#scrollUpBtn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Progress circle container */
#scrollUpBtn .progress-circle {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Background circle */
#scrollUpBtn .progress-circle .bg1 {
    fill: none;
    stroke: rgba(255, 255, 255, 0.2);
    stroke-width: 2;
}

/* Progress circle animation */
#scrollUpBtn .progress-circle .progress {
    fill: none;
    stroke: #ffffff;
    stroke-width: 2.5;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dashoffset 0.1s ease;
}

/* Arrow icon positioning */
#scrollUpBtn .arrow-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

#scrollUpBtn .arrow-overlay svg {
    width: 18px;
    height: 18px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.progress-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
    shape-rendering: geometricPrecision;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

.progress-circle .bg1 {
    fill: #000000;
    stroke: #eee;
    stroke-width: 1;
}

.progress-circle .progress {
    fill: none;
    stroke: #007bff;
    stroke-width: 1;
    stroke-dasharray: 100, 100;
    stroke-linecap: round;
    transition: stroke-dasharray 0.25s linear;
}

svg {
    image-rendering: optimizeQuality;
    text-rendering: geometricPrecision;
}

.arrow-overlay {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.4rem;
    font-family: Arial, Helvetica, sans-serif;
    color: #e5e7eb;
    pointer-events: none;
    cursor: pointer;
}

/* ===================================
   FOOTER
   =================================== */
.footer {
    position: relative;
    width: 100%;
    background: var(--dark-bg);
    min-height: 100px;
    padding: 20px 50px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-blue) 50%, transparent 50%);
    background-size: 20px 2px;
    animation: slidingBorder 1s linear infinite;
}

@keyframes slidingBorder {
    0% { background-position: 0 0; }
    100% { background-position: 20px 0; }
}

.menu {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 10px 0;
    flex-wrap: wrap;
    flex-direction: column;
    gap: 10px;
}

.menu-item {
    list-style: none;
}

.menu-link {
    color: #fff;
    margin: 0 10px;
    display: inline-block;
    transition: 0.5s;
    text-decoration: none;
    opacity: 0.75;
}

.menu-link:hover {
    opacity: 1;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.footer p {
    color: #ffffff;
    margin: 15px 0 10px 0;
    text-align: center;
    font-size: var(--p);
    font-weight: 500;
    text-align: center;
}

.footer .contacts {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.footer .contact {
    text-decoration: none;
    color: var(--border-dark);
    display: inline; /* important for transform reliability */
    transition: transform 0.3s ease;
}

.footer .contact:hover {
    transform: translateY(-2px);
    color: var(--text-secondary);
}

.footer .contact.github:hover {
    color: #313647;
}

.footer .contact.instagram:hover {
    color: #E83C91;
}

.footer .contact.linkedin:hover {
    color: #008BFF;
}

.footer .contact.pinterest:hover {
    color: #C00707;
}

.footer .contact.gmail:hover {
    color: #f44336d8;
}

.footer i {
    margin-top: 20px;
    font-size: var(--font-h1);
}

/* ===================================
   AD CONTAINER STYLING - DARK THEME
   =================================== */
.ad-container {
    margin: 20px auto;
    padding: 15px 10px;
    text-align: center;
    background-color: var(--main-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    clear: both;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ad-label {
    font-size: 9px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 8px;
    font-family: 'Saira', Arial, sans-serif;
}

.ad-header {
    margin: 15px auto 20px;
    max-width: 100%;
}

.ad-in-content {
    margin: 25px auto;
    max-width: 100%;
}

.ad-footer {
    margin: 20px auto 15px;
    max-width: 100%;
}

.sidebar-ad-container {
    display: none;
    width: 300px;
    padding: 15px;
    background-color: var(--main-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.mobile-sticky-ad {
    display: block;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, var(--main-bg) 0%, var(--main-bg) 95%, rgba(9, 15, 32, 0.95) 100%);
    padding: 8px 0;
    text-align: center;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
    border-top: 2px solid var(--color-green);
}

.ad-close-btn {
    position: absolute;
    top: 6px;
    right: 10px;
    background: rgba(220, 20, 60, 0.85);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 4px 10px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.ad-close-btn:hover {
    background: #DC143C;
    transform: scale(1.1) rotate(90deg);
}

body.has-sticky-ad {
    padding-bottom: 80px;
}

.ad-block.large,
.ad-block.medium,
.ad-block.small {
    border: 2px dashed var(--legend-border);
    width: 100%;
    height: 300px;
    background-color: var(--main-bg);
}

.ad-block.medium {
    height: 250px;
}

.ad-block.small {
    height: 100px;
}

.ad-block img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.ad-banner-in-content {
    border: 2px dashed var(--legend-border);
    width: 100%;
    height: 150px;
    background-color: var(--main-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

/* ===================================
   BREAKPOINT 1: 480px (Large Mobile)
   =================================== */
@media (min-width: 480px) {
    .container {
        max-width: 480px;
        padding: 0 1.25rem;
    }

    .main-content-wrapper {
        padding: 25px 12px;
    }

    .image-grid {
        gap: 18px;
    }

    .ad-container {
        margin: 20px 12px;
        padding: 15px 12px;
    }

    body.has-sticky-ad {
        padding-bottom: 82px;
    }

    #scrollUpBtn {
        bottom: 40px;
        right: 14px;
    }
}

/* ===================================
   BREAKPOINT 2: 768px (Tablet) - MOST IMPORTANT
   =================================== */
@media (min-width: 768px) {
    .container {
        max-width: 768px;
        padding: 0 1.5rem;
    }

    .main-content-wrapper {
        padding: 35px 20px;
        gap: 30px;
    }

    .logo img {
        width: 27px;
        height: 27px;
    }

    .left-column,
    .right-column {
        padding: 0;
    }

    .right-column {
        margin-right: 0;
    }

    .image-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .ad-container {
        margin: 25px 15px;
        padding: 18px 15px;
    }

    .ad-label {
        font-size: 10px;
        margin-bottom: 10px;
    }

    .ad-header {
        margin: 18px auto 25px;
    }

    .ad-in-content {
        margin: 35px auto;
    }

    .ad-footer {
        margin: 25px auto 18px;
        max-width: 468px;
    }

    .sidebar-ad-container {
        display: block;
        position: relative;
        float: none;
        margin: 25px auto;
        width: 100%;
        max-width: 468px;
        padding: 15px;
        top: auto;
    }

    body.has-sticky-ad {
        padding-bottom: 90px;
    }

    #scrollUpBtn {
        width: 45px;
        height: 45px;
        bottom: 65px;
        right: 24px;
    }
}

/* ===================================
   BREAKPOINT 3: 1024px (Desktop) - MOST IMPORTANT
   =================================== */
@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
        padding: 0 2rem;
    }

    .main-content-wrapper {
        display: grid;
        grid-template-columns: 70% 30%;
        gap: 0px;
        padding: 40px 20px;
    }

    .left-column {
        padding-right: 20px;
    }

    .right-column {
        padding: 0;
    }

    .menu-toggle {
        display: none;
    }

    .logo img {
        width: 29px;
        height: 29px;
    }

    .navbar {
        position: relative;
        color: white;
        text-align: center;
        border-radius: 5px;
        overflow: hidden;
    }

    .navbar .container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .navbar .logo {
        font-size: 1.3rem;
        width: auto;
        justify-content: flex-start;
    }

    .navbar .nav-links {
        position: static;
        max-height: none;
        flex-direction: row;
        margin-bottom: 0;
        padding-top: 0;
        width: auto;
    }

    .navbar .nav-links ul {
        display: flex;
        flex-direction: row;
        align-items: center;
        margin-left: 0;
        width: auto;
    }

    .navbar .nav-links ul li a {
        padding: 10px 15px;
        width: auto;
        white-space: nowrap;
    }

    .menu {
        flex-direction: row;
    }
    
    .footer .contacts {
        flex-direction: row;
        gap: 20px;
    }

    .card-image img {
        width: 55%;
        margin: 0 auto;
    }

    .ad-container {
        margin: 28px auto;
        padding: 18px;
    }

    .ad-header {
        max-width: 728px;
        margin: 18px auto 28px;
    }

    .ad-in-content {
        max-width: 728px;
        margin: 38px auto;
    }

    .ad-footer {
        max-width: 728px;
        margin: 28px auto 18px;
    }

    .sidebar-ad-container {
        display: block;
        position: sticky;
        top: 80px;
        float: none;
        width: 280px;
        max-width: 280px;
        margin: 20px 0 20px 20px;
        padding: 15px;
    }

    .mobile-sticky-ad {
        display: none !important;
    }

    body.has-sticky-ad {
        padding-bottom: 0 !important;
    }

    #scrollUpBtn {
        width: 50px;
        height: 50px;
        bottom: 65px;
        right: 28px;
    }
}

/* ===================================
   BREAKPOINT 4: 1280px (Large Desktop)
   =================================== */
@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }

    .ad-container {
        margin: 30px auto;
        padding: 20px;
    }

    .ad-header {
        max-width: 970px;
        margin: 20px auto 30px;
    }

    .ad-in-content {
        max-width: 728px;
        margin: 40px auto;
    }

    .ad-footer {
        max-width: 728px;
        margin: 30px auto 20px;
    }

    .sidebar-ad-container {
        width: 300px;
        max-width: 300px;
        margin: 20px 0 20px 25px;
        padding: 18px;
    }

    #scrollUpBtn {
        width: 52px;
        height: 52px;
        bottom: 70px;
        right: 30px;
    }
}

/* ===================================
   BREAKPOINT 5: 1440px (Extra Large)
   =================================== */
@media (min-width: 1440px) {
    .container {
        max-width: 1440px;
    }

    .logo img {
        width: 32px;
        height: 32px;
    }

    .ad-container {
        margin: 35px auto;
        padding: 25px;
    }

    .ad-header {
        max-width: 970px;
        margin: 25px auto 35px;
    }

    .ad-in-content {
        max-width: 728px;
        margin: 45px auto;
    }

    .ad-footer {
        max-width: 728px;
        margin: 35px auto 25px;
    }

    .sidebar-ad-container {
        width: 300px;
        margin: 20px 0 20px 30px;
        padding: 20px;
    }

    #scrollUpBtn {
        width: 53px;
        height: 53px;
        bottom: 75px;
        right: 32px;
    }
}

/* ===================================
   RESPONSIVE AD SIZING
   =================================== */
@media (max-width: 991px) {
    .ad-container ins.adsbygoogle {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }
}

/* ===================================
   PRINT STYLES
   =================================== */
@media print {
    .ad-container,
    .ad-header,
    .ad-in-content,
    .ad-footer,
    .sidebar-ad-container,
    .mobile-sticky-ad {
        display: none !important;
    }

    body {
        padding-bottom: 0 !important;
    }
}

/* ===================================
   ACCESSIBILITY
   =================================== */
@media (prefers-reduced-motion: reduce) {
    .ad-close-btn {
        transition: none;
    }

    .sidebar-ad-container {
        position: relative;
        top: auto;
    }

    * {
        animation: none !important;
        transition: none !important;
    }
}

@media (prefers-contrast: high) {
    .ad-container {
        border: 2px solid #fff;
    }

    .ad-label {
        color: #fff;
    }

    .ad-close-btn {
        background: #000;
        border: 2px solid #fff;
    }
}

.deals-section {
  background-color: var(--dark-gray);
  border: 1px solid var(--color-green);
  border-radius: 5px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.deals-header {
  margin-bottom: 16px;
}

.deals-header h2 {
  font-size: var(--font-h2);
  font-weight: 900;
  letter-spacing: 2px;
  color: #f0f0f0;
  margin-bottom: 6px;
  text-transform: uppercase;
}

.deals-underline {
  height: 2px;
  background: var(--color-green);
  border-radius: 2px;
}

/* ---- Grid ---- */
.deals-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

/* ---- Affiliate Card ---- */
.deal-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--light-text);
  position: relative;
  background-color: var(--main-bg);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  overflow: hidden;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed), border-color var(--transition-speed);
  padding-bottom: 10px;
}

.deal-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-green);
  box-shadow: 0 0 12px rgba(17, 227, 42, 0.35);
}

/* ---- Discount Badge ---- */
.deal-badge {
  display: block;
  width: 100%;
  background: #ecad27;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  padding: 4px 5px;
  font-family: Saira, sans-serif;
  letter-spacing: 0.3px;
}

/* ---- Product Image ---- */
.deal-img-wrap {
  width: 100%;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background-color: var(--bg-secondary);
}

.deal-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform var(--transition-speed);
}

.deal-card:hover .deal-img-wrap img {
  transform: scale(1.05);
}

/* ---- Category Label ---- */
.deal-label {
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 7px 5px 0;
  line-height: 1.4;
  color: #e5e7eb;
}

/* ---- Nav Arrows ---- */
.deals-nav {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

.deal-arrow-btn {
  background: var(--accent-blue);
  color: #fff;
  border: none;
  border-radius: var(--border-radius);
  width: 34px;
  height: 34px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-speed);
}

.deal-arrow-btn:hover {
  background: var(--accent-blue-hover);
}

/* ---- Breakpoints (match your system) ---- */

/* 480px */
@media (min-width: 480px) {
  .deals-grid { gap: 12px; }
  .deal-img-wrap { height: 105px; }
  .deal-label { font-size: 11.5px; }
}

/* 768px Tablet */
@media (min-width: 768px) {
  .deals-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
  }
  .deal-img-wrap { height: 120px; }
  .deal-badge { font-size: 11px; }
  .deal-label { font-size: 12px; }
  .deal-arrow-btn { width: 36px; height: 36px; }
}

/* 1024px Desktop */
@media (min-width: 1024px) {
  .deals-section { padding: 25px; }
  .deals-grid { gap: 16px; }
  .deal-img-wrap { height: 130px; }
  .deal-badge { font-size: 11.5px; }
  .deal-label { font-size: 13px; }
}

/* 1280px+ - 2 rows, more padding */
@media (min-width: 1280px) {
  .deal-img-wrap { height: 135px; }
  .deal-label { font-size: 13.5px; }
}

/* Deals page indicator */
.deals-page-indicator {
  text-align: center;
  font-size: 11px;
  color: var(--border-color);
  margin-top: 8px;
  font-family: Saira, sans-serif;
  letter-spacing: 1px;
}

/* ── Deal Skeleton Loader ── */
.deal-skeleton {
  background: linear-gradient(90deg, var(--dark-gray) 25%, #1a1f35 50%, var(--dark-gray) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 5px;
  height: 160px;
  border: 1px solid var(--border-color);
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

