﻿:root {
    /* Colors - Sunset Theme */
    --primary: #F97316;
    --primary-hover: #EA580C;
    --secondary: #E11D48;
    --secondary-hover: #BE123C;
    --dark-bg: #020617;
    --card-bg: #0F172A;
    --card-border: rgba(255, 255, 255, 0.1);
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glow: #FFD700;
    --success: #22C55E;
    --error: #EF4444;
    --primary-rgb: 249, 115, 22;

    /* Font Families - Dynamic switching */
    --font-main: 'Poppins', sans-serif;
    --font-heading: 'Poppins', sans-serif;

    /* Spacing & Layout */
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --container-width: 1200px;
    --header-height: 70px;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--dark-bg);
    margin: 0;
    overflow-x: hidden;
    position: relative;
    /* Needed for the grid overlay */
    color: var(--text-main);
    font-family: var(--font-main);
    font-weight: 400;
    transition: font-family 0.3s ease;
}

/* =========================================
   FONT AWESOME FOUC PREVENTION & ICON FIX
   Ensures icons display correctly across all fonts
   ========================================= */
.fas,
.far,
.fab,
.fa,
.fa-solid,
.fa-regular,
.fa-brands {
    display: inline-block;
    min-width: 1em;
    min-height: 1em;
    text-align: center;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto;
    -webkit-font-smoothing: antialiased;
    /* CRITICAL: Force Font Awesome font family to prevent checkmark/wrong icons */
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}

.far {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 400 !important;
}

.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
}

/* Prevent icon text from showing before FA loads */
.fas::before,
.far::before,
.fab::before,
.fa::before {
    display: inline-block;
    font-family: inherit;
}

/* Global font-weight adjustments - lighter text */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 400;
}

strong,
b {
    font-weight: 400;
}

/* =========================================
   GLOBAL LOADING UI (Shared across tools)
   - Download button loading spinner (.btn-loading)
   - Preview-area loading overlay (.imgcraft-preview-loading)
   ========================================= */

/* Download button loading (works for <a> and <button>) */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.25);
    border-top-color: var(--text-main);
    border-radius: 50%;
    animation: btn-spin 0.8s linear infinite;
}

@keyframes btn-spin {
    100% {
        transform: rotate(360deg);
    }
}

/* "Disabled" behavior for anchors */
.imgcraft-btn-disabled {
    pointer-events: none;
}

/* Preview-area loading overlay */
.imgcraft-preview-loading {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(2, 6, 23, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 999;
    border-radius: inherit;
    /* Ensure it stays visible even on mobile */
    min-height: 200px;
}

.imgcraft-busy .imgcraft-preview-loading {
    display: flex;
}

.imgcraft-preview-loading-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 24px 32px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.85);
    border: 1px solid var(--card-border);
    box-shadow: var(--glass-shadow), 0 0 20px rgba(249, 115, 22, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    /* Ensure minimum size for mobile */
    min-width: 200px;
    max-width: 90vw;
}

.imgcraft-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-right-color: var(--primary);
    border-radius: 50%;
    animation: imgcraft-spin 0.8s linear infinite;
}

@keyframes imgcraft-spin {
    100% {
        transform: rotate(360deg);
    }
}

.imgcraft-preview-loading-text {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    letter-spacing: 0.3px;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    .imgcraft-preview-loading {
        /* On mobile, ensure loader is always in viewport */
        position: fixed;
        inset: 0;
        z-index: 9999;
    }

    .imgcraft-preview-loading-inner {
        padding: 20px 28px;
        gap: 12px;
    }

    .imgcraft-spinner {
        width: 36px;
        height: 36px;
        border-width: 3px;
    }

    .imgcraft-preview-loading-text {
        font-size: 0.95rem;
    }
}

/* --- THE GRID OVERLAY (New Addition) --- */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    /* Let clicks pass through */
    z-index: -1;
    /* Sits just above the canvas */

    /* This creates the Grid Pattern */
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    /* Size of the grid squares */

    /* Optional: Makes the grid fade out at the bottom for a premium look */
    mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

/* --- BACKGROUND CANVAS (Critical for this to work) --- */
/* --- CANVAS (The Colors) --- */
#bg-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    /* Pushes colors BEHIND the grid */
}

/* Glassmorphism Utilities */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* Safari support */
    border-bottom: 1px solid var(--card-border);
    box-shadow: var(--glass-shadow);
}

.glass-panel {
    background: rgba(15, 23, 42, 0.7);
    /* Slightly darker for dropdowns */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* =========================================
   ENHANCED NAVBAR BASE STYLES
   ========================================= */
.navbar {
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.9));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Enhanced Logo */
/* Enhanced Logo */
.logo {
    text-decoration: none !important;
    border: none !important;
    outline: none !important;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s;
    user-select: none;
    position: relative;
}

.logo::after,
.logo::before {
    display: none !important;
    /* Remove any potential pseudo-elements causing lines */
    content: none !important;
}

.logo-text {
    font-size: 1.6rem;
    /* Bigger text */
    font-weight: 800;
    letter-spacing: -0.5px;
    /* Gradient Text with Fallback */
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), #FFD700);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(var(--primary-rgb), 0.3));
    display: block;
    /* Ensure visibility */
}

.logo-img {
    height: 44px;
    /* Bigger logo */
    width: 44px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo:hover .logo-img {
    transform: rotate(-10deg) scale(1.1);
}

.logo:hover .logo-text {
    filter: drop-shadow(0 4px 15px rgba(var(--primary-rgb), 0.6));
}

/* Enhanced Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    width: 100%;
    /* margin-left: 40px; */
    /* Space from Logo */
}

.nav-menu-center {
    display: flex;
    align-items: center;
    gap: 32px;
    /* More breathing room */
    margin: 0 auto;
    /* Pushes this group to the center */
}

.nav-menu-right {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: auto;
    /* Ensures it stays on the right */
}

/* Nav Item - Container for links and dropdowns */
.nav-item {
    position: relative;
    /* Required for dropdown positioning */
    display: flex;
    align-items: center;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-main);
    /* Brighter, more visible text */
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    /* For hover effects */
    display: inline-flex;
    /* Keeps arrow inline with text */
    align-items: center;
    /* Vertically centers arrow */
    gap: 4px;
    /* Space between text and arrow */
    white-space: nowrap;
    /* Prevents text wrapping */
}

/* Removed problematic ::before pseudo-element that caused unwanted underlines */

.nav-link:hover,
.nav-item:hover .nav-link {
    color: var(--primary);
    /* Orange highlight on hover */
    background: rgba(249, 115, 22, 0.1);
    /* Subtle orange glow */
    transform: translateY(-1px);
    /* Slight lift effect */
}

.nav-link i {
    font-size: 0.9em;
    opacity: 0.9;
    margin-right: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover i {
    opacity: 1;
    transform: scale(1.1);
}

/* Nav Dropdown Arrow - Force Font Awesome font */
.nav-arrow {
    font-size: 0.7em;
    margin-left: 0;
    /* Gap from parent handles spacing */
    transition: transform 0.3s ease, color 0.3s ease;
    opacity: 0.8;
    /* More visible */
    font-family: "Font Awesome 6 Free" !important;
    /* Ensure arrow icon displays correctly */
    font-weight: 900 !important;
    font-style: normal !important;
}

.nav-item:hover .nav-arrow {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--primary);
    /* Orange on hover */
}

/* Modern "Sign In" Button (Guest) */
.nav-login-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 8px 20px;
    border-radius: 50px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.nav-login-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(var(--primary-rgb), 0.3);
}

/* User Profile Avatar (Simplified wrapper) */
.user-link-profile {
    background: none !important;
}

.user-link-profile:hover {
    background: none !important;
}

/* =========================================
   ENHANCED PREMIUM NAV ITEM
   ========================================= */
.nav-item.premium-nav .nav-link {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), rgba(255, 140, 0, 0.06));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 18px;
    padding: 8px 20px;
    color: #ffd700 !important;
    text-shadow: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    font-weight: 700;
}

.nav-item.premium-nav .nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 140, 0, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 18px;
}

.nav-item.premium-nav .nav-link:hover::before {
    opacity: 1;
}

.nav-item.premium-nav .nav-link:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 140, 0, 0.08));
    box-shadow: 0 4px 10px rgba(255, 190, 0, 0.15);
    transform: translateY(-1px);
    border-color: rgba(255, 215, 0, 0.45);
}

.nav-item.premium-nav .nav-link i {
    color: #ffd700;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.5));
}

/* =========================================
   ENHANCED CREDIT BADGE
   ========================================= */
.credit-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.6));
    padding: 10px 24px;
    border-radius: 50px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 215, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.credit-badge::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.credit-badge i {
    color: #FFD700;
    font-size: 1.3rem;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
    animation: coin-glow 2s ease-in-out infinite;
}

@keyframes coin-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.6));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.8));
        transform: scale(1.1);
    }
}

@keyframes coin-spin-glow {

    0%,
    100% {
        transform: rotateY(0deg) scale(1.1);
    }

    50% {
        transform: rotateY(180deg) scale(1.15);
    }
}

/* =========================================
   STREAK BADGE STYLES
   ========================================= */
.streak-badge,
.streak-badge-mobile {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.6));
    padding: 10px 20px;
    border-radius: 50px;
    color: var(--text-main);
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid rgba(255, 140, 0, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 140, 0, 0.1);
    position: relative;
    cursor: pointer;
}

.streak-badge::before,
.streak-badge-mobile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.streak-badge:hover::before,
.streak-badge-mobile:hover::before {
    opacity: 1;
}

.streak-badge:hover,
.streak-badge-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 140, 0, 0.3),
        inset 0 1px 2px rgba(255, 140, 0, 0.2);
    border-color: rgba(255, 140, 0, 0.5);
}

.streak-flame {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 10px rgba(255, 140, 0, 0.8));
    animation: flame-glow 2s ease-in-out infinite;
}

@keyframes flame-glow {

    0%,
    100% {
        filter: drop-shadow(0 0 10px rgba(255, 140, 0, 0.8));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 15px rgba(255, 140, 0, 1));
        transform: scale(1.1);
    }
}

#streakCount,
#streakCountMobile {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Streak Popover */
.streak-popover {
    position: absolute;
    top: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    z-index: 10000;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.95));
    border: 1px solid rgba(255, 140, 0, 0.3);
    border-radius: 12px;
    padding: 16px;
    min-width: 220px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Show popover on badge hover OR when hovering the popover itself */
.streak-badge:hover .streak-popover,
.streak-popover:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* Bridge element to prevent gap issue */
.streak-popover::after {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    right: 0;
    height: 15px;
    background: transparent;
}

.streak-popover::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid rgba(255, 140, 0, 0.3);
}

.streak-popover-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popover-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popover-row:last-of-type {
    border-bottom: none;
}

.popover-footer {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 8px;
    font-style: italic;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.notif-toggle-btn {
    background: rgba(255, 140, 0, 0.2);
    border: 1px solid rgba(255, 140, 0, 0.4);
    color: #ff8c00;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.notif-toggle-btn:hover {
    background: rgba(255, 140, 0, 0.4);
    transform: scale(1.05);
}

.notif-toggle-btn.enabled {
    background: rgba(34, 197, 94, 0.2);
    border-color: rgba(34, 197, 94, 0.4);
    color: #22c55e;
}

/* Mobile Streak Badge */
.streak-badge-mobile {
    padding: 6px 10px;
    font-size: 0.8rem;
    gap: 6px;
    border-radius: 20px;
    min-width: auto;
}

.streak-badge-mobile .streak-flame {
    font-size: 0.9rem;
}

/* Streak Update Animation */
.streak-badge.streak-updating,
.streak-badge-mobile.streak-updating {
    animation: streak-pulse 0.6s ease-out;
}

@keyframes streak-pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
    }

    50% {
        transform: scale(1.15);
        box-shadow: 0 0 30px rgba(255, 140, 0, 0.8), 0 0 60px rgba(255, 140, 0, 0.4);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
    }
}

.pulse-animation {
    animation: flame-pulse 0.5s ease-in-out 2;
}

@keyframes flame-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
        filter: drop-shadow(0 0 15px rgba(255, 140, 0, 1));
    }
}

.user-credits {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* =========================================
   ENHANCED USER AVATAR & DROPDOWN
   ========================================= */
.user-avatar {
    /* Shape & Size */
    width: 44px;
    height: 44px;
    border-radius: 50%;

    /* Perfect Centering Fix */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    /* Force zero padding */

    /* Icon Size - 1.5rem is the "Golden Ratio" for a 44px button */
    font-size: 1.6rem;
    color: #ffffff;

    /* Visuals */
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 10;
}

/* The Icon */
.user-avatar i {
    z-index: 2;
    /* Removed drop-shadow on the icon itself to keep it crisp */
    transition: transform 0.3s ease;

}

/* Hover State - "Lift and Shine" */
.user-avatar:hover {
    transform: translateY(-2px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
    /* Border gets brighter */

    box-shadow:
        0 8px 25px rgba(249, 115, 22, 0.5),
        /* Glow gets stronger */
        0 15px 30px -5px rgba(0, 0, 0, 0.5);
    /* Shadow gets deeper */
}

.user-avatar:hover i {
    transform: scale(1.1);
}

/* Active/Click State */
.user-avatar:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

/* OPTIONAL: Pulse animation if you want to draw attention */
@keyframes softPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(249, 115, 22, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0);
    }
}


.user-info-header {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    margin-bottom: 8px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), transparent);
}

.user-name-display {
    font-weight: 700;
    color: var(--text-main);
    font-size: 1rem;
    margin-bottom: 4px;
}

.user-email-display {
    font-size: 0.85rem;
    color: var(--text-muted);
    opacity: 0.9;
}



/* Badge Enhancements */
.badge-pro {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    font-size: 0.65rem;
    padding: 3px 8px;
    border-radius: 6px;
    font-weight: 900;
    margin-left: 8px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 8px rgba(255, 215, 0, 0.4);
    animation: badge-bounce 2s ease-in-out infinite;
}

@keyframes badge-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}


/* =========================================
   ENHANCED DROPDOWN MENU STYLES
   ========================================= */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    transform: translateY(20px);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.95));
    min-width: 240px;
    padding: 12px;
    border-radius: 16px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1001;
}

/* Dropdown Arrow/Triangle */
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 24px;
    transform: none;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid rgba(15, 23, 42, 0.98);
    filter: drop-shadow(0 -2px 4px rgba(0, 0, 0, 0.2));
}

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

/* Neutralize conflicting dropdown animations from pwa.css */
.dropdown-menu,
.dropdown-menu.show,
.dropdown-menu.hide {
    animation: none !important;
}

/* Dropdown Items - Enhanced */
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

/* Hover Effect Background */
.dropdown-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 38%;
    background: linear-gradient(90deg, rgba(var(--primary-rgb), 0.10), rgba(var(--primary-rgb), 0.02));
    opacity: 0;
    transition: opacity 0.25s, width 0.25s;
    border-radius: 10px 0 0 10px;
}

.dropdown-item:hover::before {
    opacity: 1;
    width: 100%;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.08));
    color: var(--text-main);
    transform: translateX(6px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dropdown-item i {
    width: 22px;
    height: 22px;
    text-align: center;
    color: var(--primary);
    font-size: 1.1rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-item:hover i {
    transform: scale(1.15) rotate(5deg);
    color: var(--primary-hover);
    filter: drop-shadow(0 2px 6px rgba(var(--primary-rgb), 0.4));
}

/* Premium Dropdown Item */
.dropdown-item.premium-item {
    border-left: 2px solid #ffd700;
    background: transparent;
    padding-left: 16px;
    position: relative;
}

.dropdown-item.premium-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, #ffd700, #ff8c00);
    transition: height 0.3s;
}


.dropdown-item.premium-item:hover {
    background: rgba(255, 215, 0, 0.04);
    transform: translateX(4px);
    box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.15) inset;
}

.dropdown-item.premium-item i {
    color: #ffd700;
}

.dropdown-item.premium-item:hover i {
    color: #ffed4e;
}

@keyframes sparkle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

@keyframes sparkle-fast {

    0%,
    100% {
        opacity: 1;
        transform: scale(1.15) rotate(5deg);
    }

    50% {
        opacity: 0.8;
        transform: scale(1.25) rotate(-5deg);
    }
}

/* Dropdown Right Aligned (for user menu) */
.dropdown-right {
    left: auto;
    right: 0;
    transform: translateY(20px);
}

.dropdown-right::before {
    left: auto;
    right: 20px;
    transform: none;
}

.nav-item:hover .dropdown-right {
    transform: translateY(0);
}

/* =========================================
   ENHANCED FORM SELECT DROPDOWNS
   ========================================= */
select,
.form-select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid var(--card-border);
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath fill='%23F97316' d='M7 8L0 0h14z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

select:hover,
.form-select:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
    border-color: rgba(var(--primary-rgb), 0.4);
    transform: translateY(-2px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.2);
}

select:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    box-shadow: 0 0 0 4px rgba(var(--primary-rgb), 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='8' viewBox='0 0 14 8'%3E%3Cpath fill='%23EA580C' d='M7 8L0 0h14z'/%3E%3C/svg%3E");
}

/* Select Options Styling */
select option,
.form-select option {
    background: #1a1a1a;
    color: var(--text-main);
    padding: 12px;
    border-radius: 6px;
    font-weight: 500;
}

select option:hover,
.form-select option:hover {
    background: rgba(var(--primary-rgb), 0.2);
    color: white;
}

select option:checked,
.form-select option:checked {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    font-weight: 600;
}

/* =========================================
   6. MOBILE & RESPONSIVE
   ========================================= */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.mobile-menu-btn:hover {
    color: var(--primary);
}

/* Hide mobile-only elements on desktop */
.mobile-top-actions {
    display: none;
}

/* Auth States - Default visibility (JavaScript will override) */
.auth-guest {
    display: flex;
}

.auth-user {
    display: none;
}

/* Modern account icon button (replaces login button) - Professional Glass Style */
.account-icon-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    color: var(--text-main);
    font-size: 1.5rem;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none !important;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.account-icon-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 50%;
}

.account-icon-btn:hover::before {
    opacity: 1;
}

.account-icon-btn:hover,
.account-icon-btn:focus,
.account-icon-btn:active {
    text-decoration: none !important;
    outline: none;
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, 0.4);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

.account-icon-btn i {
    margin: 0;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

/* Desktop: show only desktop auth */
@media (min-width: 769px) {
    .mobile-top-actions {
        display: none !important;
    }

    .desktop-only {
        display: flex;
    }
}


.credit-badge:hover::before {
    opacity: 1;
}

.credit-badge:hover {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.25), rgba(249, 115, 22, 0.15));
    border-color: var(--primary);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(249, 115, 22, 0.3),
        0 0 20px rgba(255, 215, 0, 0.2),
        inset 0 1px 2px rgba(255, 215, 0, 0.2);
}

/* Hero Section */
.hero {
    padding: 120px 0 60px;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 40px;
}

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

.search-input {
    width: 100%;
    padding: 16px 24px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: rgba(255, 255, 255, 0.1);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    padding: 40px 0 80px;
}

.tool-card {
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
}

.tool-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 8px;
}

.tool-name {
    font-size: 1.25rem;
    font-weight: 600;
}

.tool-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
}

.tool-btn {
    margin-top: auto;
    padding: 10px 20px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    text-align: center;
    font-weight: 500;
    transition: all 0.2s;
}

.tool-card:hover .tool-btn {
    background: var(--primary);
}

/* Tool Page Layout */
.tool-layout {
    padding-top: 100px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    min-height: calc(100vh - 100px);
}

.tool-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.tool-main {
    min-height: calc(100vh - 130px);
    display: flex;
    flex-direction: column;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    gap: 8px;
}

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

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-full {
    width: 100%;
}

/* =========================================
   UNIFIED TOAST NOTIFICATION SYSTEM
   ========================================= */
#toast-container {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 420px;
    width: calc(100% - 48px);
    pointer-events: none;
    /* Let clicks pass through if empty */
}

/* Individual Toast */
.toast {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    color: var(--text-main);
    padding: 20px 24px;
    border-radius: var(--radius-lg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    display: flex;
    align-items: flex-start;
    gap: 16px;
    min-width: 320px;
    transform: translateX(calc(100% + 50px));
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
    pointer-events: auto;
    /* Re-enable pointer events for the toast itself */
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

/* Toast Icon */
.toast-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.3rem;
    animation: iconPulse 2s ease-in-out infinite;
}

/* Content */
.toast-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.toast-title {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Close Button */
.toast-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--text-main);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s;
    font-size: 1.1rem;
}

.toast-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

/* Toast Type Variants */
.toast-success {
    border-left-color: var(--success);
}

.toast-success .toast-icon {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.toast-error {
    border-left-color: var(--error);
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

.toast-warning {
    border-left-color: #F59E0B;
}

.toast-warning .toast-icon {
    background: rgba(245, 158, 11, 0.15);
    color: #F59E0B;
}

.toast-info {
    border-left-color: #3B82F6;
}

.toast-info .toast-icon {
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
}

/* Progress Bar */
.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    width: 100%;
    transform-origin: left;
    animation: toastProgress 4s linear forwards;
}

@keyframes toastProgress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}


/* Tool Card Badges & Locking */
.tool-card {
    position: relative;
    overflow: hidden;
}

.tool-cost-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.6);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #ffd700;
    z-index: 2;
}

.free-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #2ecc71;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 2;
}

.tool-card.locked {
    filter: grayscale(0.8);
}

.lock-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    backdrop-filter: blur(3px);
    z-index: 10;
    transition: all 0.3s ease;
}

.lock-overlay i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

.lock-overlay:hover {
    background: rgba(0, 0, 0, 0.7);
}

.lock-overlay:hover i {
    transform: scale(1.1);
    color: white;
}


/* Mobile Responsive */

@media (max-width: 768px) {
    #toast-container {
        top: 80px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }

    .toast {
        min-width: auto;
        padding: 16px 20px;
    }

    .toast-title {
        font-size: 1rem;
    }

    .toast-message {
        font-size: 0.85rem;
    }

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

    .tool-layout {
        grid-template-columns: 1fr;
        gap: 20px;
        padding-top: 80px;
    }

    .tool-sidebar {
        position: relative;
        top: 0;
        width: 100%;
        z-index: 10;
    }

    .tool-main {
        min-height: 400px;
    }

    /* Mobile Navbar styles moved to end of file (Consolidated) */
}

/* =========================================
   UTILITY CLASSES
   ========================================= */

/* Padding */
.p-8 {
    padding: 2rem;
}

/* Border Radius */
.rounded-lg {
    border-radius: var(--radius-lg);
}

/* Text Sizes */
.text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

/* Font Weights */
.font-bold {
    font-weight: 700;
}

/* Text Alignment */
.text-center {
    text-align: center;
}

/* Text Colors */
.text-primary {
    color: var(--primary);
}

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

/* Margins */
.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

/* Animation Delays */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

/* =========================================
   PREMIUM TOOL CARD STYLING
   ========================================= */
.tool-card.premium-card {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 215, 0, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.4);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2), 0 0 15px rgba(255, 215, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.tool-card.premium-card:hover {
    border-color: #ffd700;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3), 0 0 25px rgba(255, 215, 0, 0.2);
    transform: translateY(-5px) scale(1.02);
}

.tool-card.premium-card .tool-icon {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
}

.premium-ribbon {
    position: absolute;
    top: 12px;
    right: -30px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #000;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 5px 30px;
    transform: rotate(45deg);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================================
   FEATURES SECTION - "Why Professionals Choose ImgCraft"
   ========================================= */

/* Grid Layout for Features */
.grid-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 30px;
}

/* Individual Feature Item */
.feature-item {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    padding: 30px 24px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Hover Effect */
.feature-item::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: var(--radius-md);
}

.feature-item:hover::before {
    opacity: 1;
}

.feature-item:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 12px 40px rgba(var(--primary-rgb), 0.2);
}

/* Feature Icon */
.feature-item i {
    display: inline-block;
    width: 60px;
    height: 60px;
    line-height: 60px;
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.2), rgba(var(--primary-rgb), 0.1));
    border-radius: 50%;
    font-size: 1.5rem !important;
    margin-bottom: 16px !important;
    transition: all 0.3s;
}

.feature-item:hover i {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white !important;
    box-shadow: 0 8px 20px rgba(var(--primary-rgb), 0.4);
}

/* Feature Title */
.feature-item h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 8px !important;
    font-weight: 700;
}

/* Feature Description */
.feature-item p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Utility Classes for Features Section */
.mt-12 {
    margin-top: 80px;
}

.mb-8 {
    margin-bottom: 60px;
}

.animate-fade-up {
    animation: fadeInUp 0.6s ease-out;
}

.delay-300 {
    animation-delay: 0.3s;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   RESPONSIVE BREAKPOINTS FOR FEATURES
   ========================================= */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .grid-features {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .feature-item {
        padding: 24px 20px;
    }

    .mt-12 {
        margin-top: 60px;
    }

    .mb-8 {
        margin-bottom: 40px;
    }
}

/* Tablet Portrait (768px and below) */
@media (max-width: 768px) {
    .grid-features {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }

    .feature-item {
        padding: 28px 24px;
        max-width: 500px;
        margin: 0 auto;
        width: 100%;
    }

    .feature-item i {
        width: 56px;
        height: 56px;
        line-height: 56px;
        font-size: 1.4rem !important;
    }

    .feature-item h3 {
        font-size: 1.05rem;
    }

    .mt-12 {
        margin-top: 48px;
    }

    .mb-8 {
        margin-bottom: 32px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .grid-features {
        gap: 16px;
    }

    .feature-item {
        padding: 24px 20px;
    }

    .feature-item i {
        width: 52px;
        height: 52px;
        line-height: 52px;
        font-size: 1.3rem !important;
        margin-bottom: 12px !important;
    }

    .feature-item h3 {
        font-size: 1rem;
        margin-bottom: 6px !important;
    }

    .feature-item p {
        font-size: 0.85rem;
    }

    .mt-12 {
        margin-top: 40px;
    }

    .mb-8 {
        margin-bottom: 24px;
    }

    /* Adjust section heading */
    .glass-panel h2 {
        font-size: 1.4rem;
        margin-bottom: 16px;
    }
}

/* Small Mobile (375px and below) */
@media (max-width: 375px) {
    .grid-features {
        gap: 14px;
    }

    .feature-item {
        padding: 20px 16px;
    }

    .feature-item i {
        width: 48px;
        height: 48px;
        line-height: 48px;
        font-size: 1.2rem !important;
        margin-bottom: 10px !important;
    }

    .feature-item h3 {
        font-size: 0.95rem;
        margin-bottom: 6px !important;
    }

    .feature-item p {
        font-size: 0.8rem;
        line-height: 1.5;
    }

    .mt-12 {
        margin-top: 32px;
    }

    .mb-8 {
        margin-bottom: 20px;
    }

    .glass-panel {
        padding: 24px 16px !important;
    }

    .glass-panel h2 {
        font-size: 1.25rem;
        margin-bottom: 12px;
    }
}

/* =========================================
   CUSTOM SCROLLBAR & PROGRESS INDICATOR
   ========================================= */

/* Scroll Progress Indicator */
#scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
    background: transparent;
    pointer-events: none;
}

#scroll-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--glow));
    background-size: 200% 100%;
    animation: gradient-move 2s linear infinite;
    box-shadow: 0 0 10px rgba(var(--primary-rgb), 0.7);
    transition: width 0.1s ease-out;
}

@keyframes gradient-move {
    0% {
        background-position: 100% 0;
    }

    100% {
        background-position: -100% 0;
    }
}

/* WebKit Scrollbar Customization (Global) */
::-webkit-scrollbar,
*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, 0.5);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: content-box;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
    background: rgba(249, 115, 22, 0.9);
    box-shadow: 0 0 8px rgba(249, 115, 22, 0.5);
    background-clip: border-box;
    border: none;
}

::-webkit-scrollbar-thumb:active,
*::-webkit-scrollbar-thumb:active {
    background: var(--primary);
    box-shadow: 0 0 12px rgba(249, 115, 22, 0.7);
}

::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
    background: transparent;
}

/* Firefox Scrollbar Support */
html,
body,
* {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) var(--card-bg);
}

/* =========================================
   INTERNAL LINK STYLES - SEO & UX
   ========================================= */
.internal-link,
a.internal-link {
    color: var(--primary);
    text-decoration: none;
    position: relative;
    transition: color 0.3s ease;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
}

.internal-link:hover,
a.internal-link:hover {
    color: var(--primary-hover);
    border-bottom-color: var(--primary);
}

.internal-link:focus,
a.internal-link:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 2px;
}

/* Inline content links (within paragraphs) */
p .internal-link,
.tool-desc .internal-link,
.footer-tagline .internal-link {
    font-weight: 500;
    border-bottom: 1px dotted rgba(249, 115, 22, 0.4);
}

p .internal-link:hover,
.tool-desc .internal-link:hover,
.footer-tagline .internal-link:hover {
    border-bottom-style: solid;
    border-bottom-color: var(--primary);
}

/* Related tools section */
.related-tools {
    margin-top: 2rem;
    padding: 1.5rem;
    background: rgba(249, 115, 22, 0.05);
    border-left: 3px solid var(--primary);
    border-radius: 8px;
}

.related-tools h3 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.related-tools-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.related-tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(249, 115, 22, 0.1);
    border: 1px solid rgba(249, 115, 22, 0.2);
    border-radius: 20px;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.related-tool-link:hover {
    background: rgba(249, 115, 22, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2);
}

.related-tool-link i {
    font-size: 0.875rem;
    color: var(--primary);
}

/* =========================================
   MOBILE CREDIT & STREAK BADGES
   ========================================= */

/* Mobile Credit Badge - Compact Version */
.credit-badge-mobile {
    display: flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.6));
    padding: 6px 12px;
    border-radius: 20px;
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 215, 0, 0.1);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    min-width: fit-content;
}

.credit-badge-mobile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.credit-badge-mobile:active::before {
    opacity: 1;
}

.credit-badge-mobile i {
    color: #FFD700;
    font-size: 1rem;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.6));
    flex-shrink: 0;
}

.credit-badge-mobile span {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    display: inline-block;
    min-width: fit-content;
}

/* User Avatar Mobile - Professional Style */
.user-avatar-mobile {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    /* background: linear-gradient(135deg, var(--primary), var(--secondary)); */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.user-avatar-mobile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 50%;
}

.user-avatar-mobile:active::before {
    opacity: 1;
}

.user-avatar-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3),
        inset 0 1px 2px rgba(255, 255, 255, 0.25);
}

/* Account Icon Button Mobile - Professional Glass Style */
.account-icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--text-main);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.account-icon-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    border-radius: 50%;
}

.account-icon-btn:active::before {
    opacity: 1;
}

.account-icon-btn i {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
}

.account-icon-btn:hover,
.account-icon-btn:active {
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, 0.4);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.2),
        inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

.user-avatar-mobile:hover {
    transform: scale(1.1);
}

/* =========================================
   MOBILE HEADER & MENU IMPROVEMENTS
   ========================================= */

/* Mobile Menu Button - Base Style (Hidden on Desktop) */
.mobile-menu-btn {
    display: none;
    /* Hidden by default on desktop */
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 8px;
    z-index: 1002;
    transition: color 0.3s ease;
    width: 44px;
    /* Ensure touch target size */
    height: 44px;
    display: flex;
    /* Flex but hidden via media query on desktop usually, but let's force toggle */
    align-items: center;
    justify-content: center;
}

/* Force hide on Desktop (overriding display: flex above if needed, though media query is safer) */
@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }
}

/* Mobile Styling */
@media (max-width: 768px) {

    /* Navbar Layout */
    .nav-content {
        justify-content: space-between;
        padding: 0 16px;
        /* gap: 10px; */
    }

    /* Logo Adjustments */
    .logo-text {
        display: none;
        /* Hide text on mobile */
    }

    .logo-img {
        width: 56px !important;
        /* Super sized on mobile */
        height: 56px !important;
        border-radius: 12px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    }

    /* Show Hamburger Menu */
    .mobile-menu-btn {
        display: flex !important;
    }

    /* Mobile Top Actions (Credits/User) - Ensure they fit */
    .mobile-top-actions {
        display: flex;
        /* Ensure it's visible */
        align-items: center;
        gap: 12px;
        margin-left: auto;
        /* Push to right, next to hamburger */
        margin-right: 8px;
        /* Space before hamburger */
    }

    /* Mobile Menu Drawer */
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        width: 100vw;
        max-width: 100vw;
        height: calc(100vh - var(--header-height));
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        /* flex-direction: column; */
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        padding-left: 0;
        padding-right: 0;
        padding-bottom: 2rem;
        gap: 1.5rem;
        transform: translateX(100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex !important;
        opacity: 0;
        pointer-events: none;
        /* Prevent clicks when hidden */
        z-index: 1001;
        overflow-y: auto;
        overflow-x: hidden;
        /* Prevent horizontal scroll */
        box-sizing: border-box;
    }

    /* Menu Sections in Drawer */
    .nav-menu-center,
    .nav-menu-right {
        display: flex !important;
        flex-direction: column;
        align-items: center;
        width: 100%;
        max-width: 100%;
        gap: 1.5rem;
        margin: 0;
        padding: 0;
    }

    .nav-links.active {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    /* Nav Items in Drawer */
    .nav-item {
        position: relative;
        width: 100%;
        max-width: 100%;
        text-align: center;
        opacity: 0;
        transform: translateY(10px);
        transition: all 0.3s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        overflow: visible;
    }

    .nav-links.active .nav-item {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger animations */
    .nav-links.active .nav-item:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-links.active .nav-item:nth-child(2) {
        transition-delay: 0.2s;
    }

    .nav-links.active .nav-item:nth-child(3) {
        transition-delay: 0.3s;
    }

    .nav-links.active .nav-item:nth-child(4) {
        transition-delay: 0.4s;
    }

    .nav-link {
        font-size: 1.25rem;
        padding: 14px 20px;
        justify-content: center;
        width: 85%;
        max-width: 400px;
        margin: 0 auto;
        display: flex;
        align-items: center;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.03);
        transition: all 0.2s ease;
    }

    /* Dropdowns in Mobile - Override ALL desktop positioning */
    .dropdown-menu {
        position: static !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        bottom: auto !important;
        background: rgba(255, 255, 255, 0.05);
        border: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 8px;
        margin: 8px auto 0 auto;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: none;
        /* Toggled by JS */
        flex-direction: column;
        align-items: stretch;
        border-radius: 12px;
        width: 85%;
        max-width: 400px;
        min-width: auto;
        gap: 4px;
        overflow: hidden;
        z-index: auto;
    }

    .dropdown-menu::before {
        display: none !important;
        /* Hide the arrow on mobile */
    }

    .dropdown-item {
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 14px 16px;
        width: 100%;
        font-size: 1.05rem;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.02);
        transition: all 0.2s ease;
        border: none;
        gap: 8px;
    }

    .dropdown-item:hover,
    .dropdown-item:active {
        background: rgba(249, 115, 22, 0.15);
        transform: none;
    }

    /* Reset premium item borders in mobile */
    .dropdown-item.premium-item {
        border-left: none;
        padding-left: 14px;
    }

    /* Reset icon effects in mobile */
    .dropdown-item i {
        width: auto;
        height: auto;
        margin: 0;
    }

    .dropdown-item:hover i,
    .dropdown-item:active i {
        transform: none;
        filter: none;
    }

    .nav-link:hover,
    .nav-link:active {
        background: rgba(249, 115, 22, 0.1);
        transform: translateY(0);
    }

    /* Ensure dropdown arrows are visible and functional on mobile */
    .nav-arrow {
        margin-left: 6px;
        font-size: 0.8em;
    }

    /* Make dropdown parent items more obvious */
    .nav-item.dropdown>.nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    /* Hide desktop-specific elements on mobile */
    .desktop-only {
        display: none !important;
    }
}

/* =========================================
   WEB-READY SCORE COMPONENT
   ========================================= */

/* Score Row Container */
.web-ready-score-row {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(var(--primary-rgb), 0.03));
    border-left: 3px solid var(--primary);
    padding: 16px;
    margin-top: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.web-ready-score-row:hover {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.12), rgba(var(--primary-rgb), 0.05));
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.2);
}

/* Score Display Layout */
.score-display {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

/* SVG Circular Progress Ring */
.score-ring {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

/* Score Value and Label */
.score-value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    margin-top: 4px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.web-ready-score-row .file-info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

/* Optimization Tips */
.score-tips {
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-muted);
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.score-tips div {
    padding: 4px 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* Responsive Mobile Styles */
@media (max-width: 768px) {
    .web-ready-score-row {
        padding: 12px;
        margin-top: 12px;
    }

    .score-display {
        gap: 12px;
    }

    .score-ring {
        width: 50px;
        height: 50px;
    }

    .score-value {
        font-size: 1.5rem;
    }

    .score-tips {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .web-ready-score-row {
        padding: 10px;
    }

    .score-ring {
        width: 45px;
        height: 45px;
    }

    .score-value {
        font-size: 1.3rem;
    }
}