/* ========================================
   FORGE - Shared Styles
   ========================================
   Toast notifications, loading states,
   auth nav, footer email, modal utility
   ======================================== */

/* ---- Skip to Content Link ---- */
.skip-to-content {
    position: fixed;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #00ff88;
    color: #000;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 0.5rem 0.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    text-decoration: none;
    z-index: 10001;
    transition: top 0.2s ease;
}

.skip-to-content:focus {
    top: 0;
    outline: none;
}

/* ---- Visually Hidden (Screen Reader Only) ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Toast Notifications ---- */
.hardhat-toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.hardhat-toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    background: #1a1a1a;
    border: 1px solid #333;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

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

.hardhat-toast-hide {
    opacity: 0;
    transform: translateX(100%);
}

.hardhat-toast-icon {
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hardhat-toast-success .hardhat-toast-icon {
    background: rgba(0, 255, 136, 0.15);
    color: #00ff88;
}

.hardhat-toast-error .hardhat-toast-icon {
    background: rgba(255, 61, 113, 0.15);
    color: #ff3d71;
}

.hardhat-toast-info .hardhat-toast-icon {
    background: rgba(0, 136, 255, 0.15);
    color: #0088ff;
}

.hardhat-toast-warning .hardhat-toast-icon {
    background: rgba(255, 200, 0, 0.15);
    color: #ffc800;
}

.hardhat-toast-message {
    flex: 1;
    line-height: 1.4;
}

/* ---- Loading Overlay ---- */
.hardhat-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.85);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.hardhat-loading-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #222;
    border-top-color: #00ff88;
    border-radius: 50%;
    animation: forgeSpin 0.8s linear infinite;
}

@keyframes forgeSpin {
    to { transform: rotate(360deg); }
}

.hardhat-loading-text {
    color: #888;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    text-transform: lowercase;
}

/* ---- Navigation (Shared across all pages) ---- */
.nav {
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border, #1a1a1a);
    z-index: 1000;
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    cursor: pointer;
}

a.logo-container {
    text-decoration: none;
}

.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary, #00ff88);
    text-transform: lowercase;
    letter-spacing: -0.03em;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.9), 0 0 40px rgba(0, 255, 136, 0.6), 0 0 80px rgba(0, 255, 136, 0.3);
    animation: logoPulse 4s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes logoPulse {
    0%, 100% {
        text-shadow:
            0 0 6px rgba(0, 255, 136, 0.8),
            0 0 20px rgba(0, 255, 136, 0.6),
            0 0 45px rgba(0, 255, 136, 0.3),
            0 0 90px rgba(0, 255, 136, 0.12);
    }
    50% {
        text-shadow:
            0 0 6px rgba(0, 255, 136, 0.8),
            0 0 15px rgba(0, 255, 136, 0.25),
            0 0 30px rgba(0, 255, 136, 0.08);
    }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: var(--text-secondary, #e0e0e0);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: lowercase;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary, #00ff88);
}

/* ---- Nav CTA Button ---- */
.btn-nav {
    background: transparent;
    border: 1px solid #222;
    color: #e0e0e0;
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    text-transform: lowercase;
}

.btn-nav:hover {
    border-color: #00ff88;
    color: #00ff88;
    background: rgba(0, 255, 136, 0.1);
}

/* ---- Nav Auth Button ---- */
.hardhat-nav-auth {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.hardhat-nav-login-btn {
    background: transparent;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.hardhat-nav-login-btn:hover {
    border-color: #00ff88;
    color: #00ff88;
}

.hardhat-nav-user {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #e0e0e0;
    transition: color 0.2s;
}

.hardhat-nav-user:hover {
    color: #00ff88;
}

.hardhat-nav-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid #00ff88;
    color: #00ff88;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.hardhat-nav-name {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ---- Footer (Shared across all pages) ---- */
.footer {
    border-top: 1px solid var(--border, #1a1a1a);
    padding: 4rem 3rem 2rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.footer-left {
    flex: 1;
}

.footer-logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--primary, #00ff88);
    text-transform: lowercase;
    letter-spacing: -0.03em;
    text-shadow:
        0 0 15px rgba(0, 255, 136, 0.8),
        0 0 30px rgba(0, 255, 136, 0.6),
        0 0 60px rgba(0, 255, 136, 0.4);
}

.footer-tagline {
    font-size: 0.9375rem;
    color: var(--text-tertiary, #b8b8b8);
    margin-top: 0.75rem;
    text-transform: lowercase;
}

.footer-right {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-right a {
    color: var(--text-secondary, #e0e0e0);
    text-decoration: none;
    font-size: 0.9375rem;
    text-transform: lowercase;
    transition: color 0.2s;
}

.footer-right a:hover {
    color: var(--primary, #00ff88);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border, #1a1a1a);
    color: var(--text-tertiary, #b8b8b8);
    font-size: 0.875rem;
    text-transform: lowercase;
}

.footer-bottom a {
    color: #777;
    text-decoration: none;
    font-size: 0.75rem;
    transition: color 0.2s;
}

.footer-bottom a:hover {
    color: var(--primary, #00ff88);
}

/* ---- Footer Email Capture ---- */
.hardhat-footer-email {
    padding: 2rem 2rem 1.5rem;
    border-top: 1px solid #1a1a1a;
    margin-top: 1rem;
}

.hardhat-footer-email-inner {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.hardhat-footer-email-text {
    color: #888;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    text-transform: lowercase;
}

.hardhat-footer-email-form {
    display: flex;
    gap: 0.5rem;
}

.hardhat-footer-email-input {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #141414;
    border: 1px solid #333;
    border-radius: 0.5rem;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
}

.hardhat-footer-email-input:focus {
    border-color: #00ff88;
}

.hardhat-footer-email-input::placeholder {
    color: #555;
}

.hardhat-footer-email-btn {
    padding: 0.75rem 1.5rem;
    background: #00ff88;
    color: #000;
    border: none;
    border-radius: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.hardhat-footer-email-btn:hover {
    background: #00dd77;
}

/* ---- Modal Utility ---- */
.hardhat-modal {
    position: fixed;
    inset: 0;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.hardhat-modal-show {
    opacity: 1;
}

.hardhat-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
}

.hardhat-modal-content {
    position: relative;
    background: #141414;
    border: 1px solid #333;
    border-radius: 1rem;
    padding: 2.5rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s;
}

.hardhat-modal-show .hardhat-modal-content {
    transform: translateY(0);
}

.hardhat-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: #888;
    font-size: 1.5rem;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.hardhat-modal-close:hover {
    background: #222;
    color: #fff;
}

.hardhat-modal-body {
    color: #e0e0e0;
    font-family: 'Inter', sans-serif;
}

/* ---- Keyboard Help Modal ---- */
.kbd-help-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.25rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #fff;
}

.kbd-help-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.kbd-help-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kbd-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    padding: 0.25rem 0.5rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 6px;
    font-family: 'Inter', monospace;
    font-size: 0.8rem;
    font-weight: 700;
    color: #00ff88;
    box-shadow: 0 2px 0 #222;
}

.kbd-key.small {
    min-width: 1.5rem;
    padding: 0.1rem 0.35rem;
    font-size: 0.7rem;
}

.kbd-desc {
    font-size: 0.9rem;
    color: #b8b8b8;
}

.kbd-help-footer {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #222;
    font-size: 0.8rem;
    color: #666;
    text-align: center;
}

/* ---- Page Transitions ---- */
body {
    animation: pageIn 0.35s ease both;
}

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

body.page-exit {
    animation: pageOut 0.2s ease both;
}

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

/* ---- Scroll to top button ---- */
.scroll-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #141414;
    border: 1px solid #333;
    color: #00ff88;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 90;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.scroll-top-btn.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-top-btn:hover {
    background: #1a1a1a;
    border-color: #00ff88;
    transform: translateY(-2px);
}

/* ---- Smooth Scroll ---- */
html {
    scroll-behavior: smooth;
}

/* ---- Active Nav Link ---- */
.nav-link.active {
    color: #00ff88 !important;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: #00ff88;
    border-radius: 1px;
}

/* ---- Card Hover Glow ---- */
.card-glow {
    transition: all 0.3s ease;
}

.card-glow:hover {
    border-color: rgba(0, 255, 136, 0.3);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.05), 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

/* ---- Floating Animation for Emojis ---- */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

.float-anim {
    animation: float 3s ease-in-out infinite;
}

/* ---- Focus Visible Styles ---- */
:focus-visible {
    outline: 2px solid #00ff88;
    outline-offset: 2px;
    border-radius: 4px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid #00ff88;
    outline-offset: 2px;
}

/* ---- Selection Color ---- */
::selection {
    background: rgba(0, 255, 136, 0.25);
    color: #fff;
}

/* ---- Link Hover Transitions ---- */
a {
    transition: color 0.2s ease;
}

/* ---- Disabled State ---- */
button:disabled,
.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---- Pulse Badge Animation ---- */
@keyframes pulseBadge {
    0%, 100% { box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(0, 255, 136, 0); }
}

.pulse-badge {
    animation: pulseBadge 2s ease-in-out infinite;
}

/* ---- Scroll Reveal Animations ---- */
.reveal-ready {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Different reveal variants */
[data-reveal="fade"] {
    transform: none;
}

[data-reveal="slide-left"].reveal-ready {
    transform: translateX(-30px);
}

[data-reveal="slide-right"].reveal-ready {
    transform: translateX(30px);
}

[data-reveal="scale"].reveal-ready {
    transform: scale(0.95);
}

[data-reveal="slide-left"].reveal-visible,
[data-reveal="slide-right"].reveal-visible,
[data-reveal="scale"].reveal-visible {
    transform: none;
}

/* ---- Breadcrumb Navigation ---- */
.breadcrumb {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-tertiary, #b8b8b8);
    text-decoration: none;
    font-size: 0.875rem;
    text-transform: lowercase;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary, #00ff88);
}

.breadcrumb-sep {
    color: var(--text-tertiary, #b8b8b8);
    font-size: 0.875rem;
    opacity: 0.5;
}

.breadcrumb-current {
    color: var(--text-secondary, #e0e0e0);
    font-size: 0.875rem;
    text-transform: lowercase;
    font-weight: 600;
}

/* ---- Page Load Progress Bar ---- */
.hardhat-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 10000;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.3s;
}

.hardhat-progress-bar.done {
    opacity: 0;
}

.hardhat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00cc6a, #00ff88);
    background-size: 200% 100%;
    animation: progressShine 1.5s linear infinite;
    border-radius: 0 2px 2px 0;
    width: 0;
    transition: width 0.3s ease;
    box-shadow: 0 0 8px rgba(0, 255, 136, 0.5), 0 0 4px rgba(0, 255, 136, 0.3);
}

@keyframes progressShine {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ---- Button Ripple Effect ---- */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple .ripple-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: scale(0);
    animation: rippleExpand 0.6s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleExpand {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* ---- Animated Underline Links ---- */
.link-underline {
    position: relative;
    text-decoration: none;
}

.link-underline::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #00ff88;
    transition: width 0.3s ease;
    border-radius: 1px;
}

.link-underline:hover::after {
    width: 100%;
}

/* ---- Gradient Border Hover ---- */
.gradient-border-hover {
    position: relative;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.gradient-border-hover::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(0,255,136,0) 0%, rgba(0,255,136,0) 100%);
    z-index: -1;
    transition: background 0.4s ease;
    border-radius: inherit;
}

.gradient-border-hover:hover::before {
    background: linear-gradient(135deg, rgba(0,255,136,0.4) 0%, rgba(0,136,255,0.2) 50%, rgba(255,0,128,0.3) 100%);
}

/* ---- Tilt Card on Hover ---- */
.tilt-card {
    transition: transform 0.2s ease;
}

/* ---- Stagger Children Animation ---- */
.stagger-children > * {
    opacity: 0;
    transform: translateY(12px);
    animation: staggerIn 0.4s ease forwards;
}

.stagger-children > *:nth-child(1) { animation-delay: 0s; }
.stagger-children > *:nth-child(2) { animation-delay: 0.05s; }
.stagger-children > *:nth-child(3) { animation-delay: 0.1s; }
.stagger-children > *:nth-child(4) { animation-delay: 0.15s; }
.stagger-children > *:nth-child(5) { animation-delay: 0.2s; }
.stagger-children > *:nth-child(6) { animation-delay: 0.25s; }
.stagger-children > *:nth-child(7) { animation-delay: 0.3s; }
.stagger-children > *:nth-child(8) { animation-delay: 0.35s; }

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

/* ---- Glow Text ---- */
.glow-text {
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5), 0 0 20px rgba(0, 255, 136, 0.3);
}

/* ---- Shimmer Highlight on hover ---- */
.shimmer-hover {
    position: relative;
    overflow: hidden;
}

.shimmer-hover::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
    transition: none;
    pointer-events: none;
}

.shimmer-hover:hover::after {
    animation: shimmerSlide 0.8s ease forwards;
}

@keyframes shimmerSlide {
    from { left: -100%; }
    to { left: 100%; }
}

/* ---- Scale Bounce on Click ---- */
.click-bounce:active {
    transform: scale(0.96);
    transition: transform 0.1s ease;
}

/* ---- Progress Bar Animate ---- */
.progress-bar-animated {
    height: 4px;
    background: #1a1a1a;
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar-animated .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00ff88, #00cc6a);
    border-radius: 2px;
    transition: width 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    width: 0;
}

/* ---- Tooltip ---- */
[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #1a1a1a;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: 'Inter', sans-serif;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- Recently Viewed Trades Widget ---- */
.hardhat-recent-widget {
    position: fixed;
    bottom: 5rem;
    left: 1.25rem;
    width: 220px;
    background: #141414;
    border: 1px solid #222;
    border-radius: 12px;
    z-index: 89;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.hardhat-recent-widget.hardhat-recent-visible {
    opacity: 1;
    transform: translateY(0);
}

.hardhat-recent-widget.hardhat-recent-hidden {
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.recent-widget-header {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.recent-widget-toggle {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 0.75rem;
    background: none;
    border: none;
    color: #888;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.2s;
    text-transform: lowercase;
}

.recent-widget-toggle:hover {
    color: #e0e0e0;
}

.recent-widget-toggle svg:first-child {
    color: #00ff88;
    flex-shrink: 0;
}

.recent-widget-chevron {
    margin-left: auto;
    transition: transform 0.2s;
    flex-shrink: 0;
}

.hardhat-recent-widget.collapsed .recent-widget-chevron {
    transform: rotate(180deg);
}

.recent-widget-close {
    background: none;
    border: none;
    color: #555;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.4rem 0.6rem;
    line-height: 1;
    transition: color 0.2s;
}

.recent-widget-close:hover {
    color: #ff3d71;
}

.recent-widget-list {
    border-top: 1px solid #222;
    max-height: 250px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
}

.hardhat-recent-widget.collapsed .recent-widget-list {
    max-height: 0;
    border-top-color: transparent;
    opacity: 0;
}

.recent-widget-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    text-decoration: none;
    color: #e0e0e0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.8rem;
    transition: background 0.15s;
    border-bottom: 1px solid #1a1a1a;
}

.recent-widget-item:last-child {
    border-bottom: none;
}

.recent-widget-item:hover {
    background: rgba(0, 255, 136, 0.06);
}

.recent-widget-item.active {
    background: rgba(0, 255, 136, 0.08);
    border-left: 2px solid #00ff88;
}

.recent-widget-emoji {
    font-size: 1rem;
    flex-shrink: 0;
}

.recent-widget-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.recent-widget-salary {
    color: #00ff88;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---- Global Search Overlay ---- */
.hardhat-search-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: #141414;
    border: 1px solid #333;
    border-radius: 8px;
    color: #888;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 0.5rem;
}

.hardhat-search-trigger:hover {
    border-color: #00ff88;
    color: #e0e0e0;
}

.hardhat-search-trigger svg {
    opacity: 0.6;
}

.search-trigger-text {
    color: #666;
}

.search-trigger-kbd {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    font-family: 'Inter', monospace;
    font-size: 0.7rem;
    color: #666;
    margin-left: 0.25rem;
}

.hardhat-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 10001;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.hardhat-search-overlay.hardhat-search-open {
    opacity: 1;
}

.hardhat-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
}

.hardhat-search-dialog {
    position: relative;
    width: 100%;
    max-width: 580px;
    background: #141414;
    border: 1px solid #333;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 255, 136, 0.05);
    overflow: hidden;
    transform: translateY(-10px) scale(0.98);
    transition: transform 0.2s ease;
}

.hardhat-search-open .hardhat-search-dialog {
    transform: translateY(0) scale(1);
}

.hardhat-search-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #222;
}

.hardhat-search-icon {
    color: #666;
    flex-shrink: 0;
}

.hardhat-search-input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    caret-color: #00ff88;
}

.hardhat-search-input::placeholder {
    color: #555;
}

.hardhat-search-esc {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 4px;
    font-family: 'Inter', monospace;
    font-size: 0.7rem;
    color: #666;
    flex-shrink: 0;
}

.hardhat-search-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.hardhat-search-results::-webkit-scrollbar {
    width: 4px;
}

.hardhat-search-results::-webkit-scrollbar-track {
    background: transparent;
}

.hardhat-search-results::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 2px;
}

.hardhat-search-group {
    padding: 0.5rem 0.75rem 0.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.hardhat-search-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    text-decoration: none;
    color: #e0e0e0;
    transition: background 0.1s;
    cursor: pointer;
}

.hardhat-search-item:hover,
.hardhat-search-item.selected {
    background: rgba(0, 255, 136, 0.08);
}

.hardhat-search-item.selected {
    outline: 1px solid rgba(0, 255, 136, 0.2);
}

.hardhat-search-item-emoji {
    font-size: 1.3rem;
    width: 32px;
    text-align: center;
    flex-shrink: 0;
}

.hardhat-search-item-text {
    flex: 1;
    min-width: 0;
}

.hardhat-search-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.hardhat-search-item-title mark {
    background: rgba(0, 255, 136, 0.25);
    color: #00ff88;
    border-radius: 2px;
    padding: 0 2px;
}

.hardhat-search-item-subtitle {
    font-size: 0.78rem;
    color: #888;
    margin-top: 0.1rem;
}

.hardhat-search-item-arrow {
    color: #444;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}

.hardhat-search-item:hover .hardhat-search-item-arrow,
.hardhat-search-item.selected .hardhat-search-item-arrow {
    opacity: 1;
    color: #00ff88;
}

.hardhat-search-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #666;
    font-size: 0.9rem;
}

.hardhat-search-empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hardhat-search-empty-hint {
    font-size: 0.8rem;
    color: #555;
    margin-top: 0.25rem;
}

.hardhat-search-footer {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.65rem 1.25rem;
    border-top: 1px solid #222;
    font-size: 0.75rem;
    color: #555;
}

.hardhat-search-footer kbd {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 3px;
    font-family: 'Inter', monospace;
    font-size: 0.65rem;
    color: #666;
    margin-right: 0.2rem;
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .float-anim {
        animation: none !important;
    }

    body {
        animation: none !important;
    }

    .reveal-ready {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* ---- Mobile Hamburger Menu ---- */
.hardhat-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: 1px solid #333;
    border-radius: 6px;
    cursor: pointer;
    padding: 7px;
    z-index: 1001;
    transition: border-color 0.2s;
}

.hardhat-hamburger:hover {
    border-color: #00ff88;
}

.hardhat-hamburger-line {
    display: block;
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hardhat-hamburger.open .hardhat-hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
    background: #00ff88;
}

.hardhat-hamburger.open .hardhat-hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hardhat-hamburger.open .hardhat-hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
    background: #00ff88;
}

.hardhat-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.hardhat-mobile-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .hardhat-toast-container {
        top: auto;
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .hardhat-toast {
        max-width: 100%;
    }

    .hardhat-nav-name {
        display: none;
    }

    .footer {
        padding: 3rem 1.5rem 2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .footer-right {
        justify-content: center;
        flex-direction: column;
        gap: 1rem;
    }

    .hardhat-footer-email-form {
        flex-direction: column;
    }

    .hardhat-modal {
        padding: 1rem;
    }

    .hardhat-modal-content {
        padding: 1.5rem;
    }

    /* Mobile hamburger menu */
    .hardhat-hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -280px;
        width: 280px;
        height: 100vh;
        background: #0a0a0a;
        border-left: 1px solid #1a1a1a;
        flex-direction: column;
        padding: 5rem 2rem 2rem;
        gap: 0.25rem;
        z-index: 1000;
        transition: right 0.3s ease;
        overflow-y: auto;
    }

    .nav-links.mobile-open {
        right: 0;
    }

    .nav-links .nav-link {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid #1a1a1a;
    }

    .nav-links .nav-link:last-of-type {
        border-bottom: none;
    }

    .nav-links .hardhat-nav-auth {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid #1a1a1a;
        margin-left: 0;
    }

    .nav-links .hardhat-nav-login-btn {
        display: block;
        text-align: center;
        padding: 0.75rem 1.25rem;
        width: 100%;
    }

    .nav-links .hardhat-nav-user {
        padding: 0.5rem 0;
    }

    .nav-links .hardhat-nav-name {
        display: inline;
    }

    /* Hide recent trades widget on mobile */
    .hardhat-recent-widget {
        display: none;
    }

    /* Search trigger on mobile */
    .hardhat-search-trigger {
        padding: 0.35rem 0.5rem;
    }

    .search-trigger-text,
    .search-trigger-kbd {
        display: none;
    }

    .hardhat-search-overlay {
        padding-top: 5vh;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .hardhat-search-dialog {
        max-width: 100%;
    }

    .hardhat-search-footer {
        display: none;
    }
}

/* ---- Small Phone Breakpoint ---- */
@media (max-width: 480px) {
    .footer {
        padding: 2rem 1rem 1.5rem;
    }

    .footer-content {
        gap: 1.5rem;
    }

    .footer-right {
        gap: 0.75rem;
    }

    .footer-right a {
        font-size: 0.8rem;
    }

    .footer-bottom {
        font-size: 0.7rem;
    }

    .footer-bottom a {
        padding: 0.4rem 0.25rem;
    }

    .hardhat-toast-container {
        bottom: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
    }

    .hardhat-modal-content {
        padding: 1.25rem;
    }

    .btn-nav {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }
}

/* ---- Loading Skeletons ---- */
.skeleton {
    background: linear-gradient(90deg, #141414 25%, #1c1c1c 37%, #141414 63%);
    background-size: 400% 100%;
    animation: skeletonShimmer 1.4s ease infinite;
    border-radius: 0.5rem;
}

@keyframes skeletonShimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0.25rem;
}

.skeleton-text:last-child {
    width: 60%;
}

.skeleton-title {
    height: 1.75rem;
    width: 50%;
    margin-bottom: 1rem;
    border-radius: 0.25rem;
}

.skeleton-card {
    background: #141414;
    border: 1px solid #1a1a1a;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
}

.skeleton-badge {
    height: 2rem;
    width: 5rem;
    border-radius: 2rem;
    display: inline-block;
    margin-right: 0.5rem;
}

.skeleton-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.skeleton-col {
    flex: 1;
}

/* ---- Nav Badge ---- */
.hardhat-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.1rem;
    height: 1.1rem;
    padding: 0 0.3rem;
    background: #ff3d71;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    border-radius: 10rem;
    margin-left: 0.35rem;
    vertical-align: middle;
    line-height: 1;
}

/* ---- Skeleton Loading ---- */
.hardhat-skeleton {
    background: #1a1a1a;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.hardhat-skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
    animation: forgeShimmer 1.5s infinite;
}

@keyframes forgeShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.hardhat-skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.hardhat-skeleton-text.short {
    width: 60%;
}

.hardhat-skeleton-text.medium {
    width: 80%;
}

.hardhat-skeleton-pill {
    height: 36px;
    border-radius: 8px;
}

.hardhat-skeleton-card {
    height: 200px;
    border-radius: 16px;
}

/* ---- Focus Styles for Keyboard Navigation ---- */
.calc-trade-pill:focus-visible,
.calc-exp-option:focus-visible,
.trade-pill:focus-visible {
    outline: 2px solid #00ff88;
    outline-offset: 2px;
}

.calc-select:focus-visible {
    outline: 2px solid #00ff88;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(0, 255, 136, 0.15);
}

.calc-modifier:focus-within {
    border-color: #00ff88;
    box-shadow: 0 0 0 2px rgba(0, 255, 136, 0.1);
}

/* ---- Offline Banner ---- */
.hardhat-offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: rgba(255, 61, 113, 0.12);
    border-bottom: 1px solid rgba(255, 61, 113, 0.3);
    color: #ff3d71;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: lowercase;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    backdrop-filter: blur(12px);
}

.hardhat-offline-banner.show {
    transform: translateY(0);
}
