:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #f43f5e;
    --bg-dark: #07090e; /* Deep Obsidian dark mode */
    --card-bg: rgba(17, 22, 34, 0.65); /* Darker glassmorphism */
    --glass-border: rgba(255, 255, 255, 0.06);
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --container-max: 1200px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

h1,
h2,
h3,
.logo-text {
    font-family: 'Outfit', sans-serif;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Background Blobs */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(100px); /* Increased blur for smoother transitions */
    opacity: 0.12; /* Sleek, extremely subtle dark mode depth */
}

.blob {
    position: absolute;
    width: 40vw;
    height: 40vw;
    border-radius: 50%;
}

.blob-1 {
    background: var(--primary);
    top: -10%;
    left: -10%;
}

.blob-2 {
    background: var(--secondary);
    bottom: -10%;
    right: -10%;
}

.blob-3 {
    background: var(--accent);
    top: 30%;
    left: 40%;
    width: 30vw;
    height: 30vw;
}

/* Header & Nav */
.glass-header {
    height: 60px;
    display: flex;
    align-items: center;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.glass-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    color: var(--text-main);
    text-decoration: none;
}

.logo i {
    color: var(--primary-light);
}

.logo-text span {
    color: var(--primary-light);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-main);
}

/* Hero */
.hero {
    padding: 1rem 0 0.5rem;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, #fff, var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero h1 span {
    display: block;
    color: var(--secondary);
    -webkit-text-fill-color: var(--secondary);
}

.hero p {
    color: var(--text-dim);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.last-updated {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.update-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.05);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-suggest {
    background: none;
    border: 1px solid var(--primary-light);
    color: var(--primary-light);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.btn-suggest:hover {
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.btn-moomoo {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    color: white !important;
    padding: 0.6rem 1.25rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-moomoo:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    filter: brightness(1.1);
}

/* Uniform nav buttons */
.nav-links .btn-moomoo {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

@media (min-width: 769px) {
    .nav-links .btn-moomoo {
        height: 40px;
        min-width: 110px;
        justify-content: center;
    }
}

.nav-links .btn-moomoo svg {
    width: 14px;
    height: 14px;
}

.nav-links .btn-moomoo:hover {
    transform: translateY(-2px);
    box-shadow: none;
    filter: brightness(1.1);
}

.hero-cta {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    margin-top: 1rem;
}

.last-updated .dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 10px #10b981;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }

    100% {
        opacity: 1;
    }
}

/* Tabs */
.tabs-container {
    display: grid;
    grid-template-columns: repeat(5, 1fr); /* 5 stages */
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.4rem;
}

.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 1.5rem;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-dim);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    border-radius: 1rem;
    transition: var(--transition);
    text-align: left;
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
}

.stage-num {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Outfit';
    opacity: 0.5;
}

.active .stage-num {
    opacity: 1;
}

.tab-label .title {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

.tab-label .desc {
    display: block;
    font-size: 0.72rem;
    opacity: 0.7;
}

.tab-count {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--primary-light);
    margin-top: 0.25rem;
    opacity: 0.8;
}

.active .tab-count {
    color: rgba(255, 255, 255, 0.8);
}

/* IPO Grid */
.ipo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
    padding-bottom: 2.5rem;
    min-height: 400px;
}

.ipo-card {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--transition);
}

/* Card Entrance Animation */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card-animate {
    animation: cardFadeIn 0.5s ease-out both;
}

/* IPO Count Bar */
.ipo-count-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--text-dim);
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 2rem;
    width: fit-content;
}

.ipo-count-bar strong {
    color: var(--primary-light);
}

.ipo-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-light);
    box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
}

.market-badge {
    color: white;
}

.main-market {
    background: linear-gradient(135deg, #fbbf24, #d97706);
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.ace-market {
    background: linear-gradient(135deg, #10b981, #059669);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.outlier-badge {
    background: linear-gradient(135deg, #f43f5e, #be123c);
    color: white;
    border: 1px solid rgba(244, 63, 94, 0.4);
    animation: glow 2s infinite alternate;
}

@keyframes glow {
    from { box-shadow: 0 0 5px rgba(244, 63, 94, 0.2); }
    to { box-shadow: 0 0 15px rgba(244, 63, 94, 0.5); }
}

.surge-badge {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: 1px solid rgba(249, 115, 22, 0.4);
    animation: surgePulse 1.5s infinite alternate;
}

@keyframes surgePulse {
    from { 
        box-shadow: 0 0 5px rgba(249, 115, 22, 0.4);
        transform: scale(1);
    }
    to { 
        box-shadow: 0 0 20px rgba(249, 115, 22, 0.8);
        transform: scale(1.05);
    }
}

.sector-badge {
    color: var(--secondary);
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.company-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.details-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-item .label {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-item .value {
    font-weight: 600;
    font-size: 1rem;
}

.valuation-group {
    display: flex;
    flex-direction: column;
}

.valuation-reason {
    font-size: 0.7rem;
    color: var(--text-dim);
    line-height: 1.2;
    margin-top: 0.25rem;
    font-weight: 400;
}

.grade-reason {
    transition: var(--transition);
}

.ipo-card:hover .grade-reason {
    background: rgba(255, 255, 255, 0.05);
}


.card-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.status-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status-live {
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
}

.status-draft {
    background: #f59e0b;
}

.status-closed {
    background: #ef4444;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.75rem;
    border-radius: 0.75rem;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.btn-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Loading & Empty */
.loading-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-dim);
    padding: 4rem;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--primary-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Market Guide */
.market-guide {
    margin-bottom: 2rem;
    padding: 3rem;
    text-align: center;
}

.market-guide h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.market-guide h2 span {
    color: var(--secondary);
}

.market-guide p {
    color: var(--text-dim);
    margin-bottom: 3rem;
}

.market-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    text-align: left;
    margin-bottom: 3rem;
}

.market-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.market-type ul {
    list-style: none;
}

.market-type li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--text-main);
}

.market-type li i {
    width: 20px;
    color: var(--primary-light);
}

.market-type.ace li i {
    color: #10b981;
}

.pro-tip {
    background: rgba(99, 102, 241, 0.1);
    border: 1px dashed var(--primary-light);
    padding: 1.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.pro-tip i {
    color: #fbbf24;
}

.pro-tip p {
    margin-bottom: 0;
    color: var(--text-main);
}

@media (max-width: 768px) {
    .market-comparison {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Financial Guide */
.financial-guide {
    margin-bottom: 5rem;
    padding: 3rem;
    text-align: center;
}

.financial-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    text-align: left;
    margin-top: 3rem;
}

.color-info {
    color: #38bdf8;
}

.finance-item {
    padding: 1.25rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.finance-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary-light);
    background: rgba(99, 102, 241, 0.05);
}

.finance-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.finance-header i {
    width: 20px;
    height: 20px;
    color: var(--secondary);
}

.finance-header h3 {
    font-size: 1rem;
    margin-bottom: 0;
}

.finance-item p {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 0;
    line-height: 1.5;
}

@media (max-width: 1200px) {
    .financial-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .financial-grid {
        grid-template-columns: 1fr;
    }
}

/* Hunter Checklist */
.hunter-checklist {
    margin-bottom: 5rem;
    padding: 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(14, 165, 233, 0.05));
}

.checklist-info {
    flex: 1;
}

.checklist-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.checklist-info h2 span {
    color: var(--secondary);
}

.checklist-grid {
    flex: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.check-item {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.check-item i {
    width: 40px;
    height: 40px;
    color: var(--primary-light);
    flex-shrink: 0;
}

.check-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.check-item p {
    font-size: 0.85rem;
    color: var(--text-dim);
    line-height: 1.5;
}

@media (max-width: 992px) {
    .hunter-checklist {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }

    .check-item {
        text-align: left;
    }
}

/* Beginner Guide */
.beginner-guide {
    margin-bottom: 5rem;
    padding: 3rem;
    text-align: center;
}

.beginner-guide h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.beginner-guide h2 span {
    color: var(--primary-light);
}

.beginner-guide p {
    color: var(--text-dim);
    margin-bottom: 3rem;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.guide-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.guide-icon {
    width: 60px;
    height: 60px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    margin-bottom: 1rem;
    border: 1px solid var(--glass-border);
}

.guide-item h3 {
    font-size: 1.25rem;
    color: var(--text-main);
}

.guide-item p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Footer */
.glass-footer {
    padding: 2rem 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    border-top: 1px solid var(--glass-border);
    margin-top: auto;
    text-align: center;
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3rem;
    }

    .tabs-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .nav-links {
        display: flex;
        gap: 0.5rem;
    }

    /* On mobile: hide the Moomoo Trade link, show only Strategy button */
    .nav-links a:last-child {
        display: none;
    }

    /* Make the Strategy button icon-only on mobile */
    .nav-links a:first-child span {
        display: none;
    }

    .nav-links a:first-child {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        border-radius: 0.6rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .mobile-moomoo-fab {
        display: flex;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 90;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
}

/* Mobile Floating Moomoo FAB */
.mobile-moomoo-fab {
    display: none;
    position: fixed;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1e40af, #2563eb);
    color: white;
    text-decoration: none;
    padding: 0.75rem 1.5rem;
    border-radius: 3rem;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.5);
    z-index: 95;
    transition: all 0.3s ease;
}

.mobile-moomoo-fab:hover {
    transform: translateX(-50%) translateY(-2px);
    box-shadow: 0 10px 35px rgba(37, 99, 235, 0.6);
}

.mobile-moomoo-fab i {
    width: 16px;
    height: 16px;
}

@media (max-width: 640px) {
    .back-to-top {
        bottom: 5rem;
        right: 1rem;
        width: 42px;
        height: 42px;
    }
}

/* Modal Styles */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to { opacity: 1; }
}

.modal-content {
    background: var(--bg-dark);
    max-width: 600px;
    width: 100%;
    border-radius: 1.5rem;
    padding: 2.5rem;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    transform: translateY(20px);
    animation: slideUp 0.3s forwards;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    to { transform: translateY(0); }
}

.btn-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-dim);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-close:hover {
    background: var(--accent);
    color: white;
}

#modal-body h2,
#calculator-modal-body h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: white;
}

#modal-body p,
#calculator-modal-body p {
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.modal-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 1.5rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
}

.modal-action {
    display: flex;
    justify-content: flex-end;
}

/* Pulsing animation for Analyst Hub button */
@keyframes button-pulse {
    0% { transform: scale(1); box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4); }
    50% { transform: scale(1.02); box-shadow: 0 4px 25px rgba(129, 140, 248, 0.6); }
    100% { transform: scale(1); box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4); }
}

.pulse-primary {
    animation: button-pulse 2s infinite ease-in-out;
}

/* Calculator Modal */
.calc-form-group {
    margin-bottom: 1.5rem;
}

.calc-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.9rem;
}

.calc-form-group select,
.calc-form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    color: white;
    border-radius: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.calc-form-group select:focus,
.calc-form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.calc-results {
    background: rgba(16, 185, 129, 0.05);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 2rem;
    animation: fadeIn 0.3s forwards;
}

.calc-results h3 {
    color: #10b981;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.calc-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.calc-stat {
    background: rgba(0,0,0,0.2);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
}

.calc-stat .label {
    font-size: 0.8rem;
    color: var(--text-dim);
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.calc-stat .val {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.calc-tier-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.calc-suggestion {
    padding-top: 1rem;
    border-top: 1px dashed rgba(255,255,255,0.1);
    font-size: 0.9rem;
    color: var(--text-dim);
}

.calc-suggestion strong {
    color: var(--primary-light);
}

.asb-warning {
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
    font-size: 0.85rem;
    color: #ef4444;
    border-radius: 0.25rem;
}

/* AI Chat Assistant */
.ai-chat-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.ai-chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    position: relative;
}

.ai-chat-toggle:hover {
    transform: scale(1.1) rotate(5deg);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    border: 2px solid var(--bg-dark);
}

.ai-chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 500px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: slideInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: bottom right;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.ai-chat-header {
    padding: 1.25rem;
    background: rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ai-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.ai-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: white;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    border: 2px solid var(--bg-dark);
}

.ai-messages {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.ai-messages::-webkit-scrollbar {
    width: 4px;
}

.ai-messages::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.message {
    max-width: 85%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.ai-message {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.05);
    border-bottom-left-radius: 2px;
    color: var(--text-main);
}

.user-message {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.ai-chat-input {
    padding: 1rem;
    background: rgba(15, 23, 42, 0.8);
    border-top: 1px solid var(--glass-border);
    display: flex;
    gap: 0.5rem;
}

.ai-chat-input input {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 0.6rem 1rem;
    color: white;
    outline: none;
    transition: var(--transition);
}

.ai-chat-input input:focus {
    border-color: var(--primary);
}

.ai-chat-input button {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ai-chat-input button:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Typing Animation */
.dot-typing {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-dim);
    margin: 0 2px;
    animation: dotTyping 1.4s infinite linear;
    opacity: 0.6;
}

.dot-typing:nth-child(2) {
    animation-delay: 0.2s;
}

.dot-typing:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes dotTyping {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

@media (max-width: 480px) {
    .ai-chat-window {
        width: calc(100vw - 2rem);
        right: -1rem;
        bottom: 70px;
        height: 450px;
    }
    
    .ai-chat-container {
        right: 1rem;
        bottom: 1rem;
    }
}

/* Hunter Pro Calculator Styles */
.pro-calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .pro-calc-grid {
        grid-template-columns: 1fr;
    }
}

.result-summary-card {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(16, 185, 129, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.summary-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #a5b4fc;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
}

.summary-value {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    font-family: 'Outfit', sans-serif;
}

.summary-sub {
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-top: 0.5rem;
}

.tier-recommendation {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    padding: 1.25rem;
}

.pro-tabs {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
}

.pro-tab-headers {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.4rem;
    border-radius: 0.75rem;
}

.pro-tab-btn {
    flex: 1;
    padding: 0.6rem;
    border-radius: 0.5rem;
    border: none;
    background: transparent;
    color: var(--text-dim);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.pro-tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.pro-tab-content {
    display: none;
}

.pro-tab-content.active {
    display: block;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.detail-item {
    background: rgba(255, 255, 255, 0.02);
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-item .label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-dim);
    margin-bottom: 0.25rem;
}

.detail-item .value {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
}

.deposit-alert {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 0.5rem;
    color: #f59e0b;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tier-table {
    width: 100%;
    border-collapse: collapse;
}

.tier-table th {
    font-size: 0.75rem;
    color: var(--text-dim);
    text-align: left;
    padding: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.tier-table td {
    padding: 0.75rem;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.tier-table tr.active {
    background: rgba(16, 185, 129, 0.1);
}

.sell-calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 500px) {
    .sell-calc-grid {
        grid-template-columns: 1fr;
    }
}

.sell-results {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sell-stat .label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
}

.sell-stat .value {
    font-weight: 800;
    color: #10b981;
}

/* --- SYNC HUB STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: relative;
    width: 90%;
    background: var(--bg-dark);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-dim);
    font-size: 2rem;
    cursor: pointer;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--accent);
}

.sync-item {
    padding: 1rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.status-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-dim);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--primary);
    transition: width 0.5s ease, background 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Green Pulse Alert Animations & Utilities */
@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
    }
}

.pulse-green-text {
    animation: pulse-green-txt-anim 2s infinite;
}

@keyframes pulse-green-txt-anim {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* Beautiful custom scrollbar for table container */
.table-responsive::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}
.table-responsive::-webkit-scrollbar-track {
    background: rgba(15, 23, 42, 0.3);
    border-radius: 4px;
}
.table-responsive::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.4);
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.table-responsive::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.7);
}

/* Ensure sticky table headers look smooth and opaque */
.table-responsive {
    scrollbar-gutter: stable;
}

.table-responsive th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: #1e293b !important;
}

/* Premium Mobile & Web Responsiveness Optimization */
@media (max-width: 768px) {
    /* Hide navigation text labels, making them beautiful compact icon-only buttons on mobile */
    .nav-links a span, .nav-text {
        display: none !important;
    }
    .nav-links a i {
        margin: 0 !important;
    }
    .nav-links .btn-moomoo {
        padding: 0.5rem 0.75rem !important;
        height: 38px;
        width: 38px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
    .glass-header .container {
        padding: 0 1rem !important;
    }
    .logo-text {
        font-size: 1.25rem !important;
    }
}

@media (max-width: 600px) {
    /* Sifu Sheets Mobile Layout Optimization */
    .excel-table td, .excel-table th {
        padding: 0.4rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
    .excel-table input {
        font-size: 0.75rem !important;
        padding: 0.2rem !important;
    }
    .sheet-card {
        padding: 1rem !important;
    }
    .verdict-banner {
        padding: 0.75rem !important;
        font-size: 0.78rem !important;
    }
    .sheet-container {
        gap: 1rem !important;
        margin-top: 1rem !important;
    }
    
    /* Picks Table & Card Spacing Adjustments */
    .picks-table td, .picks-table th {
        padding: 0.45rem 0.5rem !important;
        font-size: 0.72rem !important;
    }
    .picks-table-wrapper {
        margin: 0 -0.5rem;
        border-radius: 0.5rem;
    }
    .group-card {
        padding: 0.75rem !important;
    }
    .group-title {
        font-size: 1.1rem !important;
    }
    
    /* Global Typography adjustments for readability */
    h1 {
        font-size: 1.8rem !important;
    }
    h2 {
        font-size: 1.4rem !important;
    }
    
    /* Enable smooth touch scrolling on tables */
    .excel-table-wrapper, .picks-table-wrapper, .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

/* Hunter AI Chat Assistant Styles */
.message {
    padding: 0.65rem 0.85rem;
    border-radius: 0.75rem;
    font-size: 0.8rem;
    line-height: 1.4;
    max-width: 85%;
    word-break: break-word;
}
.user-message {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    color: white !important;
    align-self: flex-end;
    border-bottom-right-radius: 0.25rem;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
    margin-left: auto;
}
.ai-message {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e2e8f0;
    align-self: flex-start;
    border-bottom-left-radius: 0.25rem;
    margin-right: auto;
}
.typing {
    display: flex;
    gap: 0.25rem;
    align-items: center;
    padding: 0.5rem 0.75rem;
}
.dot-typing {
    width: 6px;
    height: 6px;
    background-color: #a78bfa;
    border-radius: 50%;
    display: inline-block;
    animation: typing-bounce 1.4s infinite ease-in-out both;
}
.dot-typing:nth-child(1) { animation-delay: -0.32s; }
.dot-typing:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1.0); }
}