/* ============================================
   BroTech IT Company - Premium Website Styles
   Color Scheme: Black Theme with Blue Accent (iDesigner Style)
   ============================================ */

/* ===== CSS VARIABLES ===== */
:root {
    /* Main Colors - iDesigner Palette */
    --primary-black: #000000;        /* Pure Black */
    --primary-blue: #4B8CC8;         /* Main Blue Accent */
    --white: #FFFFFF;                /* Pure White */
    --beige: #E6C8AD;                /* Light Beige/Cream */
    --dark-gray: #606060;            /* Dark Gray */

    /* Gradient Backgrounds */
    --background-black: #000000;
    --background-dark: #0a0a0a;
    --background-blue-dark: #0d1929; /* Very dark blue-black */

    /* Surfaces & Cards */
    --surface: rgba(75, 140, 200, 0.05);  /* Very subtle blue tint */
    --surface-hover: rgba(75, 140, 200, 0.1);
    --surface-card: rgba(255, 255, 255, 0.03); /* Almost black cards */

    /* Borders */
    --border: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.15);
    --border-accent: rgba(75, 140, 200, 0.3);

    /* Text Colors */
    --text: #ffffff;
    --text-primary: #ffffff;
    --text-secondary: #9ca3af;
    --text-muted: #606060;

    /* Accent Colors */
    --primary: #4B8CC8;              /* Blue - main accent */
    --secondary: #E6C8AD;            /* Beige - secondary accent */
    --accent: #4B8CC8;               /* Blue accent */
    --accent-hover: #5a9dd9;         /* Lighter blue on hover */
    --accent-light: rgba(75, 140, 200, 0.1);

    /* Status Colors */
    --success: #22c55e;
    --warning: #fbbf24;
    --danger: #f87171;

    /* Hover Effects */
    --hover: rgba(75, 140, 200, 0.15);

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s ease;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.8);
    --shadow-glow: 0 0 40px rgba(75, 140, 200, 0.3);
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-primary);
    background-color: var(--primary-black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Subtle Dark Blue-Black Gradient Background */
/* Removed animated gradient - simple black background */

/* Removed blur effect gradients */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding: 0;
    z-index: 1000;
    border-bottom: none;
    transform: translateY(0);
    transition: transform 0.3s ease-in-out,
                background 0.3s ease,
                backdrop-filter 0.3s ease,
                -webkit-backdrop-filter 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 15, 30, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

/* Fallback for browsers without backdrop-filter support */
@supports not (backdrop-filter: blur(12px)) {
    .navbar.scrolled {
        background: rgba(10, 15, 30, 0.95);
    }
}

.navbar.navbar-hidden {
    transform: translateY(-100%);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.125rem 25px;
    min-height: 75px;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    font-size: 1.5625rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.8;
}

.logo-img {
    width: 25;
    height: 25px;
    object-fit: contain;
    object-position: center;
    display: block;
}

.logo-text {
    color: var(--white);
    /* Removed gradient - simple white text */
}

.nav-menu {
    display: flex;
    gap: 1.375rem;
    align-items: center;
    justify-content: center;
}

.nav-link {
    color: var(--white);
    font-weight: 500;
    font-size: 1.0625rem;
    position: relative;
    padding: 0.65rem 0;
    transition: var(--transition);
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* ===== NAVBAR DROPDOWN (Algo Trading Menu) ===== */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .nav-link {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-arrow {
    transition: transform var(--transition-fast);
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    min-width: 200px;
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition);
    z-index: 1001;
    isolation: isolate;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.active .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    border-radius: 8px;
    margin: 0.25rem;
    text-decoration: none;
}

.nav-dropdown-menu .dropdown-item:hover {
    background: rgba(75, 140, 200, 0.2);
    color: var(--white);
    transform: translateX(4px);
}

.nav-dropdown-menu .dropdown-item.active {
    background: rgba(75, 140, 200, 0.2);
    color: var(--white);
    font-weight: 600;
    position: relative;
}

.nav-dropdown-menu .dropdown-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: var(--primary-blue);
    border-radius: 0 2px 2px 0;
}

.nav-dropdown-menu .dropdown-item i {
    width: 16px;
    text-align: center;
    font-size: 0.875rem;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--primary-blue);
    border-radius: 3px;
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-start; /* Changed from center to flex-start to position titles higher */
    padding-top: 28vh; /* Viewport-based padding for consistent positioning across all devices */
    overflow: hidden;
    background: var(--primary-black);
}


/* Hero Overlay - Removed gradient */
.hero-overlay {
    display: none;
}

/* 3D Spline Background for Home Page */
.spline-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Above body background, below hero content (z-index: 2) */
    pointer-events: none; /* No mouse interaction by default */
    opacity: 0.6; /* Subtle background effect */
    transition: opacity 0.5s ease;
    user-select: none; /* Prevent text selection */
    touch-action: none; /* Disable touch events */
}

.spline-background spline-viewer {
    width: 100%;
    height: 100%;
}

/* Hide Spline watermark logo - Multiple targeting methods */
spline-viewer #logo,
spline-viewer::part(logo),
spline-viewer [id="logo"],
spline-viewer [class*="logo"],
spline-viewer [class*="watermark"],
spline-viewer a[href*="spline"],
spline-viewer a[target="_blank"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    position: absolute !important;
    left: -9999px !important;
}

/* Additional aggressive hiding for shadow DOM content */
spline-viewer::shadow #logo,
spline-viewer::shadow [id="logo"],
spline-viewer::shadow a {
    display: none !important;
}

/* Algo-trading overview 3D model - optimized for performance */
#algoOverviewSplineContainer {
    pointer-events: none; /* Disable mouse interaction to reduce GPU usage */
    will-change: transform, opacity; /* Be specific about what will change */
    contain: layout style paint; /* Isolate rendering for better performance */
}

#algoOverviewSplineContainer spline-viewer {
    pointer-events: none; /* Disable mouse tracking on viewer */
    /* Removed transform: translateZ(0) - was forcing unnecessary GPU layer */
}

.hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 0 20px;
}

.hero-content {
    animation: fadeInUp 1s ease-out forwards;
    animation-fill-mode: both;
    will-change: opacity, transform;
    text-align: center;
    display: grid;
    grid-template-rows: auto auto;
    grid-template-columns: 1fr;
    place-items: center;
    gap: 0;
    opacity: 1;
    transform: translateY(-15%);
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2.5rem;
    text-align: center;
    width: 100%;
}

.title-line {
    display: block;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-fill-mode: both;
}

.title-line:nth-child(1) {
    animation-delay: 0.2s;
}

.title-line:nth-child(2) {
    animation-delay: 0.4s;
}

.title-line:nth-child(3) {
    animation-delay: 0.6s;
}

.title-line.highlight {
    color: var(--primary-blue);
    font-size: 4.5rem;
}

.title-line.subtitle {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-gray);
    margin-top: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out 0.8s forwards;
    animation-fill-mode: both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: fadeInUp 0.8s ease-out 1s forwards;
    animation-fill-mode: both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeInUp 1s ease-out 0.5s both;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scroll-arrow {
    width: 32px;
    height: 32px;
    color: var(--primary-blue);
    filter: drop-shadow(0 0 10px rgba(75, 140, 200, 0.5));
    transition: all 0.3s ease;
}

.scroll-indicator:hover .scroll-arrow {
    color: var(--primary-blue);
    filter: drop-shadow(0 0 15px rgba(99, 179, 237, 0.8));
    transform: translateY(-5px);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(75, 140, 200, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(75, 140, 200, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

/* ===== HERO STATS ===== */
.hero-stats {
    display: flex;
    gap: 3rem;
    animation: fadeInUp 0.8s ease-out 1.2s forwards;
    animation-fill-mode: both;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-blue);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ===== 3D SPLINE VIEWER ===== */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 1.5s ease-out 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.hero-3d-element {
    width: 100%;
    max-width: 600px;
    height: 600px;
    position: relative;
}

.hero-3d-element spline-viewer {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    overflow: hidden;
}

/* ===== SERVICES PREVIEW ===== */
.services-preview {
    padding: 4rem 0;
    background: var(--primary-black);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    background: rgba(75, 140, 200, 0.08);
    border: 1px solid rgba(75, 140, 200, 0.2);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    will-change: transform;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(75, 140, 200, 0.15);
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-glow);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-blue);
    border-radius: 20px;
    font-size: 2rem;
    color: var(--white);
    box-shadow: 0 8px 20px rgba(75, 140, 200, 0.5);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.service-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ===== SECTION STYLES ===== */
section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: rgba(75, 140, 200, 0.15);
    color: var(--primary-blue);
    border: 1px solid rgba(75, 140, 200, 0.3);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2rem; /* Add top margin for navbar clearance */
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.75rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: var(--primary-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== ABOUT SECTION ===== */
.about-section {
    background: var(--secondary-navy);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--electric-blue);
}

.about-text p {
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.about-list {
    list-style: none;
    margin-top: 1.5rem;
}

.about-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    color: var(--text-gray);
    font-size: 1rem;
}

.about-list i {
    color: var(--electric-blue);
    font-size: 1.25rem;
}

.about-visual {
    display: grid;
    gap: 1.5rem;
}

.about-card {
    background: rgba(30, 144, 255, 0.05);
    border: 1px solid rgba(30, 144, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
}

.about-card:hover {
    transform: translateX(10px);
    background: rgba(30, 144, 255, 0.1);
    border-color: var(--electric-blue);
}

.card-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-blue);
    border-radius: 12px;
    font-size: 1.75rem;
    color: var(--white);
    margin-bottom: 1rem;
}

.about-card h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.about-card p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin: 0;
}

/* ===== IT SERVICES SECTION ===== */
.it-services-section {
    background: var(--primary-navy);
    position: relative;
    z-index: 2;
}

.services-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-item {
    background: rgba(30, 144, 255, 0.03);
    border: 1px solid rgba(30, 144, 255, 0.15);
    border-radius: 16px;
    padding: 2.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.9);
}

/* CSS Animation for service items - lighter than GSAP */
.service-item.animate-in {
    animation: serviceItemFadeIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes serviceItemFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-blue);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-item:hover::before {
    transform: scaleX(1);
}

.service-item:hover {
    transform: translateY(-5px);
    background: rgba(30, 144, 255, 0.08);
    border-color: var(--electric-blue);
    box-shadow: 0 10px 30px rgba(30, 144, 255, 0.2);
}

.service-item-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(30, 144, 255, 0.1);
    border-radius: 16px;
    font-size: 2rem;
    color: var(--electric-blue);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.service-item:hover .service-item-icon {
    background: var(--electric-blue);
    color: var(--white);
    transform: scale(1.1) rotate(-5deg);
}

.service-item h3 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.service-item p {
    color: var(--text-gray);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* ===== ALGO TRADING SECTION ===== */
.algo-trading-section {
    background: var(--secondary-navy);
}

.algo-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.algo-category {
    background: rgba(30, 144, 255, 0.05);
    border: 1px solid rgba(30, 144, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    transition: var(--transition);
}

.algo-category:hover {
    background: rgba(30, 144, 255, 0.1);
    border-color: var(--electric-blue);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(30, 144, 255, 0.3);
}

/* Removed duplicate .category-header definition - main definition is at line ~3040 */
/* .category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(30, 144, 255, 0.2);
} */

.category-header i {
    font-size: 2rem;
    color: var(--electric-blue);
}

.category-header h3 {
    font-size: 1.25rem;
    color: var(--white);
}

.category-list {
    list-style: none;
}

.category-list li {
    padding: 0.75rem 0;
    color: var(--text-gray);
    font-size: 0.95rem;
    position: relative;
    padding-left: 1.5rem;
    transition: var(--transition);
}

.category-list li::before {
    content: '▹';
    position: absolute;
    left: 0;
    color: var(--electric-blue);
    font-size: 1.25rem;
}

.category-list li:hover {
    color: var(--white);
    padding-left: 2rem;
}

/* ===== MARKETPLACE SECTION ===== */
.marketplace-section {
    background: var(--primary-navy);
}

/* Footer pushing removed for better UX */

.marketplace-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(30, 144, 255, 0.1);
    border: 1px solid rgba(30, 144, 255, 0.3);
    color: var(--text-gray);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(75, 140, 200, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.filter-btn:hover::before {
    width: 300px;
    height: 300px;
}

.filter-btn:hover {
    background: rgba(75, 140, 200, 0.3);
    color: var(--white);
    border-color: rgba(75, 140, 200, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(75, 140, 200, 0.4);
}

.filter-btn.active {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(75, 140, 200, 0.6),
                0 0 0 3px rgba(75, 140, 200, 0.2);
}

/* Filter Dropdown Styles */
.filter-dropdown {
    position: relative;
    display: inline-block;
}

.filter-btn.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-btn.dropdown-toggle svg {
    width: 12px;
    height: 8px;
    transition: transform 0.3s ease;
}

.filter-dropdown:hover .dropdown-toggle svg {
    transform: rotate(180deg);
}

.filter-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 180px;
    background: rgba(26, 10, 46, 0.98);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(30, 144, 255, 0.3);
    border-radius: 12px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.filter-dropdown:hover .filter-dropdown-menu,
.filter-dropdown.open .filter-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.filter-dropdown.open .dropdown-toggle svg {
    transform: rotate(180deg);
}

.filter-dropdown-menu .dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-gray);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
}

.filter-dropdown-menu .dropdown-item:hover {
    background: rgba(30, 144, 255, 0.2);
    color: var(--white);
}

.filter-dropdown-menu .dropdown-item.active {
    background: var(--electric-blue);
    color: var(--white);
}

.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    position: relative;
}

/* Simplified filter animation states */
.product-card.filtering-out {
    animation: filterOut 0.2s ease forwards;
}

.product-card.filtering-in {
    animation: filterIn 0.2s ease forwards;
}

.product-card.hidden {
    display: none;
}

@keyframes filterOut {
    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

@keyframes filterIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
}

.product-card {
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.2);
    transform: translateY(-4px);
}

.product-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: var(--electric-blue);
    color: var(--white);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(75, 140, 200, 0.4);
}

.product-badge.premium {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 4px 20px rgba(251, 191, 36, 0.6);
}

.product-badge.free {
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.6);
}

.product-image {
    width: 100%;
    height: 200px;
    background: var(--hover);
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 2px solid var(--border);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-placeholder {
    font-size: 4rem;
    color: var(--electric-blue);
    opacity: 0.6;
    filter: drop-shadow(0 0 10px rgba(75, 140, 200, 0.5));
}

.product-info {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/* Product Header with Platform Badge */
.product-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.product-title {
    font-size: 1.125rem;
    color: var(--text);
    flex: 1;
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 3rem;
}

.platform-badge {
    padding: 0.375rem 0.625rem;
    border-radius: 6px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
    opacity: 1;
    transition: transform 0.2s ease;
}

.product-card:hover .platform-badge {
    transform: scale(1.05);
}

.platform-badge.mt4 {
    background: linear-gradient(135deg, #4CAF50, #45a049);
    color: var(--white);
    box-shadow: 0 2px 15px rgba(76, 175, 80, 0.5);
}

.platform-badge.mt5 {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    color: var(--white);
    box-shadow: 0 2px 15px rgba(33, 150, 243, 0.5);
}

.platform-badge.tradingview {
    background: linear-gradient(135deg, #00BCD4, #0097A7);
    color: var(--white);
    box-shadow: 0 2px 15px rgba(0, 188, 212, 0.5);
}

/* Product Content - Always Visible */
.product-expanded {
    padding: 0 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.product-description {
    color: var(--text-muted);
    font-size: 0.875rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

/* Product Stats */
.product-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.75rem;
    background: var(--hover);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.stat-item i {
    color: var(--primary);
    font-size: 0.875rem;
}

.product-features {
    display: none; /* Hide features for simpler cards */
}

.product-footer {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-top: auto;
}

/* Product Action Buttons */
.btn-action {
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.3);
}

.btn-action.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-action.btn-secondary:hover {
    background: var(--hover);
    border-color: var(--secondary);
    color: var(--secondary);
}

.btn-download {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(52, 152, 219, 0.4);
}

/* ===== PORTFOLIO SECTION ===== */
.portfolio-section {
    background: var(--secondary-navy);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: rgba(30, 144, 255, 0.05);
    border: 1px solid rgba(30, 144, 255, 0.2);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-10px);
    border-color: var(--electric-blue);
    box-shadow: 0 15px 40px rgba(30, 144, 255, 0.3);
}

.portfolio-image {
    position: relative;
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.portfolio-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(30, 144, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--electric-blue);
    opacity: 0.5;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent, rgba(15, 23, 41, 0.95));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.portfolio-overlay p {
    color: var(--electric-blue);
    font-weight: 600;
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.portfolio-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.portfolio-tags span {
    padding: 0.4rem 1rem;
    background: rgba(30, 144, 255, 0.1);
    border: 1px solid rgba(30, 144, 255, 0.3);
    color: var(--electric-blue);
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.portfolio-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.portfolio-stats .stat {
    text-align: center;
}

.portfolio-stats strong {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--electric-blue);
    margin-bottom: 0.25rem;
}

.portfolio-stats span {
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    background: var(--primary-navy);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.contact-info {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.contact-info h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.contact-info > p {
    color: var(--text-gray);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 100%;
    box-sizing: border-box;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: rgba(30, 144, 255, 0.05);
    border: 1px solid rgba(30, 144, 255, 0.2);
    border-radius: 12px;
    transition: var(--transition);
    max-width: 100%;
    box-sizing: border-box;
    text-decoration: none;
}

.contact-method,
.contact-method:visited,
.contact-method:link,
.contact-method:active {
    text-decoration: none;
}

.contact-method:visited .method-info h4,
.contact-method:visited .method-info p {
    color: inherit;
}

.contact-method:hover {
    background: rgba(30, 144, 255, 0.1);
    border-color: var(--electric-blue);
    transform: translateX(10px);
}

.method-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.75rem;
    color: var(--white);
    flex-shrink: 0;
}

.method-icon.whatsapp {
    background: #25D366;
}

.method-icon.telegram {
    background: #0088CC;
}

.method-icon.phone {
    background: #25D366;
}

.method-info {
    min-width: 0;
    overflow: hidden;
}

.method-info h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
    color: #ffffff !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.method-info p {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.9rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Phone numbers in single card */
.contact-method-phones {
    cursor: default;
}

.contact-method-phones:hover {
    transform: none;
}

.phone-numbers {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.phone-link {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
}

.phone-link:hover {
    color: var(--electric-blue, #1e90ff) !important;
}

.business-hours {
    background: rgba(30, 144, 255, 0.05);
    border: 1px solid rgba(30, 144, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 100%;
    box-sizing: border-box;
}

.business-hours h4 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: var(--electric-blue);
}

.business-hours p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

/* ===== CONTACT FORM ===== */
.contact-form-container {
    background: rgba(30, 144, 255, 0.05);
    border: 1px solid rgba(30, 144, 255, 0.2);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
    overflow: hidden;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1.25rem;
    background: rgba(30, 144, 255, 0.05);
    border: 1px solid rgba(30, 144, 255, 0.3);
    border-radius: 8px;
    color: var(--white);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: var(--transition);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    cursor: pointer;
}

.form-group select option {
    background: #1a1a2e;
    color: #ffffff;
    padding: 0.75rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--electric-blue);
    background: rgba(30, 144, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(30, 144, 255, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    margin-top: 1rem;
    width: 100%;
    justify-content: center;
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(180deg, #0a1628 0%, #050a15 50%, #000000 100%);
    border-top: 1px solid rgba(75, 140, 200, 0.2);
    padding: 4rem 0 2rem;
    position: relative;
    z-index: 10;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: var(--white);
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: #ffffff;
    font-size: 0.95rem;
    transition: var(--transition);
    opacity: 1;
}

.footer-section ul li a:hover {
    color: var(--primary-blue);
    padding-left: 5px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo img {
    width: 35px;
    height: 35px;
}

.footer-logo span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
}

.footer-section p {
    color: #ffffff;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(75, 140, 200, 0.1);
    border: 1px solid rgba(75, 140, 200, 0.3);
    border-radius: 8px;
    color: var(--primary-blue);
    font-size: 1.25rem;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(75, 140, 200, 0.15);
}

.footer-bottom p {
    color: #d1d5db;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-bottom i {
    color: #EF4444;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-visual {
        order: -1;
    }

    .cube-container {
        width: 200px;
        height: 200px;
    }

    .cube-face {
        width: 200px;
        height: 200px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* ===== TABLET & MOBILE NAVIGATION (max-width: 1000px) ===== */
@media (max-width: 1000px) {
    /* Navbar container sizing for mobile */
    .nav-container {
        padding: 0.875rem 15px;
        min-height: 60px;
        display: flex;
        align-items: center;
    }

    /* Hamburger is now inside nav-right, just need spacing */
    .hamburger {
        margin-right: 1rem;  /* Space between hamburger and user-dropdown */
    }

    /* Logo sizing */
    .logo-img {
        width: 30px;
        height: 30px;
    }

    .logo {
        font-size: 1.375rem;
        gap: 0.625rem;
    }

    /* Auth and language buttons */
    .btn-auth,
    .btn-user-account,
    .btn-language {
        padding: 0.5rem 0.875rem;
        font-size: 0.75rem;
    }

    .btn-auth svg,
    .btn-user-account svg {
        width: 15px;
        height: 15px;
    }

    .btn-user-account span {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Mobile menu */
    .nav-menu {
        position: absolute;
        left: -100%;
        top: 100%;
        flex-direction: column;
        background: rgba(10, 15, 30, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        width: 100%;
        height: auto;
        text-align: center;
        transition: left 0.3s ease;
        padding: 1.5rem 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
        z-index: 999;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .scroll-indicator {
        bottom: 1rem;
    }

    .scroll-arrow {
        width: 28px;
        height: 28px;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero-3d-element {
        height: 400px;
        max-width: 100%;
    }

    .section-title {
        font-size: 2rem;
    }

    /* Reduce icon sizes for mobile */
    .product-placeholder {
        font-size: 2.5rem; /* Reduced from 4rem */
    }

    .portfolio-placeholder {
        font-size: 3rem; /* Reduced from 5rem */
    }

    .stat-number {
        font-size: 2rem; /* Reduced from 2.5rem */
    }

    .services-grid,
    .services-grid-large,
    .algo-categories,
    .marketplace-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* ===== SMALL MOBILE (max-width: 430px) ===== */
@media (max-width: 430px) {
    /* Navigation container - smaller padding and height */
    .nav-container {
        padding: 0.5rem 8px;
        min-height: 50px;
    }

    /* Logo - smaller size */
    .logo-img {
        width: 24px;
        height: 24px;
    }

    .logo {
        font-size: 1rem;
        gap: 0.375rem;
    }

    /* Hamburger - smaller */
    .hamburger span {
        width: 20px;
        height: 2px;
    }

    .hamburger {
        gap: 4px;
        margin-right: 0.5rem;
    }

    /* Auth button - smaller */
    .btn-auth {
        padding: 0.35rem 0.5rem;
        font-size: 0.625rem;
        gap: 0.2rem;
    }

    .btn-auth svg {
        width: 12px;
        height: 12px;
    }

    /* User account button - smaller */
    .btn-user-account {
        padding: 0.35rem 0.5rem;
        font-size: 0.625rem;
        gap: 0.2rem;
    }

    .btn-user-account svg {
        width: 12px;
        height: 12px;
    }

    .btn-user-account span {
        max-width: 45px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Nav right spacing */
    .nav-right {
        gap: 0.5rem;
    }
}

/* ===== EXTRA SMALL MOBILE (max-width: 360px) ===== */
@media (max-width: 360px) {
    /* Navigation optimizations for 360px - smaller than 430px */
    .nav-container {
        padding: 0.4rem 6px;
        min-height: 46px;
    }

    .logo-img {
        width: 22px;
        height: 22px;
    }

    .logo {
        font-size: 0.875rem; /* 14px */
        gap: 0.25rem; /* 4px */
    }

    .hamburger span {
        width: 18px;
        height: 2px;
    }

    .hamburger {
        gap: 3px;
        margin-right: 0.375rem;
    }

    .btn-auth,
    .btn-user-account,
    .btn-language {
        padding: 0.3rem 0.4rem; /* 4.8px / 6.4px - extra small for 360px */
        font-size: 0.5625rem; /* 9px */
        gap: 0.15rem;
    }

    .btn-auth svg,
    .btn-user-account svg {
        width: 10px;
        height: 10px;
    }

    .btn-user-account span {
        max-width: 40px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .nav-right {
        gap: 0.375rem;
    }

    /* Hero section optimizations */
    .hero-title {
        font-size: 1.75rem; /* 28px */
    }

    .title-line.subtitle {
        font-size: 1rem; /* 16px */
    }

    .scroll-indicator {
        bottom: 0.75rem;
    }

    .scroll-arrow {
        width: 24px;
        height: 24px;
    }

    .hero-3d-element {
        height: 250px;
    }

    /* General mobile adjustments */
    .section-title {
        font-size: 1.5rem; /* 24px */
    }

    .product-placeholder {
        font-size: 1.75rem;
    }

    .portfolio-placeholder {
        font-size: 1.75rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }
}

/* ===== SMALL MOBILE (361px to 480px) ===== */
@media (min-width: 361px) and (max-width: 480px) {
    .btn-auth,
    .btn-user-account {
        padding: 0.4rem 0.7rem;
        font-size: 0.7rem;
    }

    .btn-auth svg,
    .btn-user-account svg {
        width: 13px;
        height: 13px;
    }

    .btn-user-account span {
        max-width: 55px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-3d-element {
        height: 300px;
    }

    .section-title {
        font-size: 1.75rem;
    }

    /* Further reduce icon sizes for small mobile */
    .product-placeholder {
        font-size: 2rem; /* Further reduced */
    }

    .portfolio-placeholder {
        font-size: 2rem; /* Further reduced */
    }

    .stat-number {
        font-size: 1.75rem; /* Further reduced */
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .marketplace-filters {
        flex-direction: column;
    }

    .filter-btn {
        width: 100%;
    }
}

/* ===== MINI PHONES (max-width: 500px) ===== */
@media (max-width: 500px) {
    /* Hide btn-language from nav-right on mini phones */
    .nav-right .language-dropdown {
        display: none !important;
    }

    /* Reduce btn-user-account size for mini phones */
    .btn-user-account {
        padding: 0.5rem 0.75rem;  /* Reduced from 0.6rem 1rem */
        font-size: 0.75rem;        /* 12px instead of 13px */
        gap: 6px;                   /* Reduced gap between icon and text */
    }

    .btn-user-account svg {
        width: 14px;  /* Smaller icon */
        height: 14px;
    }

    .btn-user-account span {
        max-width: 60px;           /* Limit username width */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Also reduce auth button for consistency */
    .btn-auth {
        padding: 0.5rem 0.75rem;
        font-size: 0.75rem;
    }

    .btn-auth svg {
        width: 14px;
        height: 14px;
    }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--primary-black);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-blue);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* ===== SELECTION STYLING ===== */
::selection {
    background: var(--primary-blue);
    color: var(--white);
}

::-moz-selection {
    background: var(--primary-blue);
    color: var(--white);
}

/* ===== LANGUAGE DROPDOWN STYLES ===== */
.language-dropdown {
    position: relative;
}

.btn-language {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border-medium);
    border-radius: 8px;
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-primary);
    white-space: nowrap;
}

.btn-language svg {
    width: 12px;
    height: 8px;
    flex-shrink: 0;
    stroke: var(--white);
    transition: transform 0.3s ease;
}

.btn-language:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--white);
}

.language-dropdown:hover .btn-language svg {
    transform: rotate(180deg);
}

.language-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 140px;
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    isolation: isolate;
}

.language-dropdown:hover .language-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-gray);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 1 !important;
}

.language-dropdown-menu .dropdown-item:hover {
    background: rgba(75, 140, 200, 0.2);
    color: var(--white);
}

.language-dropdown-menu .dropdown-item.active {
    background: rgba(75, 140, 200, 0.3);
    color: var(--primary-blue);
}

/* ===== AUTH SECTION STYLES ===== */
.auth-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 6rem 0;
    background: var(--primary-black);
    overflow: hidden;
}

.auth-section .spline-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.auth-section .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.auth-container {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: rgba(75, 140, 200, 0.08);
    border: 1px solid rgba(75, 140, 200, 0.3);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    opacity: 1 !important;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
    opacity: 1 !important;
}

.auth-header h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: var(--primary-blue);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 1 !important;
}

.auth-header p {
    color: var(--text-gray);
    font-size: 1rem;
    opacity: 1 !important;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    opacity: 1 !important;
}

.auth-form .form-group label {
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 1 !important;
}

.auth-form .form-group input {
    padding: 0.875rem 1.25rem;
    background: rgba(75, 140, 200, 0.05);
    border: 1px solid rgba(75, 140, 200, 0.3);
    border-radius: 10px;
    color: var(--white) !important;
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: var(--transition);
    opacity: 1 !important;
}

.auth-form .form-group input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    opacity: 1;
}

.auth-form .form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: rgba(75, 140, 200, 0.1);
    box-shadow: 0 0 0 3px rgba(75, 140, 200, 0.1);
}

.form-group-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 1 !important;
}

.form-group-checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--text-gray);
    font-size: 0.9rem;
    opacity: 1 !important;
}

.form-group-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-blue);
}

.btn-block {
    width: 100%;
    justify-content: center;
    margin-top: 1rem;
}

.auth-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(75, 140, 200, 0.2);
    opacity: 1 !important;
}

.auth-footer p {
    color: var(--text-gray);
    font-size: 0.95rem;
    opacity: 1 !important;
}

.auth-footer a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    opacity: 1 !important;
}

.auth-footer a:hover {
    color: var(--primary-blue);
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 2px solid;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert i {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.alert-error {
    background: rgba(248, 113, 113, 0.15);
    border-color: rgba(248, 113, 113, 0.4);
    color: #f87171;
}

.alert-error i {
    color: #f87171;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

.alert-success i {
    color: #22c55e;
}

.alert-warning {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.4);
    color: #fbbf24;
}

.alert-warning i {
    color: #fbbf24;
}

.alert div {
    flex: 1;
}

.alert p {
    margin: 0;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.alert p:not(:last-child) {
    margin-bottom: 0.5rem;
}

.alert-subtitle {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-top: 0.25rem;
}

/* ===== RIGHT NAVBAR SECTION ===== */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    justify-content: flex-end;
}

/* ===== AUTH BUTTONS IN NAVBAR ===== */
.auth-buttons {
    position: relative;
}

/* Auth Dropdown for Guests */
.auth-dropdown {
    position: relative;
}

.btn-auth {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    position: relative;
    background: transparent;
    border: 1px solid var(--border-medium);
    border-radius: 30px;
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    font-family: var(--font-primary);
    white-space: nowrap;
    z-index: 1;
    transition: all var(--transition-fast);
}

.btn-auth svg {
    width: 17px;
    height: 16px;
    flex-shrink: 0;
    stroke: var(--white);
}

.btn-auth:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.btn-auth:active {
    background: rgba(255, 255, 255, 0.1);
}

.auth-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    min-width: 160px;
    background: rgba(10, 15, 30, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    isolation: isolate;
}

.auth-dropdown-menu .dropdown-item {
    opacity: 1 !important;
}

.auth-dropdown:hover .auth-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* User Dropdown for Authenticated */
.user-dropdown {
    position: relative;
}

.btn-user-account {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: 1px solid var(--border-medium);
    border-radius: 50px;
    color: var(--white);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-primary);
    white-space: nowrap;
}

.btn-user-account svg {
    width: 17px;
    height: 16px;
    flex-shrink: 0;
    stroke: var(--white);
}

.btn-user-account:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--white);
}

/* User Dropdown Menu - Fixed position for real backdrop blur */
#userDropdownMenu {
    position: fixed;
    min-width: 160px;
    background: rgba(10, 15, 30, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

#userDropdownMenu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.user-dropdown-menu .dropdown-item {
    opacity: 1 !important;
}

/* Dropdown Items */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    opacity: 1;
    color: var(--text-gray);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-family: var(--font-primary);
}

.dropdown-item:hover {
    background: rgba(75, 140, 200, 0.2);
    color: var(--white);
}

.dropdown-item i {
    font-size: 0.875rem;
    width: 16px;
}

.user-dropdown-menu form {
    margin: 0;
}

/* ========================================
   MOBILE DROPDOWN OPTIMIZATIONS
   ======================================== */

/* Smaller dropdowns for mobile devices */
@media (max-width: 480px) {
    /* User Dropdown */
    .user-dropdown-menu {
        min-width: 200px;
        padding: 0.5rem 0;
        right: -10px;
    }

    .user-dropdown-menu .dropdown-item {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .user-dropdown-menu .dropdown-item i {
        width: 14px;
        font-size: 0.875rem;
    }

    .user-dropdown-menu .dropdown-item span {
        font-size: 0.875rem;
    }

    .btn-user-account {
        padding: 0.4rem 0.7rem;
        font-size: 0.75rem;
        gap: 0.25rem;
    }

    .btn-user-account svg {
        width: 14px;
        height: 14px;
    }

    .btn-user-account span {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* Auth Dropdown */
    .auth-dropdown-menu {
        min-width: 140px;
        padding: 0.5rem 0;
        right: -10px;
    }

    .auth-dropdown-menu .dropdown-item {
        padding: 0.625rem 1rem;
        font-size: 0.875rem;
    }

    .auth-dropdown-menu .dropdown-item i {
        width: 14px;
        font-size: 0.875rem;
    }

    .btn-auth {
        padding: 0.4rem 0.7rem;
        font-size: 0.7rem;
        gap: 0.25rem;
    }

    .btn-auth svg {
        width: 14px;
        height: 14px;
    }

    /* Language options submenu */
    .language-options-submenu {
        min-width: 140px;
        padding: 0.375rem 0;
    }

    .language-options-submenu .dropdown-item {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }

    /* Dropdown dividers */
    .dropdown-divider {
        margin: 0.375rem 0;
    }
}

@media (max-width: 360px) {
    /* User Dropdown - Extra small */
    .user-dropdown-menu {
        min-width: 180px;
        padding: 0.375rem 0;
        right: -5px;
    }

    .user-dropdown-menu .dropdown-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .user-dropdown-menu .dropdown-item i {
        width: 12px;
        font-size: 0.8125rem;
    }

    .btn-user-account {
        padding: 0.35rem 0.6rem;
        font-size: 0.7rem;
        gap: 0.2rem;
    }

    .btn-user-account svg {
        width: 13px;
        height: 13px;
    }

    .btn-user-account span {
        max-width: 60px;
    }

    /* Auth Dropdown - Extra small */
    .auth-dropdown-menu {
        min-width: 130px;
        padding: 0.375rem 0;
        right: -5px;
    }

    .auth-dropdown-menu .dropdown-item {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .btn-auth {
        padding: 0.35rem 0.6rem;
        font-size: 0.65rem;
        gap: 0.2rem;
    }

    .btn-auth svg {
        width: 13px;
        height: 13px;
    }

    /* Language options submenu */
    .language-options-submenu {
        min-width: 130px;
        padding: 0.3rem 0;
    }

    .language-options-submenu .dropdown-item {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }

    /* Dropdown dividers */
    .dropdown-divider {
        margin: 0.3rem 0;
    }

    /* Tooltips */
    .item-tooltip {
        font-size: 0.6875rem;
        padding: 0.375rem 0.5rem;
        white-space: normal;
        max-width: 140px;
    }
}

/* ========================================
   RESPONSIVE NAVBAR MEDIA QUERIES
   ======================================== */

/* ===== LARGE DISPLAYS (1920px and above) ===== */
@media (min-width: 1920px) {
    .nav-container {
        padding: 1.25rem 40px;
        min-height: 90px;
    }

    .logo-img {
        width: 45px;
        height: 45px;
    }

    .logo {
        font-size: 2rem;
        gap: 1rem;
    }

    .nav-menu {
        gap: 1.75rem;
    }

    .nav-link {
        font-size: 1.125rem;
        padding: 0.75rem 0;
    }

    .btn-auth,
    .btn-user-account,
    .btn-language {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .btn-auth svg,
    .btn-user-account svg {
        width: 20px;
        height: 19px;
    }

    /* Limit font scaling on large displays */
    .hero-title {
        font-size: min(4.5rem, 5rem); /* Cap at 5rem max */
    }

    .section-title {
        font-size: min(2.75rem, 3rem); /* Cap at 3rem max */
    }

    .container {
        max-width: 1400px; /* Prevent excessive width on ultra-wide displays */
    }

    .product-placeholder {
        font-size: min(4rem, 4.5rem); /* Cap at 4.5rem max */
    }

    .portfolio-placeholder {
        font-size: min(5rem, 5.5rem); /* Cap at 5.5rem max */
    }
}

/* ===== LAPTOP DISPLAYS (1366px to 1919px) ===== */
@media (min-width: 1366px) and (max-width: 1919px) {
    .nav-container {
        padding: 1.125rem 30px;
        min-height: 78px;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }

    .logo {
        font-size: 1.625rem;
        gap: 0.875rem;
    }

    .nav-menu {
        gap: 1.5rem;
    }

    .nav-link {
        font-size: 1.0625rem;
        padding: 0.7rem 0;
    }

    .btn-auth,
    .btn-user-account,
    .btn-language {
        padding: 0.75rem 1.375rem;
        font-size: 0.9375rem;
    }
}

/* ===== SMALL LAPTOPS (1025px to 1365px) ===== */
@media (min-width: 1025px) and (max-width: 1365px) {
    .nav-container {
        padding: 1rem 20px;
        min-height: 70px;
    }

    .logo-img {
        width: 40px;
        height: 40px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .nav-menu {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.9375rem;
        padding: 0.6rem 0;
    }

    .btn-auth,
    .btn-user-account,
    .btn-language {
        padding: 0.65rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* ====================================
   Algo Trading Layout
   ==================================== */

/* Algo Layout Body */
.algo-layout {
    position: relative;
    overflow-x: hidden;
    background: var(--primary-black);
    color: var(--white);
}


/* Algo Content Layer (above 3D model) */
.algo-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding-top: 6rem; /* Push content down for better centering */
}

/* SPA Loading Indicator */
.spa-loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.spa-loading-bar.loading {
    opacity: 1;
}

.spa-loading-progress {
    height: 100%;
    background: linear-gradient(90deg,
        var(--primary-blue) 0%,
        var(--accent-hover) 50%,
        var(--primary-blue) 100%);
    background-size: 200% 100%;
    animation: loading-shine 1.5s ease-in-out infinite;
    box-shadow: 0 0 10px var(--primary-blue);
}

@keyframes loading-shine {
    0% {
        background-position: 200% 0;
        width: 0%;
    }
    50% {
        width: 70%;
    }
    100% {
        background-position: -200% 0;
        width: 100%;
    }
}

/* SPA Content Wrapper */
.algo-content-wrapper {
    min-height: 50vh;
    transition: opacity 0.2s ease;
}

.algo-content-wrapper.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Algo Hero Section */
.algo-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0;
    text-align: center;
    position: relative;
    z-index: 2;
}

.algo-hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 5rem;
    position: relative;
    z-index: 10; /* Above 3D background (z-index: 0) */
}

.algo-hero-title {
    font-size: 4rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 11; /* Ensure text is above 3D model */
}

.algo-hero-subtitle {
    font-size: 1.5rem;
    color: var(--beige);
    margin-bottom: 0;
    font-weight: 300;
    position: relative;
    z-index: 11; /* Ensure text is above 3D model */
}

.algo-hero-btn {
    background: var(--primary-blue);
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--white);
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 11; /* Ensure button is above 3D model */
}

.algo-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

/* Responsive Design for Algo Layout */
@media (max-width: 768px) {
    .algo-hero-content {
        padding-top: 3rem;
    }

    .algo-hero-title {
        font-size: 2.5rem;
    }

    .algo-hero-subtitle {
        font-size: 1.125rem;
    }

    .algo-hero-btn {
        margin-bottom: 2rem;
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
}

/* ====================================
   Categories & Products Sections
   ==================================== */

/* Categories Carousel */
.categories-carousel {
    padding: 3rem 0;
    position: relative;
    z-index: 2;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.category-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.category-card:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 10px 30px rgba(75, 140, 200, 0.3);
    transform: translateY(-8px);
    background: rgba(75, 140, 200, 0.1);
}

.category-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(75, 140, 200, 0.1);
    border-radius: 50%;
    font-size: 2rem;
    color: var(--primary-blue);
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    background: var(--primary-blue);
    color: var(--white);
}

.category-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0;
    color: var(--white);
}

.category-count {
    font-size: 0.875rem;
    color: var(--beige);
    font-weight: 500;
}

/* Statistics Section */
.statistics {
    padding: 3rem 0;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 2;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1.5rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: 1.125rem;
    color: var(--beige);
    font-weight: 500;
    margin: 0;
}

/* Stats Grid Small for Category Pages */
.stats-grid-small {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.stats-grid-small .stat-item {
    padding: 0.5rem;
}

.stats-grid-small h3 {
    font-size: 1.875rem;
    color: var(--primary-blue);
    margin-bottom: 0;
}

.stats-grid-small p {
    font-size: 0.875rem;
    color: var(--beige);
    margin: 0;
}

/* Featured Products Section */
.featured-products,
.products-section {
    padding: 0;
    position: relative;
    z-index: 2;
}

.section-title {
    font-size: 2.25rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--white);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.product-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    box-shadow: 0 20px 40px rgba(75, 140, 200, 0.3);
    transform: translateY(-4px);
    border-color: var(--primary-blue);
}

.product-image {
    width: 100%;
    height: 240px;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-content,
.product-info {
    padding: 1.5rem;
}

.product-title,
.product-name {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--white);
}

.product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--beige);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tag.platform {
    background: rgba(75, 140, 200, 0.1);
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.tag.license {
    background: rgba(251, 191, 36, 0.1);
    color: #fbbf24;
    border-color: rgba(251, 191, 36, 0.3);
}

.product-description {
    font-size: 0.875rem;
    color: var(--beige);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.product-actions {
    margin-top: auto;
}

/* Category Header */
.category-header {
    padding: 2rem 0 2rem;
    text-align: center;
    border-bottom: 0;
    position: relative;
    z-index: 2;
}

.category-header h1 {
    margin-bottom: 0.5rem;
    color: var(--white);
    font-size: 3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-header .subtitle {
    font-size: 1.125rem;
    color: var(--beige);
    font-weight: 300;
}

.category-stats {
    padding: 1rem 0;
    position: relative;
    z-index: 2;
}

/* Filters Section */
.filters-section {
    padding: 0;
    position: relative;
}

/* Filters */
.filters-simple {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 1.5rem 0;
}

.filter-btn {
    padding: 0.625rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--beige);
    cursor: pointer;
    transition: all 0.15s ease;
}

.filter-btn:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

.filter-btn.active {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

/* Empty State - Modern Design */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
    border: 1px solid rgba(71, 85, 105, 0.3);
    border-radius: 16px;
    margin: 2rem 0;
    min-height: 300px;
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(99, 102, 241, 0.1));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.empty-state-icon i {
    font-size: 2rem;
    color: var(--primary-blue);
    opacity: 0.8;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 400px;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.empty-state .btn-reset {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.empty-state .btn-reset:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.empty-state .btn-reset i {
    font-size: 0.85rem;
}

/* Dropdown Divider */
.nav-dropdown-menu .dropdown-divider {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0.25rem;
}

/* Responsive Design for Categories & Products */
@media (max-width: 1366px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-grid,
    .stats-grid-small {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .category-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-grid-small {
        grid-template-columns: 1fr;
    }

    .filters-simple {
        justify-content: flex-start;
    }

    .category-header h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr;
    }

    .stat-number {
        font-size: 2.25rem;
    }
}

/* ============================================
   ALGO TRADING - NEW COMPONENTS STYLES
   ============================================ */

/* 5-Column Products Grid */
.products-grid-5col {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
    margin: 1.5rem 0;
}

@media (max-width: 1400px) {
    .products-grid-5col {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1100px) {
    .products-grid-5col {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid-5col {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .products-grid-5col {
        grid-template-columns: 1fr;
    }
}

/* Resource Cards */
.resource-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.resource-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-lg);
}

.resource-image-link {
    text-decoration: none;
    display: block;
}

.resource-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--background-dark);
    overflow: hidden;
}

.resource-image svg {
    width: 100%;
    height: 100%;
}
.resource-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.resource-card:hover .resource-image img {
    transform: scale(1.05);
}

/* Badges */
.badge-new, .badge-popular {
    position: absolute;
    top: 0.75rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
}

.badge-new {
    left: 0.75rem;
    background: var(--success);
    color: white;
}

.badge-popular {
    right: 0.75rem;
    background: var(--warning);
    color: var(--primary-black);
}

.badge-favorite {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid var(--border);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
}

.badge-favorite:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: var(--danger);
    transform: scale(1.1);
}

.badge-favorite.active {
    background: var(--danger);
    border-color: var(--danger);
}

.badge-favorite i {
    font-size: 1rem;
}

/* Resource Info */
.resource-info {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.resource-name {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.resource-name a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.resource-name a:hover {
    color: var(--primary);
}

.resource-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.meta-item i {
    font-size: 0.75rem;
}

.resource-stats {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.stat-downloads {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

/* Tags */
.resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    padding: 0.25rem 0.625rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.tag-more {
    padding: 0.25rem 0.625rem;
    background: var(--primary);
    border-radius: 4px;
    font-size: 0.75rem;
    color: white;
    font-weight: 500;
}

/* Resource Description (for Strategy/Book cards) */
.resource-description {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Video Thumbnail Overlay (for Strategy cards) */
.video-thumbnail-overlay {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-thumbnail-overlay svg {
    width: 100%;
    height: 100%;
}

.resource-card:hover .video-thumbnail-overlay svg circle {
    fill: #dc2626;
    transform-origin: center;
    transform: scale(1.1);
    transition: var(--transition);
}

/* Book Thumbnail */
.book-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
}

.book-thumbnail svg {
    width: 100%;
    height: 100%;
}

/* File Type Badge (for Book cards) */
.file-type-badge {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 10;
}

.file-type-badge i {
    font-size: 0.875rem;
}

.file-pdf {
    background: #dc2626;
    color: white;
}

.file-docx, .file-doc {
    background: #2563eb;
    color: white;
}

.file-xlsx, .file-xls {
    background: #16a34a;
    color: white;
}

.file-txt {
    background: #6b7280;
    color: white;
}

/* Filters Bar */
.filters-bar {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 1.5rem;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 1.5rem 0;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.filter-btn:hover {
    background: var(--surface-hover);
    border-color: var(--border-medium);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.filter-btn {
    opacity: 1;
    transform: scale(1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn[style*="display: none"] {
    opacity: 0;
    transform: scale(0.9);
}

.sort-select {
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    cursor: pointer;
    min-width: 180px;
    transition: var(--transition-fast);
}

.sort-select:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.sort-select option {
    background: var(--primary-black);
    color: white;
}

.search-group {
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

/* Resource Detail Page */
.resource-detail-page {
    padding: 2rem 0;
    min-height: 100vh;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

.breadcrumbs a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.breadcrumbs a:hover {
    color: var(--accent-hover);
}

.breadcrumbs span:not(.badge) {
    color: var(--text-muted);
}


.resource-detail-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
    align-items: start;
}

@media (max-width: 1200px) {
    .resource-detail-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .resource-detail-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Media Section */
.resource-media {
    position: sticky;
    top: 2rem;
}

/* Video Section - Primary Display */
.resource-video {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.resource-video iframe,
.resource-video video {
    width: 100%;
    aspect-ratio: 16 / 9;
    display: block;
}

/* Badges on video */
.resource-video .badge-new,
.resource-video .badge-popular {
    position: absolute;
    top: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
    animation: badgePulse 2s infinite;
}

.resource-video .badge-new {
    left: 1rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.resource-video .badge-popular {
    right: 1rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@media (max-width: 360px) {
    .resource-video .badge-new {
        left: 0.5rem;
    }

    .resource-video .badge-popular {
        right: 0.5rem;
    }
}

/* No Video Placeholder */
.no-video-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--surface) 0%, rgba(75, 140, 200, 0.1) 100%);
    border-radius: 16px;
    border: 1px solid var(--border);
    color: var(--text-muted);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    padding: 2rem;
    box-sizing: border-box;
}

.no-video-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-video-placeholder span {
    font-size: 1.125rem;
}

/* Info Section */
.resource-info-detail {
    padding: 0.5rem 0;
}

.resource-title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(135deg, #ffffff 0%, #a3bffa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Meta Information Grid */
.resource-meta-info {
    display: grid;
    gap: 0;
    margin-bottom: 1.5rem;
    background: var(--surface);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
}

.meta-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    align-items: center;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s ease;
    min-width: 0;
}

.meta-row:last-child {
    border-bottom: none;
}

.meta-row:hover {
    background: rgba(75, 140, 200, 0.05);
}

.meta-label {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    min-width: 0;
    overflow: hidden;
    word-break: break-word;
    overflow-wrap: break-word;
}

.meta-value i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    color: var(--primary);
    flex-shrink: 0;
}

/* Tags */
.resource-tags-detail {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-bottom: 1.5rem;
}

.tag-badge {
    padding: 0.5rem 1rem;
    background: rgba(75, 140, 200, 0.1);
    border: 1px solid rgba(75, 140, 200, 0.3);
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--primary);
    transition: all 0.3s ease;
    cursor: default;
}

.tag-badge:hover {
    background: rgba(75, 140, 200, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(75, 140, 200, 0.3);
}

/* Resource Detail Mobile Responsiveness */
@media (max-width: 768px) {
    .resource-title {
        font-size: 1.875rem;
    }

    .resource-media {
        position: static;
    }

    .resource-meta-info {
        margin-bottom: 1.25rem;
    }

    .meta-row {
        grid-template-columns: minmax(101px, 22%) 1fr;
        padding: 0.75rem 0.875rem;
        gap: 0.75rem;
        min-width: 0;
    }

    .meta-label {
        font-size: 0.875rem;
    }

    .meta-value {
        font-size: 0.875rem;
        word-wrap: break-word;
    }

    .resource-actions-detail {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-download, .btn-get-access {
        flex: none;
        width: 100%;
        max-width: 100%;
        padding: 0.875rem 1rem;
    }

    .resource-description-section {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .educational-section {
        padding: 1.5rem;
        margin-top: 2rem;
    }
}

@media (max-width: 568px) {
    .resource-title {
        font-size: 1.625rem;
    }

    .resource-meta-info {
        margin-bottom: 1rem;
    }

    .meta-row {
        grid-template-columns: minmax(100px, 24%) 1fr;
        padding: 0.625rem 0.75rem;
        gap: 0.625rem;
        min-width: 0;
    }

    .meta-value {
        font-size: 0.8125rem;
        word-wrap: break-word;
    }

    .resource-video {
        margin-bottom: 1.5rem;
    }

    .resource-actions-detail {
        margin-bottom: 1.5rem;
        gap: 0.625rem;
    }

    .btn-download, .btn-get-access {
        padding: 0.875rem 1rem;
    }
}

@media (max-width: 480px) {
    .resource-title {
        font-size: 1.5rem;
    }

    .meta-row {
        grid-template-columns: minmax(100px, 19%) 1fr;
        padding: 0.5rem 0.625rem;
        gap: 0.5rem;
        min-width: 0;
    }

    .meta-label {
        font-size: 0.8125rem;
    }

    .meta-value {
        font-size: 0.75rem;
        word-wrap: break-word;
    }

    .btn-download, .btn-get-access {
        padding: 0.75rem 0.875rem;
        font-size: 0.9375rem;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }

    .resource-title {
        font-size: 1.375rem;
        word-break: break-word;
    }

    .meta-row {
        grid-template-columns: minmax(90px, 28%) 1fr;
        padding: 0.5rem 0.5rem;
        gap: 0.5rem;
        min-width: 0;
    }

    .meta-label {
        font-size: 0.75rem;
    }

    .meta-value {
        font-size: 0.75rem;
        word-wrap: break-word;
    }

    .resource-video .badge {
        padding: 0.25rem 0.5rem;
        font-size: 0.625rem;
    }

    .btn-download, .btn-get-access {
        padding: 0.75rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 360px) {
    .container {
        padding: 0 10px;
    }

    .resource-title {
        font-size: 1.25rem;
    }

    .meta-row {
        grid-template-columns: minmax(85px, 30%) 1fr;
        padding: 0.5rem 0.5rem;
        gap: 0.5rem;
        min-width: 0;
    }

    .meta-label {
        font-size: 0.6875rem;
    }

    .meta-value {
        font-size: 0.6875rem;
        word-wrap: break-word;
    }
}

/* Action Buttons */
.resource-actions-detail {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .resource-actions-detail {
        flex-direction: column;
    }
}

.btn-favorite {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9375rem;
}

.btn-favorite:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.2);
}

.btn-favorite.active {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.btn-favorite i {
    font-size: 1.125rem;
}

.btn-download, .btn-get-access {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 0.9375rem;
    flex: 1;
    box-shadow: 0 4px 16px rgba(75, 140, 200, 0.4);
}

.btn-download:hover, .btn-get-access:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(75, 140, 200, 0.5);
    background: linear-gradient(135deg, #3b82f6 0%, var(--primary) 100%);
}

.btn-download:active, .btn-get-access:active {
    transform: translateY(0);
}

.btn-download i, .btn-get-access i {
    font-size: 1.125rem;
}

@media (max-width: 480px) {
    .btn-download, .btn-get-access {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }
}

/* Description Section - Full Width Card */
.resource-description-section {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--surface);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.resource-description-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.resource-description-text {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    font-size: 1rem;
    letter-spacing: 0.2px;
}

/* Markdown Content Styling */
.resource-description-text p {
    margin-bottom: 1rem;
}

.resource-description-text h1,
.resource-description-text h2,
.resource-description-text h3,
.resource-description-text h4 {
    color: var(--text-primary);
    margin: 1.5rem 0 1rem;
    font-weight: 600;
}

.resource-description-text ul,
.resource-description-text ol {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.resource-description-text li {
    margin-bottom: 0.5rem;
}

.resource-description-text code {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.resource-description-text pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

.resource-description-text pre code {
    background: none;
    padding: 0;
}

.resource-description-text blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
    margin: 1rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
}

.resource-description-text a {
    color: var(--accent);
    text-decoration: none;
}

.resource-description-text a:hover {
    text-decoration: underline;
}

/* Image Gallery Tables - | ![](img1) | ![](img2) | ![](img3) | */
.resource-description-text table,
.markdown-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: transparent;
}

.resource-description-text table:has(img),
.markdown-table:has(img) {
    /* Table containing images - gallery mode */
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    border: none;
    background: transparent;
}

.resource-description-text table:has(img) thead,
.markdown-table:has(img) thead {
    display: none; /* Hide header row for image galleries */
}

.resource-description-text table:has(img) tbody,
.markdown-table:has(img) tbody {
    display: contents;
}

.resource-description-text table:has(img) tr,
.markdown-table:has(img) tr {
    display: contents;
}

.resource-description-text table:has(img) td,
.resource-description-text table:has(img) th,
.markdown-table:has(img) td,
.markdown-table:has(img) th {
    flex: 1 1 calc(33.333% - 0.75rem);
    min-width: 200px;
    padding: 0;
    border: none;
    background: transparent;
}

.resource-description-text table:has(img) img,
.markdown-table:has(img) img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.resource-description-text table:has(img) img:hover,
.markdown-table:has(img) img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.3);
    border-color: var(--accent);
}

/* Regular tables (without images) */
.resource-description-text table:not(:has(img)) th,
.resource-description-text table:not(:has(img)) td,
.markdown-table:not(:has(img)) th,
.markdown-table:not(:has(img)) td {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.resource-description-text table:not(:has(img)) th,
.markdown-table:not(:has(img)) th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
}

.resource-description-text table:not(:has(img)) tr:hover,
.markdown-table:not(:has(img)) tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Standalone images in markdown */
.resource-description-text > p > img,
.resource-description-text > img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-description-text > p > img:hover,
.resource-description-text > img:hover {
    transform: scale(1.01);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.2);
}

/* Responsive: 2 columns on tablet */
@media (max-width: 768px) {
    .resource-description-text table:has(img) td,
    .resource-description-text table:has(img) th,
    .markdown-table:has(img) td,
    .markdown-table:has(img) th {
        flex: 1 1 calc(50% - 0.5rem);
        min-width: 150px;
    }
}

/* Responsive: 1 column on mobile */
@media (max-width: 480px) {
    .resource-description-text table:has(img) td,
    .resource-description-text table:has(img) th,
    .markdown-table:has(img) td,
    .markdown-table:has(img) th {
        flex: 1 1 100%;
        min-width: unset;
    }
}

@media (max-width: 480px) {
    .resource-description-section {
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .resource-description-section h2 {
        font-size: 1.25rem;
    }
}

/* Modal Windows */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background: var(--background-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: auto;
    z-index: 1001;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.25rem;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: var(--surface);
    color: var(--text-primary);
}

.modal-body {
    padding: 1.5rem;
}

.modal-body p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.account-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.account-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.account-item:hover {
    background: var(--surface-hover);
    border-color: var(--border-medium);
}

.account-item input[type="radio"] {
    accent-color: var(--primary);
}

.account-info {
    display: flex;
    flex-direction: column;
}

.account-number {
    font-weight: 600;
    color: var(--text-primary);
}

.account-name {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.alert-info {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(75, 140, 200, 0.1);
    border: 1px solid rgba(75, 140, 200, 0.3);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.alert-info i {
    color: var(--primary);
    font-size: 1.125rem;
    margin-top: 0.125rem;
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
        max-height: 85vh;
    }

    .modal-header h3 {
        font-size: 1.125rem;
    }
}

/* My Downloads Page */
.my-downloads-page {
    padding: 2rem 0;
    padding-top: 120px; /* Fix navbar overlap (80px navbar + 40px spacing) */
    min-height: 100vh;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.page-header .subtitle {
    color: var(--text-secondary);
    font-size: 1.125rem;
}

.downloads-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

@media (max-width: 480px) {
    .downloads-stats {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.stat-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    border-radius: 10px;
    font-size: 1.5rem;
    color: white;
}

.stat-info h3 {
    font-size: 1.75rem;
    margin: 0;
    color: var(--text-primary);
}

.stat-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.downloads-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1.5rem;
}

/* Responsive grid - downloads */
@media (max-width: 768px) {
    .downloads-list {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .download-card {
        padding: 1.25rem;
    }

    .download-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .download-info {
        width: 100%;
        min-width: 0;
    }

    .download-title {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .download-actions {
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.5rem;
        width: 100%;
        margin-top: 0;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border);
    }

    /* Body fixes */
    .download-card-body {
        overflow: hidden;
    }

    .download-detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .detail-label {
        min-width: auto;
    }

    .detail-value {
        word-break: break-all;
        max-width: 100%;
    }

    .license-key-container {
        width: 100%;
        max-width: 100%;
    }

    .license-key {
        word-break: break-all;
        overflow-wrap: break-word;
    }
}

.download-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.download-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.1);
    transform: translateY(-2px);
}

.download-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.download-info {
    flex: 1;
    min-width: 0;
}

.download-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.download-title i {
    color: var(--primary);
    font-size: 1.125rem;
}

.download-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.meta-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    background: linear-gradient(135deg, var(--surface), var(--surface-hover));
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.meta-badge i {
    color: var(--primary);
    opacity: 0.7;
}

.meta-badge:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.download-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    border-radius: 10px;
    color: white;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

.btn-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.btn-icon:active {
    transform: translateY(0);
}

.btn-icon:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Secondary style for view button */
.btn-icon:last-child {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-icon:last-child:hover {
    background: var(--surface-hover);
    color: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.15);
}

/* Tooltip for action buttons */
.btn-icon[title]::after {
    content: attr(title);
    position: absolute;
    right: calc(100% + 0.75rem);
    top: 50%;
    transform: translateY(-50%);
    background: var(--background-dark, #1a1a1a);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 100;
}

.btn-icon[title]:hover::after {
    opacity: 1;
}

.btn-icon[title]::before {
    content: '';
    position: absolute;
    right: calc(100% + 0.25rem);
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 5px solid var(--background-dark, #1a1a1a);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 100;
}

.btn-icon[title]:hover::before {
    opacity: 1;
}

.download-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.download-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.detail-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 120px;
}

.detail-value {
    color: var(--text-primary);
}

.license-key-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.license-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0;
}

.inline-license-key {
    display: block;
    font-family: 'Courier New', monospace;
    font-size: 1.125rem;
    font-weight: 700;
    color: #4B8CC8;
    letter-spacing: 1.5px;
    background: rgba(75, 140, 200, 0.15);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    word-break: break-all;
    text-align: center;
    border: 2px solid rgba(75, 140, 200, 0.3);
}

.license-hint-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.license-key-display {
    display: flex;
    justify-content: center;
}

/* Mobile responsive for license key container */
@media (max-width: 768px) {
    .license-key-container {
        gap: 1.25rem;
    }

    .license-label {
        font-size: 0.9rem !important;
        line-height: 1.5 !important;
    }

    .inline-license-key {
        font-size: 0.875rem !important;
        padding: 0.75rem 1rem !important;
        letter-spacing: 1px !important;
    }

    .license-hint-inline {
        font-size: 0.8125rem !important;
    }
}

.license-key {
    padding: 0.5rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    color: var(--primary);
    font-size: 0.875rem;
    flex: 1;
}

.btn-copy {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-copy:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ============================================
   ERROR DISPLAY STYLES (License Section)
   ============================================ */

/* User-friendly error message */
.error-user-message {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(248, 113, 113, 0.1);
    border: 2px solid rgba(248, 113, 113, 0.3);
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.error-user-message i {
    font-size: 1.5rem;
    color: #f87171;
    flex-shrink: 0;
    margin-top: 0.125rem;
}

.error-user-message p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    font-weight: 500;
}

/* Support actions section */
.error-support-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.error-hint-inline {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    padding: 0.875rem 1rem;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.error-hint-inline i {
    font-size: 1.125rem;
    color: #3b82f6;
    flex-shrink: 0;
}

.support-buttons {
    display: flex;
    gap: 1rem;
}

.btn-support,
.btn-retry {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-support {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-support:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
}

.btn-retry {
    background: var(--surface);
    border: 2px solid var(--border);
    color: var(--text);
}

.btn-retry:hover {
    background: var(--hover);
    border-color: #4B8CC8;
    transform: translateY(-2px);
}

/* License actions buttons */
.license-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-download-primary {
    min-width: 300px;
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    background: linear-gradient(135deg, #4B8CC8 0%, #5a9dd9 100%);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    box-shadow: 0 6px 20px rgba(75, 140, 200, 0.5);
    animation: pulse-glow 2s ease-in-out infinite;
}

.btn-download-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(75, 140, 200, 0.7);
}

.btn-download-primary i {
    font-size: 1.5rem;
}

.btn-copy-large {
    padding: 0.875rem 1.5rem;
    background: rgba(75, 140, 200, 0.15);
    border: 2px solid rgba(75, 140, 200, 0.4);
    border-radius: 8px;
    color: #4B8CC8;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
}

.btn-copy-large:hover {
    background: rgba(75, 140, 200, 0.25);
    border-color: #4B8CC8;
    transform: translateY(-2px);
}

/* Mobile responsive for error display */
@media (max-width: 768px) {
    .error-user-message {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem;
    }

    .error-user-message i {
        font-size: 1.25rem;
    }

    .error-user-message p {
        font-size: 0.9375rem;
    }

    .support-buttons {
        flex-direction: column;
    }

    .btn-support,
    .btn-retry {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .error-hint-inline {
        font-size: 0.8125rem;
        padding: 0.75rem;
    }

    /* Mobile responsive for download button */
    .btn-download-primary {
        min-width: 100%;
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .btn-download-primary i {
        font-size: 1.25rem;
    }

    .btn-copy-large {
        width: 100%;
        padding: 0.75rem 1rem;
        font-size: 0.9375rem;
    }

    .license-actions {
        margin-top: 1.25rem;
    }
}

/* Favorites Page */
.favorites-page {
    padding: 2rem 0;
    padding-top: 120px; /* Fix navbar overlap (80px navbar + 40px spacing) */
    min-height: 100vh;
}

.empty-state-fullwidth {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}

/* Responsive adjustments for filters */
@media (max-width: 768px) {
    .favorites-page,
    .my-downloads-page {
        padding-top: 100px; /* Adjust for responsive navbar */
    }

    .page-header h1 {
        font-size: 2rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .page-header .subtitle {
        font-size: 1rem;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }

    .filter-group {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .filter-group label {
        width: auto;
        margin-bottom: 0;
    }

    .filter-buttons {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .search-group {
        max-width: none;
        width: 100%;
    }

    .resource-actions-detail {
        flex-direction: column;
    }

    .downloads-stats {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   RESPONSIVE FIXES: FAVORITES & MY-DOWNLOADS
   Small devices (480px)
   ======================================== */
@media (max-width: 480px) {
    .favorites-page,
    .my-downloads-page {
        padding-top: 90px;
    }

    .page-header h1 {
        font-size: 1.5rem;
    }

    .page-header .subtitle {
        font-size: 0.9375rem;
    }

    /* Stat cards */
    .stat-card {
        padding: 1rem;
        gap: 0.75rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .stat-info h3 {
        font-size: 1.5rem;
    }

    .stat-info p {
        font-size: 0.8125rem;
    }

    /* Filters bar */
    .filters-bar {
        gap: 1rem;
    }

    .filter-group {
        gap: 0.5rem;
    }

    .filter-buttons {
        gap: 0.375rem;
    }

    /* Filter buttons */
    .filter-btn {
        padding: 0.5rem 0.875rem;
        font-size: 0.8125rem;
    }

    .filter-group label {
        font-size: 0.8125rem;
    }

    .search-input {
        padding: 0.625rem 0.875rem;
        font-size: 0.875rem;
    }

    /* Downloads list */
    .downloads-list {
        gap: 1rem;
    }

    /* Download cards */
    .download-card {
        padding: 1rem;
    }

    .download-title {
        font-size: 1rem;
    }

    .download-title i {
        flex-shrink: 0;
    }

    .meta-badge {
        padding: 0.375rem 0.5rem;
        font-size: 0.75rem;
    }

    .btn-icon {
        width: 36px;
        height: 36px;
    }

    .btn-get-license {
        width: 100%;
        justify-content: center;
    }

    /* Resource cards */
    .resource-name a {
        font-size: 0.9375rem;
    }

    .resource-meta .meta-item {
        font-size: 0.75rem;
    }

    .resource-tags .tag-item {
        font-size: 0.6875rem;
    }

    /* Empty state */
    .empty-state,
    .empty-state-fullwidth {
        padding: 2.5rem 1.5rem;
    }

    /* Pagination */
    .pagination-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    .pagination-btn span {
        display: none; /* Hide text, show only icons */
    }

    .pagination-info {
        font-size: 0.8125rem;
    }
}

/* Very small screens (380px) */
@media (max-width: 380px) {
    .favorites-page,
    .my-downloads-page {
        padding-top: 85px;
    }

    .favorites-page .container,
    .my-downloads-page .container {
        padding: 0 0.75rem;
    }

    .page-header h1 {
        font-size: 1.25rem;
    }

    .page-header .subtitle {
        font-size: 0.875rem;
    }

    /* Stat cards */
    .stat-card {
        padding: 0.875rem;
    }

    .stat-icon {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
        border-radius: 8px;
    }

    .stat-info h3 {
        font-size: 1.25rem;
    }

    .stat-info p {
        font-size: 0.75rem;
    }

    /* Filters bar */
    .filters-bar {
        gap: 0.75rem;
    }

    .filter-group {
        gap: 0.375rem;
    }

    .filter-buttons {
        gap: 0.25rem;
    }

    /* Filter buttons */
    .filter-btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    .filter-group label {
        font-size: 0.75rem;
    }

    .search-input {
        padding: 0.5rem 0.75rem;
        font-size: 0.8125rem;
    }

    /* Downloads list */
    .downloads-list {
        gap: 0.75rem;
    }

    /* Download cards */
    .download-card {
        padding: 0.875rem;
        border-radius: 10px;
    }

    .download-title {
        font-size: 0.9375rem;
    }

    .download-title i {
        font-size: 0.9375rem;
    }

    .meta-badge {
        padding: 0.25rem 0.375rem;
        font-size: 0.6875rem;
    }

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

    .detail-label {
        font-size: 0.6875rem;
    }

    .license-key {
        font-size: 0.6875rem;
    }

    /* License key container */
    .license-key-container {
        flex-direction: column;
        gap: 0.5rem;
    }

    .btn-get-license {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem;
    }

    .license-key {
        font-size: 0.75rem;
        word-break: break-all;
    }

    /* Resource cards in grid */
    .resource-card {
        border-radius: 10px;
    }

    .resource-info {
        padding: 0.875rem;
    }
}

/* Smallest screens (320px) */
@media (max-width: 320px) {
    .favorites-page,
    .my-downloads-page {
        padding-top: 80px;
    }

    .favorites-page .container,
    .my-downloads-page .container {
        padding: 0 0.5rem;
    }

    .page-header h1 {
        font-size: 1.125rem;
    }

    .downloads-stats {
        gap: 0.75rem;
    }

    .stat-card {
        padding: 0.75rem;
        gap: 0.5rem;
    }

    .stat-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .stat-info h3 {
        font-size: 1.125rem;
    }

    /* Filters bar */
    .filters-bar {
        gap: 0.5rem;
    }

    .filter-group {
        gap: 0.25rem;
    }

    .filter-buttons {
        gap: 0.25rem;
    }

    .filter-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.6875rem;
    }

    .filter-group label {
        font-size: 0.6875rem;
    }

    .search-input {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    /* Downloads list */
    .downloads-list {
        gap: 0.5rem;
    }

    .download-card {
        padding: 0.75rem;
    }

    .download-title {
        font-size: 0.875rem;
        gap: 0.375rem;
    }

    .download-card-body {
        gap: 0.375rem;
    }

    .download-detail-row {
        gap: 0.25rem;
    }

    .btn-icon {
        width: 32px;
        height: 32px;
    }

    .download-actions {
        gap: 0.375rem;
    }

    .pagination-container {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* ============================================
   MINI-MODAL & QUICK ACCESS SECTIONS
   ============================================ */

/* Mini-Modal for Account Selection */
.mini-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.mini-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
}

.mini-modal-content {
    position: relative;
    background: var(--background-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    max-height: 70vh;
    overflow: auto;
    z-index: 1001;
}

.mini-modal-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mini-modal-header h3 {
    font-size: 1.125rem;
    margin: 0;
}

.mini-modal-body {
    padding: 1.5rem;
}

.mini-modal-body p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.account-list-mini {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.account-item-mini {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.account-item-mini:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
}

.account-item-mini input[type="radio"] {
    accent-color: var(--primary);
    cursor: pointer;
}

/* Get License Button */
.btn-get-license {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-get-license:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

.btn-get-license i {
    font-size: 1rem;
}

/* License Loading & Error States */
.license-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    color: var(--primary);
    font-size: 0.875rem;
}

.license-loading i {
    font-size: 1rem;
}

.license-error {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.3);
    border-radius: 6px;
    color: var(--danger);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.license-error i {
    font-size: 1rem;
}

/* Profile Page - Quick Access Grid */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

/* ===== MEDIUM TABLETS (max-width: 900px) ===== */
@media (max-width: 900px) {
    .resource-detail-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .resource-media {
        position: relative;
        top: 0;
    }

    .downloads-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-access-grid {
        grid-template-columns: 1fr;
    }
}

.quick-access-card {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.quick-access-card:hover {
    border-color: var(--border-accent);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-access-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.quick-access-header h3 {
    font-size: 1.125rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-primary);
}

.quick-access-header h3 i {
    font-size: 1.25rem;
    color: var(--primary);
}

.quick-access-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.quick-access-count {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin: 0;
}

.quick-access-count strong {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.quick-access-body .btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: var(--transition);
}

.quick-access-body .btn-secondary:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.quick-access-body .btn-secondary i {
    font-size: 0.875rem;
}

/* Profile Page Adjustments */
.profile-page {
    padding: 2rem 0;
    min-height: 100vh;
}

.profile-section {
    background: var(--surface-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.profile-section .section-header {
    margin-bottom: 1.5rem;
}

.profile-section .section-header h2 {
    font-size: 1.25rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .user-info-grid {
        grid-template-columns: 1fr;
    }
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.info-item label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.info-item p {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
}

.email-with-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.badge-warning {
    background: rgba(251, 191, 36, 0.1);
    color: var(--warning);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

/* ================================================
   EDUCATIONAL VIDEO SECTION
   ================================================ */

.educational-section {
    margin-top: 3rem;
    padding: 2rem;
    border-radius: 16px;    background: linear-gradient(135deg, rgba(75, 140, 200, 0.05) 0%, rgba(59, 130, 246, 0.08) 100%);    border: 1px solid rgba(75, 140, 200, 0.2);
}

.educational-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.educational-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-watch-tutorial {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);    transition: all 0.3s ease;
}

.btn-watch-tutorial:hover {
    background: linear-gradient(135deg, #059669, #10b981);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-watch-tutorial i {
    font-size: 1.25rem;
}

.btn-watch-tutorial .duration {
    font-size: 0.875rem;
    opacity: 0.9;
}

.educational-content {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .educational-section {
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .btn-watch-tutorial {
        font-size: 0.875rem;
    }
}

.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

.video-info h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 0.75rem 0;
}

.video-info p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .educational-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .educational-header h3 {
        font-size: 1.25rem;
    }

    .btn-watch-tutorial {
        width: 100%;
        justify-content: center;
    }
}


/* ========================================
   Strategy & Book Detail Page Styles
   (Moved from @push to main CSS for SPA compatibility)
   ======================================== */

/* Video Player Container */
.video-player-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.video-iframe, .video-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* No video placeholder inside video container (absolute positioning) */
.video-player-container .no-video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface-card);
    color: var(--text-secondary);
}

.video-player-container .no-video-placeholder i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Resource Title Section */
.resource-title-section {
    margin-bottom: 2rem;
}

.resource-title-section h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.resource-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.meta-badge i {
    font-size: 0.75rem;
}

/* Primary Full Width Button */
.btn-primary-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.btn-primary-full:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Sidebar Actions */
.sidebar-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.btn-favorite-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-favorite-action:hover {
    background: var(--surface-hover);
    border-color: var(--danger);
    color: var(--danger);
}

.btn-favorite-action.active {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.btn-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    width: 100%;
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
}

.btn-view-all:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    color: var(--primary);
}

/* Book Cover Container */
.book-cover-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
}

.book-cover-preview {
    position: relative;
    width: 280px;
    height: 350px;
    background: var(--surface-card);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.book-cover-preview svg {
    width: 100%;
    height: 100%;
}

.book-file-badge {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
}

.book-file-badge i {
    font-size: 1.25rem;
}

/* Download Card for Books */
.download-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
}

.download-card h3 {
    color: white;
}

.download-info {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.file-info-row, .file-size-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.file-info-row {
    margin-bottom: 0.5rem;
}

.file-info-row i, .file-size-row i {
    width: 20px;
    text-align: center;
}

.btn-download-large {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    background: white;
    color: var(--primary);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.btn-download-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-download-large i {
    font-size: 1.125rem;
}

.btn-download-action {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.625rem 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-download-action:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

/* ========================================
   Pagination Styles
   ======================================== */

.pagination-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 0;
    border-top: 1px solid var(--border);
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    min-width: 40px;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: var(--primary);
    color: var(--primary);
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-btn i {
    font-size: 0.75rem;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.pagination-info strong {
    color: var(--text-primary);
    font-weight: 600;
}

/* Responsive pagination */
@media (max-width: 768px) {
    .pagination {
        gap: 0.25rem;
    }

    .pagination-btn {
        padding: 0.375rem 0.75rem;
        font-size: 0.8125rem;
    }

    /* Hide text labels on mobile, show only icons */
    .pagination-btn:first-child span,
    .pagination-btn:nth-child(2) span,
    .pagination-btn:nth-last-child(2) span,
    .pagination-btn:last-child span {
        display: none;
    }
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Logo color variations */
.logo-img {
    transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Optional: Change logo color on hover */
.logo:hover .logo-img {
    opacity: 0.8;
}

/* For different themes (if needed) */
.theme-dark .logo-img {
    filter: brightness(1.2);
}

.theme-light .logo-img {
    filter: none;
}

/* Alternative: CSS filter approach for dynamic color change */
.logo-img.filter-blue {
    filter: brightness(0) saturate(100%) invert(46%) sepia(99%) saturate(1225%) hue-rotate(192deg) brightness(92%) contrast(91%);
}

.logo-img.filter-white {
    filter: brightness(0) invert(1);
}

.logo-img.filter-accent {
    filter: brightness(0) saturate(100%) invert(42%) sepia(93%) saturate(1352%) hue-rotate(192deg) brightness(95%) contrast(98%);
}

/* Hero Title Wave Effect - Simple Moving Gradient */
.hero-title {
    background: linear-gradient(90deg, #1e40af, #3b82f6, #bfdbfe, #3b82f6, #1e40af);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: moveGradient 5s linear infinite;
}

@keyframes moveGradient {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}


/* Title highlight line - use same animation as main title */
.title-line.highlight {
    background: linear-gradient(90deg, #1e40af, #3b82f6, #bfdbfe, #3b82f6, #1e40af);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: moveGradient 5s linear infinite;
}

/* Responsive adjustments for wave effect */
@media (max-width: 768px) {
    .hero-content {
        transform: translateY(-15%);
    }

    .hero-title {
        font-size: 2.5rem !important;
    }

    .title-line.highlight {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 480px) {
    .hero-content {
        transform: translateY(-15%);
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .title-line.highlight {
        font-size: 2rem !important;
    }
}

/* ===================================
   WAVY COLOR ANIMATION FOR TITLES
   =================================== */

/* Subtitle - Simple Moving Gradient (White) */
.title-line.subtitle {
    background: linear-gradient(90deg, #6b7280, #d1d5db, #ffffff, #d1d5db, #6b7280);
    background-size: 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: moveGradient 10s linear infinite;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .title-line.subtitle {
        font-size: 1.5rem !important;
    }

    /* Contact Section - Tablet */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info h3 {
        font-size: 1.5rem;
    }

    .contact-method {
        gap: 1rem;
        padding: 1.25rem;
    }

    .contact-method:hover {
        transform: none;
    }

    .method-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .method-info h4 {
        font-size: 1rem;
    }

    .contact-form-container {
        padding: 2rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .business-hours {
        padding: 1.25rem;
    }

    .business-hours h4 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .title-line.subtitle {
        font-size: 1.2rem !important;
    }

    /* Contact Section - Mobile */
    .contact-section .container {
        padding: 0 12px;
    }

    .contact-content {
        gap: 1.5rem;
    }

    .contact-info h3 {
        font-size: 1.25rem;
    }

    .contact-info > p {
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
    }

    .contact-method {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
        padding: 1rem;
    }

    .method-icon {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .method-info h4 {
        font-size: 0.95rem;
    }

    .method-info p {
        font-size: 0.85rem;
    }

    .contact-form-container {
        padding: 1rem;
        border-radius: 12px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.625rem 0.875rem;
        font-size: 0.9rem;
    }

    .form-group label {
        font-size: 0.85rem;
    }

    .form-group textarea {
        min-height: 100px;
    }

    .business-hours {
        padding: 1rem;
    }

    .business-hours h4 {
        font-size: 0.95rem;
    }

    .business-hours p {
        font-size: 0.85rem;
    }

    .btn-submit {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Contact Section - Extra Small Mobile (<400px) */
@media (max-width: 400px) {
    .contact-section .container {
        padding: 0 8px;
    }

    .contact-content {
        gap: 1rem;
    }

    .contact-info h3 {
        font-size: 1.1rem;
    }

    .contact-info > p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .contact-method {
        padding: 0.75rem;
        gap: 0.5rem;
        border-radius: 8px;
    }

    .method-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .method-info h4 {
        font-size: 0.85rem;
    }

    .method-info p {
        font-size: 0.75rem;
    }

    .contact-methods {
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .contact-form-container {
        padding: 0.75rem;
        border-radius: 8px;
    }

    .contact-form {
        gap: 0.75rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.5rem 0.625rem;
        font-size: 0.85rem;
        border-radius: 6px;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    .form-group textarea {
        min-height: 80px;
    }

    .business-hours {
        padding: 0.75rem;
        border-radius: 8px;
    }

    .business-hours h4 {
        font-size: 0.85rem;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .business-hours p {
        font-size: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .btn-submit {
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }
}

/* ====================================
   Algo Trading Solutions Section
   ==================================== */
.algo-solutions-section {
    padding: 5rem 0;
    background: var(--bg-dark, #0a0a0a);
    position: relative;
}

.algo-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.algo-category-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.algo-category-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-blue, #4b8cc8);
    box-shadow: 0 10px 30px rgba(75, 140, 200, 0.15);
    background: rgba(75, 140, 200, 0.08);
}

.algo-category-card .category-icon {
    width: 70px;
    height: 70px;
    min-width: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(75, 140, 200, 0.1);
    border-radius: 16px;
    font-size: 1.75rem;
    color: var(--primary-blue, #4b8cc8);
    transition: all 0.3s ease;
}

.algo-category-card:hover .category-icon {
    background: var(--primary-blue, #4b8cc8);
    color: #fff;
}

.algo-category-card .category-content {
    flex: 1;
}

.algo-category-card .category-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--white, #fff);
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.algo-category-card:hover .category-content h3 {
    color: var(--primary-blue, #4b8cc8);
}

.algo-category-card .category-content p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.5;
}

.algo-category-card .category-arrow {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    color: var(--primary-blue, #4b8cc8);
    transition: all 0.3s ease;
}

.algo-category-card:hover .category-arrow {
    background: var(--primary-blue, #4b8cc8);
    color: #fff;
    transform: translateX(5px);
}

/* Algo Trading Services Section */
.algo-services-section {
    padding: 5rem 0;
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.algo-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.algo-service-card {
    padding: 2.5rem 2rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.algo-service-card:hover {
    background: rgba(75, 140, 200, 0.08);
    border-color: rgba(75, 140, 200, 0.3);
    transform: translateY(-5px);
}

.algo-service-card .service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(75, 140, 200, 0.1);
    border-radius: 16px;
    font-size: 1.75rem;
    color: var(--primary-blue, #4b8cc8);
    transition: all 0.3s ease;
}

.algo-service-card:hover .service-icon {
    background: var(--primary-blue, #4b8cc8);
    color: #fff;
}

.algo-service-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--white, #fff);
    margin-bottom: 0.75rem;
}

.algo-service-card p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.6;
}

.section-cta {
    text-align: center;
    margin-top: 3rem;
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

/* Responsive - Algo Solutions */
@media (max-width: 992px) {
    .algo-categories-grid {
        grid-template-columns: 1fr;
    }

    .algo-services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .algo-solutions-section,
    .algo-services-section {
        padding: 3rem 0;
    }

    .algo-category-card {
        padding: 1.5rem;
        gap: 1rem;
    }

    .algo-category-card .category-icon {
        width: 55px;
        height: 55px;
        min-width: 55px;
        font-size: 1.4rem;
    }

    .algo-category-card .category-content h3 {
        font-size: 1.1rem;
    }

    .algo-category-card .category-content p {
        font-size: 0.85rem;
    }

    .algo-service-card {
        padding: 1.5rem;
    }

    .algo-service-card .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}
