/* ============================================
   BROBILLIONAIRE - GLOBAL RESPONSIVE STYLES
   Universal Mobile-First Responsive Fixes
   ============================================ */

/* Global Emoji Support for Responsive Styles */
*, *::before, *::after {
    font-family: inherit, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
}

/* ============================================
   MOBILE MENU TOGGLE
   ============================================ */

/* Hide existing .mobile-menu when our toggle is present */
.mobile-menu-toggle + .mobile-menu,
.mobile-menu {
    display: none !important;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: 8px;
    cursor: pointer;
    gap: 5px;
    padding: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #C9A227;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle:hover {
    background: rgba(201, 162, 39, 0.1);
}

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

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Dropdown Menu */
.mobile-nav-dropdown {
    display: none;
    position: fixed;
    top: 75px;
    left: 0;
    right: 0;
    background: rgba(13, 13, 13, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 162, 39, 0.2);
    padding: 20px;
    z-index: 999;
    flex-direction: column;
    gap: 10px;
    max-height: calc(100vh - 75px);
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.mobile-nav-dropdown.active {
    display: flex;
}

.mobile-nav-dropdown a {
    display: block;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.mobile-nav-dropdown a:hover,
.mobile-nav-dropdown a.active {
    background: rgba(201, 162, 39, 0.1);
    color: #C9A227;
    border-color: rgba(201, 162, 39, 0.3);
}

/* ============================================
   GLOBAL RESPONSIVE BASE
   ============================================ */

/* Prevent horizontal scroll */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Make all images responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive iframes and embeds */
iframe, embed, object, video {
    max-width: 100%;
}

/* Adjust mobile nav dropdown position when market ticker is present */
body.has-ticker .mobile-nav-dropdown,
.market-ticker ~ * .mobile-nav-dropdown {
    top: 115px;
}

/* ============================================
   LARGE DESKTOP (max-width: 1200px)
   ============================================ */
@media (max-width: 1200px) {
    /* Container adjustments */
    .container,
    .section-container {
        max-width: 95% !important;
        padding-left: 30px !important;
        padding-right: 30px !important;
    }
}

/* ============================================
   TABLET LANDSCAPE (max-width: 1024px)
   ============================================ */
@media (max-width: 1024px) {
    /* Calculator containers */
    .calculator-container,
    .calc-container {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    /* Two column grids become single */
    .two-column,
    .grid-2,
    .side-by-side {
        grid-template-columns: 1fr !important;
        flex-direction: column !important;
    }
    
    /* Triple grids become double on tablets */
    .stats-showcase-triple {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ============================================
   TABLET PORTRAIT (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Hide desktop nav links */
    .nav-links {
        display: none !important;
    }

    /* Navbar adjustments */
    .navbar {
        padding: 10px 0 !important;
    }

    .nav-container {
        padding: 0 15px !important;
    }

    /* Container padding */
    .container,
    .section-container,
    .calculator-section,
    .content-wrapper {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Hero sections */
    .calc-hero,
    .page-hero,
    .hero-section,
    [class*="hero"] {
        padding-top: 100px !important;
        padding-bottom: 40px !important;
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .calc-hero h1,
    .page-hero h1,
    .hero-section h1,
    .page-header h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    .calc-hero p,
    .page-hero p,
    .hero-section p,
    .page-header p {
        font-size: 1rem !important;
    }

    /* Cards and panels */
    .input-panel,
    .results-panel,
    .panel,
    .card,
    .referral-card,
    .leaderboard-section,
    .faq-section {
        padding: 20px !important;
        border-radius: 16px !important;
    }

    /* Chart containers */
    .chart-container {
        width: 200px !important;
        height: 200px !important;
        margin: 0 auto !important;
    }

    .chart-svg {
        width: 200px !important;
        height: 200px !important;
    }

    .chart-center .amount {
        font-size: 1.3rem !important;
    }

    /* Grids - stack on mobile */
    .stats-section,
    .rewards-grid,
    .milestones-grid,
    .sip-tips,
    .tip-cards,
    .features-grid,
    .tools-grid,
    .stats-showcase-triple,
    .battle-grid,
    [class*="-grid"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* Two column stats to single */
    .stats-section {
        grid-template-columns: 1fr !important;
    }

    /* Form elements stack */
    .name-input-section,
    .link-copy-row,
    .form-row,
    .input-row {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .name-input-section input,
    .link-copy-row input,
    .form-row input {
        width: 100% !important;
    }

    .name-input-section button,
    .link-copy-row button,
    .form-row button {
        width: 100% !important;
    }

    /* Share buttons */
    .share-buttons {
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
    }

    .share-btn {
        padding: 10px 18px !important;
        font-size: 0.85rem !important;
    }

    /* Leaderboard top 3 */
    .top-3 {
        flex-direction: column !important;
        gap: 20px !important;
    }

    .top-3-item {
        max-width: 100% !important;
        order: unset !important;
    }

    .top-3-item .podium {
        height: auto !important;
        padding: 15px !important;
    }

    /* Leaderboard tabs */
    .leaderboard-tabs {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .leaderboard-tab {
        padding: 8px 16px !important;
        font-size: 0.85rem !important;
    }

    /* Leaderboard items */
    .leaderboard-item {
        padding: 15px !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .leaderboard-item .user-avatar {
        width: 38px !important;
        height: 38px !important;
    }

    /* Tip cards stack content */
    .tip-card {
        flex-direction: column !important;
        text-align: center !important;
        padding: 20px !important;
    }

    .tip-icon {
        margin: 0 auto 15px !important;
    }

    /* Footer CTA */
    .footer-cta {
        padding: 30px 20px !important;
    }

    .footer-cta h3 {
        font-size: 1.4rem !important;
    }

    /* FAQ */
    .faq-section {
        padding: 25px 15px !important;
    }

    .faq-question {
        font-size: 0.95rem !important;
    }

    /* Quick amounts */
    .quick-amounts {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }

    .quick-btn {
        padding: 8px 14px !important;
        font-size: 0.8rem !important;
    }

    /* Wealth journey */
    .wealth-journey {
        padding: 20px 15px !important;
    }

    .journey-canvas {
        height: 250px !important;
    }

    /* Panel titles */
    .panel-title {
        font-size: 1.1rem !important;
    }

    /* Results breakdown */
    .results-breakdown {
        gap: 15px !important;
    }

    .result-item {
        padding: 15px !important;
    }

    .result-item .value {
        font-size: 1.2rem !important;
    }

    /* Slider labels */
    .slider-labels {
        font-size: 0.75rem !important;
    }

    /* Input values */
    .input-value {
        font-size: 1rem !important;
    }

    /* Table responsiveness */
    table {
        display: block !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Article content */
    .article-content,
    .article-body,
    .content-body {
        padding: 0 10px !important;
    }

    /* Crown icon */
    .crown-icon {
        font-size: 3rem !important;
    }

    /* Stat boxes */
    .stat-box {
        padding: 20px !important;
    }

    .stat-box .number {
        font-size: 2rem !important;
    }

    /* Reward tiers */
    .reward-tier {
        padding: 20px !important;
    }

    .reward-tier .tier-icon {
        font-size: 2rem !important;
    }
}

/* ============================================
   MOBILE (max-width: 576px)
   ============================================ */
@media (max-width: 576px) {
    /* Smaller headings */
    .calc-hero h1,
    .page-hero h1,
    .hero-section h1,
    .page-header h1 {
        font-size: 1.75rem !important;
    }

    h2 {
        font-size: 1.4rem !important;
    }

    h3 {
        font-size: 1.2rem !important;
    }

    /* Further reduce chart */
    .chart-container {
        width: 180px !important;
        height: 180px !important;
    }

    .chart-svg {
        width: 180px !important;
        height: 180px !important;
    }

    .chart-center .amount {
        font-size: 1.1rem !important;
    }

    /* Compact cards */
    .input-panel,
    .results-panel,
    .panel,
    .card {
        padding: 15px !important;
    }

    /* Buttons full width */
    .cta-btn,
    .btn,
    .button,
    .action-btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px 20px !important;
    }

    /* Share buttons stack */
    .share-buttons {
        flex-direction: column !important;
    }

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

    /* Milestone cards 2 columns */
    .milestones-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .milestone-card {
        padding: 15px 10px !important;
    }

    .milestone-amount {
        font-size: 1.1rem !important;
    }

    /* Stat numbers */
    .stat-box .number {
        font-size: 1.75rem !important;
    }

    /* Top 3 avatars */
    .top-3-item .avatar {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.2rem !important;
    }

    .top-3-item.first .avatar {
        width: 60px !important;
        height: 60px !important;
        font-size: 1.5rem !important;
    }

    /* Input groups */
    .input-group {
        margin-bottom: 25px !important;
    }

    /* Footer */
    .footer {
        padding: 30px 15px !important;
    }

    /* Logo adjustments */
    .logo-text {
        font-size: 1rem !important;
    }

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

    /* Navigation dropdown position */
    .mobile-nav-dropdown {
        top: 55px !important;
    }
}

/* ============================================
   SMALL MOBILE (max-width: 400px)
   ============================================ */
@media (max-width: 400px) {
    /* Extra small headings */
    .calc-hero h1,
    .page-hero h1,
    .hero-section h1,
    .page-header h1 {
        font-size: 1.5rem !important;
    }

    /* Compact containers */
    .container,
    .section-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    /* Smaller charts */
    .chart-container {
        width: 160px !important;
        height: 160px !important;
    }

    .chart-svg {
        width: 160px !important;
        height: 160px !important;
    }

    /* Single column milestones */
    .milestones-grid {
        grid-template-columns: 1fr !important;
    }

    /* Compact quick amounts */
    .quick-btn {
        padding: 6px 10px !important;
        font-size: 0.75rem !important;
    }

    /* Smaller stat numbers */
    .stat-box .number {
        font-size: 1.5rem !important;
    }

    /* Crown icon */
    .crown-icon {
        font-size: 2.5rem !important;
    }
}

/* ============================================
   LANDSCAPE MODE FIXES
   ============================================ */
@media (max-height: 500px) and (orientation: landscape) {
    /* Reduce hero padding in landscape */
    .calc-hero,
    .page-hero,
    .hero-section {
        padding-top: 80px !important;
        padding-bottom: 30px !important;
    }

    /* Compact charts */
    .chart-container {
        width: 150px !important;
        height: 150px !important;
    }

    /* Reduce spacing */
    .input-group {
        margin-bottom: 15px !important;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .nav-link,
    .btn,
    .button,
    .cta-btn,
    .quick-btn,
    .share-btn,
    .leaderboard-tab {
        min-height: 44px !important;
        min-width: 44px !important;
    }

    /* Better tap feedback */
    .btn:active,
    .button:active,
    .cta-btn:active,
    .card:active {
        transform: scale(0.98) !important;
        opacity: 0.9 !important;
    }

    /* Disable hover effects that don't work well on touch */
    .card:hover,
    .tip-card:hover,
    .milestone-card:hover {
        transform: none !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .navbar,
    .mobile-menu-toggle,
    .mobile-nav-dropdown,
    .share-buttons,
    .footer-cta,
    .cta-btn {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .chart-container,
    .results-panel,
    .input-panel {
        break-inside: avoid !important;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
.btn:focus-visible,
.button:focus-visible,
.cta-btn:focus-visible,
.nav-link:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #C9A227 !important;
    outline-offset: 2px !important;
}

/* ============================================
   ARTICLE PAGE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .article-toc {
        padding: 20px 15px !important;
        margin: 20px 0 !important;
    }

    .article-toc h2 {
        font-size: 1rem !important;
    }

    .article-toc li {
        padding: 6px 0 !important;
    }

    .article-toc a {
        font-size: 0.9rem !important;
    }

    /* Article headers */
    .article-header h1 {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }

    .article-meta {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    /* Article content */
    .article-content h2 {
        font-size: 1.4rem !important;
        margin-top: 30px !important;
    }

    .article-content h3 {
        font-size: 1.2rem !important;
    }

    .article-content p {
        font-size: 1rem !important;
        line-height: 1.7 !important;
    }

    .article-content ul,
    .article-content ol {
        padding-left: 20px !important;
    }

    .article-content li {
        margin-bottom: 8px !important;
    }

    /* Blockquotes */
    blockquote,
    .story-quote {
        padding: 15px 20px !important;
        margin: 20px 0 !important;
        font-size: 1rem !important;
    }

    /* Code blocks */
    pre, code {
        font-size: 0.85rem !important;
        padding: 15px !important;
        overflow-x: auto !important;
    }

    /* Key takeaways */
    .key-takeaways-box,
    .takeaways-box {
        padding: 20px 15px !important;
    }

    /* Related articles */
    .related-articles {
        grid-template-columns: 1fr !important;
    }
}

/* ============================================
   CALCULATOR SPECIFIC RESPONSIVE
   (SIP, FD, PPF, Home Loan, etc.)
   ============================================ */

/* Tablet breakpoint */
@media (max-width: 992px) {
    .calculator-container {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .input-panel,
    .results-panel {
        padding: 30px !important;
    }

    .chart-container {
        width: 250px !important;
        height: 250px !important;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    /* Calculator Hero */
    .calc-hero {
        padding: 120px 16px 40px !important;
    }

    .calc-hero h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    .calc-hero p {
        font-size: 1rem !important;
    }

    /* Calculator Section */
    .calculator-section {
        padding: 40px 16px 60px !important;
    }

    .calculator-container {
        gap: 25px !important;
    }

    /* Input & Results Panels */
    .input-panel,
    .results-panel {
        padding: 25px 20px !important;
        border-radius: 18px !important;
    }

    .panel-title {
        font-size: 1.2rem !important;
        margin-bottom: 25px !important;
        gap: 10px !important;
    }

    .panel-title i {
        padding: 10px !important;
        border-radius: 10px !important;
        font-size: 1rem !important;
    }

    /* Input Groups */
    .input-group {
        margin-bottom: 28px !important;
    }

    .input-label span {
        font-size: 0.9rem !important;
    }

    .input-value {
        font-size: 1.15rem !important;
    }

    /* Sliders */
    input[type="range"] {
        height: 8px !important;
    }

    input[type="range"]::-webkit-slider-thumb {
        width: 24px !important;
        height: 24px !important;
    }

    input[type="range"]::-moz-range-thumb {
        width: 24px !important;
        height: 24px !important;
    }

    .slider-labels {
        font-size: 0.75rem !important;
    }

    /* Quick Amounts */
    .quick-amounts {
        gap: 8px !important;
    }

    .quick-btn {
        padding: 7px 14px !important;
        font-size: 0.8rem !important;
    }

    /* Number/Text Inputs */
    input[type="number"],
    input[type="text"] {
        font-size: 16px !important;
        padding: 14px !important;
        border-radius: 10px !important;
    }

    /* Select dropdowns */
    select {
        font-size: 16px !important;
        padding: 14px !important;
        border-radius: 10px !important;
    }

    /* Chart Container */
    .chart-container {
        width: 220px !important;
        height: 220px !important;
        margin: 0 auto 25px !important;
    }

    .chart-center .label {
        font-size: 0.8rem !important;
    }

    .chart-center .amount {
        font-size: 1.4rem !important;
    }

    .chart-center .returns-percent {
        padding: 5px 12px !important;
        font-size: 0.8rem !important;
    }

    /* Results Breakdown */
    .results-breakdown {
        gap: 12px !important;
    }

    .result-item {
        padding: 15px !important;
        border-radius: 12px !important;
    }

    .result-item .label {
        font-size: 0.85rem !important;
    }

    .result-item .value {
        font-size: 1.1rem !important;
    }

    /* Comparison Tables */
    .comparison-table {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .comparison-table table {
        min-width: 500px !important;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 12px 10px !important;
        font-size: 0.85rem !important;
    }

    /* Year by Year Breakdown */
    .yearly-breakdown {
        max-height: 300px !important;
        overflow-y: auto !important;
    }

    .yearly-breakdown .year-item {
        padding: 12px !important;
    }

    /* Info/Tips Cards */
    .info-card,
    .tip-card {
        padding: 20px !important;
        border-radius: 14px !important;
    }

    .info-card h3,
    .tip-card h3 {
        font-size: 1rem !important;
    }

    .info-card p,
    .tip-card p {
        font-size: 0.9rem !important;
    }
}

/* Small Mobile breakpoint */
@media (max-width: 480px) {
    .calc-hero h1 {
        font-size: 1.7rem !important;
    }

    .calc-hero p {
        font-size: 0.9rem !important;
    }

    .input-panel,
    .results-panel {
        padding: 20px 15px !important;
    }

    .panel-title {
        font-size: 1.1rem !important;
    }

    .input-value {
        font-size: 1.05rem !important;
    }

    .chart-container {
        width: 180px !important;
        height: 180px !important;
    }

    .chart-center .amount {
        font-size: 1.2rem !important;
    }

    .quick-amounts {
        justify-content: center !important;
    }

    .quick-btn {
        flex: 1 1 calc(50% - 4px) !important;
        text-align: center !important;
    }
}

/* ============================================
   TOOLS PAGE RESPONSIVE
   ============================================ */

/* Tablet breakpoint */
@media (max-width: 992px) {
    .tools-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
    }

    .calc-grid {
        grid-template-columns: 1fr !important;
    }

    .dashboard-grid {
        grid-template-columns: repeat(6, 1fr) !important;
    }

    .tool-card[style*="span 2"] {
        grid-column: span 1 !important;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    /* Tools Page Header */
    .tools-header {
        padding: 80px 16px 30px !important;
    }

    .tools-header h1 {
        font-size: 1.75rem !important;
    }

    .tools-header p {
        font-size: 0.95rem !important;
    }

    /* Tools Container */
    .tools-container,
    .pulse-container {
        padding: 30px 16px 60px !important;
    }

    /* Tools Grid - Single Column */
    .tools-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    /* Tool Card */
    .tool-card {
        padding: 20px !important;
        border-radius: 14px !important;
    }

    .tool-card:hover {
        transform: translateY(-4px) !important;
    }

    /* Tool Icon */
    .tool-icon {
        width: 50px !important;
        height: 50px !important;
        font-size: 1.4rem !important;
        border-radius: 12px !important;
        margin-bottom: 15px !important;
    }

    /* Tool Header */
    .tool-header {
        gap: 15px !important;
        margin-bottom: 15px !important;
        flex-wrap: wrap !important;
    }

    /* Tool Title */
    .tool-title {
        flex: 1 1 auto !important;
    }

    .tool-title h3,
    .tool-card h3 {
        font-size: 1.05rem !important;
        margin-bottom: 5px !important;
    }

    /* Tool Description */
    .tool-description,
    .tool-card p {
        font-size: 0.85rem !important;
        line-height: 1.5 !important;
        margin-bottom: 15px !important;
    }

    /* Tool Badge */
    .tool-badge,
    .tool-tag {
        padding: 3px 8px !important;
        font-size: 0.6rem !important;
        border-radius: 15px !important;
    }

    /* Tool Footer */
    .tool-footer {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: stretch !important;
    }

    .tool-stats {
        flex-wrap: wrap !important;
        gap: 12px !important;
        justify-content: flex-start !important;
        font-size: 0.8rem !important;
    }

    .tool-cta {
        width: 100% !important;
        justify-content: center !important;
        padding: 12px 20px !important;
        font-size: 0.85rem !important;
    }

    /* Tool Link */
    .tool-link {
        font-size: 0.8rem !important;
    }

    /* Calculator Section */
    .calculator-section {
        padding: 25px 15px !important;
        border-radius: 16px !important;
        margin-top: 30px !important;
    }

    .calc-grid {
        gap: 20px !important;
    }

    .calc-box {
        padding: 20px 15px !important;
        border-radius: 12px !important;
    }

    .calc-box h4 {
        font-size: 0.95rem !important;
    }

    .calc-input-group label {
        font-size: 0.8rem !important;
    }

    .calc-input-group input {
        padding: 12px !important;
        font-size: 1rem !important;
    }

    .calc-btn {
        padding: 14px !important;
        font-size: 0.9rem !important;
    }

    .calc-result {
        padding: 15px !important;
    }

    .calc-result span {
        font-size: 1.3rem !important;
    }

    /* Category Title */
    .category-title {
        font-size: 1.1rem !important;
        margin-bottom: 20px !important;
    }

    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 8px !important;
    }

    .stat-item {
        padding: 8px !important;
    }

    .stat-item .stat-value {
        font-size: 1rem !important;
    }

    .stat-item .stat-label {
        font-size: 0.65rem !important;
    }

    /* Insight Box */
    .insight-box {
        padding: 20px 15px !important;
    }

    .insight-message {
        padding: 10px 12px !important;
        font-size: 0.8rem !important;
    }

    /* Progress Bar */
    .progress-bar-container {
        height: 6px !important;
    }

    /* Dashboard Grid (Market Pulse) */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .dashboard-grid .card {
        grid-column: span 1 !important;
    }

    .card {
        padding: 20px !important;
        border-radius: 14px !important;
    }

    .card-header {
        font-size: 0.9rem !important;
        margin-bottom: 15px !important;
    }

    /* Pulse Header */
    .pulse-header {
        padding: 80px 16px 30px !important;
    }

    .pulse-header h1 {
        font-size: 1.75rem !important;
    }

    .pulse-header p {
        font-size: 0.95rem !important;
    }

    .live-badge {
        padding: 5px 12px !important;
        font-size: 0.75rem !important;
    }

    /* Back Button */
    .back-btn {
        top: 15px !important;
        left: 15px !important;
        padding: 8px 15px !important;
        font-size: 0.8rem !important;
    }

    /* Tools Footer */
    .tools-footer {
        padding: 30px 15px !important;
        margin-top: 40px !important;
    }

    .tools-footer p {
        font-size: 0.85rem !important;
    }
}

/* Small Mobile breakpoint */
@media (max-width: 480px) {
    /* Tools Header */
    .tools-header h1,
    .pulse-header h1 {
        font-size: 1.5rem !important;
    }

    .tools-header p,
    .pulse-header p {
        font-size: 0.9rem !important;
    }

    /* Tool Card */
    .tool-card {
        padding: 18px !important;
    }

    .tool-icon {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.25rem !important;
    }

    .tool-title h3,
    .tool-card h3 {
        font-size: 1rem !important;
    }

    .tool-card p {
        font-size: 0.82rem !important;
    }

    /* Stats Grid - single column on very small screens */
    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Calculator */
    .calc-box {
        padding: 15px 12px !important;
    }

    .calc-result span {
        font-size: 1.2rem !important;
    }

    /* Back Button - icon only */
    .back-btn span {
        display: none !important;
    }

    .back-btn {
        padding: 10px !important;
        border-radius: 50% !important;
        width: 40px !important;
        height: 40px !important;
        justify-content: center !important;
    }
}

/* ============================================
   VIRAL REACH TOOLKIT RESPONSIVE
   (Modals, P&L Cards, Forms)
   ============================================ */

/* Tablet breakpoint */
@media (max-width: 992px) {
    .pnl-stats {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 15px !important;
    }

    .form-row {
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    /* Modal */
    .modal-overlay {
        padding: 10px !important;
        align-items: flex-start !important;
        padding-top: 60px !important;
    }

    .modal {
        border-radius: 20px !important;
        max-height: 85vh !important;
    }

    .modal-header {
        padding: 20px !important;
        flex-wrap: wrap !important;
        gap: 15px !important;
    }

    .modal-header h2 {
        font-size: 1.3rem !important;
        flex: 1 1 100% !important;
        order: 2 !important;
    }

    .modal-close {
        order: 1 !important;
        position: absolute !important;
        right: 15px !important;
        top: 15px !important;
        width: 36px !important;
        height: 36px !important;
    }

    .modal-body {
        padding: 20px !important;
    }

    /* Form Styles */
    .form-group {
        margin-bottom: 20px !important;
    }

    .form-group label {
        font-size: 0.9rem !important;
        margin-bottom: 8px !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 16px !important;
        font-size: 16px !important;
        border-radius: 10px !important;
    }

    .form-row {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    /* P&L Card Preview */
    .pnl-preview {
        padding: 20px !important;
        border-radius: 16px !important;
        margin: 20px 0 !important;
    }

    .pnl-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
        margin-bottom: 20px !important;
    }

    .pnl-user {
        gap: 12px !important;
    }

    .pnl-avatar {
        width: 45px !important;
        height: 45px !important;
        font-size: 1.2rem !important;
    }

    .pnl-username {
        font-size: 1rem !important;
    }

    .pnl-date {
        font-size: 0.8rem !important;
    }

    .pnl-logo {
        font-size: 0.85rem !important;
    }

    /* P&L Stats - Stack on mobile */
    .pnl-stats {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }

    .pnl-stat {
        padding: 15px !important;
        border-radius: 12px !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        text-align: left !important;
    }

    .pnl-stat-value {
        font-size: 1.4rem !important;
    }

    .pnl-stat-label {
        font-size: 0.75rem !important;
        margin-top: 0 !important;
    }

    .pnl-footer {
        flex-direction: column !important;
        gap: 10px !important;
        text-align: center !important;
        padding-top: 15px !important;
    }

    .pnl-tagline {
        font-size: 0.8rem !important;
    }

    .pnl-watermark {
        font-size: 0.85rem !important;
    }

    /* Tool Button */
    .tool-btn {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px 24px !important;
        font-size: 0.9rem !important;
    }

    /* Viral Badge */
    .viral-badge {
        padding: 5px 12px !important;
        font-size: 0.7rem !important;
    }

    /* Share Buttons in Toolkit */
    .share-buttons {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .share-buttons .tool-btn,
    .share-buttons button {
        width: 100% !important;
    }
}

/* Small Mobile breakpoint */
@media (max-width: 480px) {
    .modal-header h2 {
        font-size: 1.15rem !important;
    }

    .modal-body {
        padding: 15px !important;
    }

    .pnl-preview {
        padding: 15px !important;
    }

    .pnl-stat-value {
        font-size: 1.2rem !important;
    }

    .pnl-stat {
        padding: 12px !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px !important;
    }
}

/* ============================================
   MARKET PULSE TOOL RESPONSIVE
   ============================================ */

/* Tablet breakpoint */
@media (max-width: 992px) {
    .dashboard-grid {
        grid-template-columns: repeat(6, 1fr) !important;
    }

    .session-card,
    .fear-greed-card,
    .volatility-card {
        grid-column: span 6 !important;
    }

    .setup-card,
    .analysis-card {
        grid-column: span 3 !important;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    /* Dashboard Grid - single column */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }

    .dashboard-grid .card,
    .session-card,
    .fear-greed-card,
    .volatility-card,
    .setup-card,
    .analysis-card {
        grid-column: span 1 !important;
    }

    /* Card Styling */
    .card {
        padding: 20px !important;
        border-radius: 16px !important;
    }

    .card-header {
        flex-wrap: wrap !important;
        gap: 10px !important;
        margin-bottom: 15px !important;
    }

    .card-title {
        font-size: 0.8rem !important;
    }

    /* Session Timer */
    .session-status {
        padding: 15px 0 !important;
    }

    .session-name {
        font-size: 1.2rem !important;
    }

    .session-time {
        font-size: 2rem !important;
        margin: 10px 0 !important;
    }

    .session-phases {
        justify-content: center !important;
        gap: 6px !important;
    }

    .phase-tag {
        padding: 5px 10px !important;
        font-size: 0.7rem !important;
    }

    /* Fear & Greed Meter */
    .meter-container {
        width: 160px !important;
        height: 80px !important;
        margin: 15px auto !important;
    }

    .meter-bg {
        width: 160px !important;
        height: 80px !important;
    }

    .meter-bg::after {
        width: 110px !important;
        height: 55px !important;
    }

    .meter-needle {
        height: 65px !important;
    }

    .meter-score {
        font-size: 2rem !important;
    }

    .meter-label {
        font-size: 0.9rem !important;
    }

    .meter-scale {
        font-size: 0.65rem !important;
    }

    /* Volatility Bars */
    .vol-meter {
        height: 50px !important;
        gap: 3px !important;
    }

    .vol-bar {
        width: 15px !important;
    }

    /* Live Badge */
    .live-badge {
        padding: 5px 12px !important;
        font-size: 0.75rem !important;
    }

    .live-dot {
        width: 6px !important;
        height: 6px !important;
    }

    /* Setup/Analysis Cards */
    .setup-form input,
    .setup-form select {
        padding: 12px !important;
        font-size: 16px !important;
    }

    .setup-result {
        padding: 15px !important;
        font-size: 0.9rem !important;
    }

    /* Multi-timeframe Analysis */
    .timeframe-tabs {
        flex-wrap: wrap !important;
        gap: 6px !important;
    }

    .timeframe-tab {
        padding: 8px 14px !important;
        font-size: 0.8rem !important;
    }

    /* Signal Indicators */
    .signal-indicator {
        padding: 10px !important;
        font-size: 0.85rem !important;
    }

    .signal-strength {
        height: 6px !important;
    }
}

/* Small Mobile breakpoint */
@media (max-width: 480px) {
    .session-time {
        font-size: 1.6rem !important;
    }

    .session-name {
        font-size: 1.1rem !important;
    }

    .meter-container {
        width: 140px !important;
        height: 70px !important;
    }

    .meter-bg {
        width: 140px !important;
        height: 70px !important;
    }

    .meter-bg::after {
        width: 95px !important;
        height: 48px !important;
    }

    .meter-needle {
        height: 55px !important;
    }

    .meter-score {
        font-size: 1.6rem !important;
    }
}

/* ============================================
   COMMUNITY PAGE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .community-card,
    .member-card {
        padding: 20px !important;
    }

    .community-stats {
        flex-direction: column !important;
        gap: 15px !important;
    }

    .community-stat {
        width: 100% !important;
    }
}

/* ============================================
   VIRAL TOOLS RESPONSIVE
   ============================================ */

/* Tablet breakpoint */
@media (max-width: 992px) {
    .stats-bar {
        gap: 40px !important;
        padding: 25px !important;
    }

    .hero h1 {
        font-size: 3rem !important;
    }

    .category-tabs {
        gap: 10px !important;
    }

    .category-tab {
        padding: 10px 20px !important;
        font-size: 0.85rem !important;
    }

    .cta-section {
        padding: 40px 30px !important;
    }

    .cta-section h2 {
        font-size: 2rem !important;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    /* Hero Section */
    .hero {
        padding: 40px 0 !important;
    }

    .hero h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    .hero p {
        font-size: 1rem !important;
        padding: 0 10px !important;
    }

    .hero-badge {
        padding: 8px 18px !important;
        font-size: 0.85rem !important;
        margin-bottom: 20px !important;
    }

    /* Stats Bar */
    .stats-bar {
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 20px !important;
        padding: 20px !important;
        border-radius: 16px !important;
        margin: 30px 0 !important;
    }

    .stat-item {
        flex: 1 1 45% !important;
        min-width: 120px !important;
    }

    .stat-number {
        font-size: 1.75rem !important;
    }

    .stat-label {
        font-size: 0.8rem !important;
    }

    /* Category Tabs */
    .category-tabs {
        flex-wrap: wrap !important;
        gap: 8px !important;
        margin-bottom: 30px !important;
        padding: 0 10px !important;
    }

    .category-tab {
        padding: 8px 16px !important;
        font-size: 0.8rem !important;
        border-radius: 20px !important;
    }

    /* Viral Tool Card */
    .viral-tool-card {
        padding: 20px !important;
        border-radius: 16px !important;
    }

    /* Generator Form */
    .generator-form {
        padding: 20px 15px !important;
        border-radius: 12px !important;
    }

    .generator-form input,
    .generator-form select,
    .generator-form textarea {
        font-size: 16px !important;
        padding: 12px !important;
    }

    /* Generator Output */
    .generator-output {
        padding: 15px !important;
        border-radius: 12px !important;
    }

    /* Copy Button */
    .copy-btn {
        width: 100% !important;
        margin-top: 10px !important;
        padding: 12px !important;
    }

    /* CTA Section */
    .cta-section {
        margin-top: 50px !important;
        padding: 40px 20px !important;
        border-radius: 20px !important;
    }

    .cta-section h2 {
        font-size: 1.5rem !important;
        margin-bottom: 15px !important;
    }

    .cta-section p {
        font-size: 0.95rem !important;
        margin-bottom: 25px !important;
    }

    .cta-buttons {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .cta-btn {
        width: 100% !important;
        padding: 15px 30px !important;
        font-size: 0.9rem !important;
        justify-content: center !important;
    }

    /* Container */
    .container {
        padding: 80px 15px 40px !important;
    }

    /* Navbar adjustments for viral hub */
    .nav-links {
        display: none !important;
    }

    .nav-container {
        padding: 0 15px !important;
    }

    .logo-text {
        font-size: 1.1rem !important;
    }

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

    /* Footer */
    .footer {
        margin-top: 50px !important;
        padding: 30px 15px !important;
    }

    .footer p {
        font-size: 0.85rem !important;
    }
}

/* Small Mobile breakpoint */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.75rem !important;
    }

    .hero p {
        font-size: 0.9rem !important;
    }

    .stats-bar {
        gap: 15px !important;
        padding: 15px !important;
    }

    .stat-item {
        flex: 1 1 40% !important;
    }

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

    .stat-label {
        font-size: 0.75rem !important;
    }

    .category-tab {
        padding: 6px 12px !important;
        font-size: 0.75rem !important;
    }

    .cta-section h2 {
        font-size: 1.3rem !important;
    }
}

/* ============================================
   GAME/QUIZ PAGES RESPONSIVE
   (Trader IQ Challenge, Compare Stats, etc.)
   ============================================ */

/* Tablet breakpoint */
@media (max-width: 992px) {
    .game-container,
    .quiz-container {
        padding: 30px 25px !important;
        max-width: 100% !important;
    }

    .form-grid,
    .comparison-grid {
        grid-template-columns: 1fr !important;
    }

    .form-group.full-width {
        grid-column: span 1 !important;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    /* Container */
    .game-container,
    .quiz-container,
    .container {
        padding: 80px 15px 40px !important;
    }

    /* Start Screen */
    .start-screen {
        padding: 40px 15px !important;
    }

    .start-screen h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
    }

    .start-screen p {
        font-size: 1rem !important;
        margin-bottom: 30px !important;
    }

    .iq-icon {
        font-size: 4rem !important;
        margin-bottom: 20px !important;
    }

    /* Difficulty Selector */
    .difficulty-selector {
        flex-direction: column !important;
        gap: 12px !important;
    }

    .difficulty-btn {
        padding: 15px 25px !important;
        border-radius: 12px !important;
    }

    .difficulty-btn .icon {
        font-size: 1.3rem !important;
    }

    /* Start Button */
    .start-btn {
        padding: 16px 40px !important;
        font-size: 1rem !important;
        width: 100% !important;
        justify-content: center !important;
    }

    /* Stats Preview */
    .stats-preview {
        gap: 25px !important;
        margin-top: 35px !important;
    }

    .stat-value {
        font-size: 1.5rem !important;
    }

    .stat-label {
        font-size: 0.8rem !important;
    }

    /* Quiz Header */
    .quiz-header {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 15px !important;
        border-radius: 15px !important;
    }

    .progress-info {
        width: 100% !important;
        justify-content: space-between !important;
    }

    .question-counter {
        font-size: 1rem !important;
    }

    /* Question Text */
    .question-text {
        font-size: 1.1rem !important;
        line-height: 1.5 !important;
        margin-bottom: 20px !important;
    }

    /* Answer Options */
    .answer-option {
        padding: 15px !important;
        font-size: 0.95rem !important;
        border-radius: 12px !important;
        margin-bottom: 10px !important;
    }

    .score-display {
        font-size: 1.5rem !important;
    }

    .game-controls {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .game-btn {
        width: 100% !important;
        padding: 14px !important;
        font-size: 0.9rem !important;
    }

    /* Quiz progress */
    .quiz-progress,
    .game-progress {
        padding: 10px 15px !important;
        margin-bottom: 20px !important;
    }

    .progress-bar-container {
        height: 8px !important;
    }

    /* Timer */
    .timer,
    .game-timer {
        font-size: 1.2rem !important;
        padding: 10px 20px !important;
    }

    /* Header for Compare Stats */
    .header {
        margin-bottom: 35px !important;
    }

    .header-icon {
        font-size: 3rem !important;
    }

    .header h1 {
        font-size: 1.8rem !important;
    }

    .header p {
        font-size: 1rem !important;
    }

    /* Form Card */
    .form-card {
        padding: 30px 20px !important;
        border-radius: 20px !important;
        margin-bottom: 25px !important;
    }

    .form-title {
        font-size: 1.2rem !important;
        margin-bottom: 30px !important;
    }

    .form-grid {
        gap: 20px !important;
    }

    .form-group label {
        font-size: 0.9rem !important;
        margin-bottom: 8px !important;
    }

    .form-group input,
    .form-group select {
        padding: 15px !important;
        font-size: 16px !important;
        border-radius: 12px !important;
    }

    .form-group .hint {
        font-size: 0.75rem !important;
    }

    .submit-btn {
        padding: 16px !important;
        font-size: 1rem !important;
        border-radius: 12px !important;
        margin-top: 25px !important;
    }

    /* Results Section */
    .results-card {
        padding: 35px 20px !important;
        border-radius: 20px !important;
    }

    .rank-badge {
        padding: 12px 30px !important;
        font-size: 1.2rem !important;
        margin-bottom: 25px !important;
    }

    .overall-percentile {
        font-size: 3.5rem !important;
    }

    .percentile-label {
        font-size: 1.1rem !important;
        margin-bottom: 30px !important;
    }

    .comparison-grid {
        gap: 15px !important;
        margin-bottom: 30px !important;
    }

    .comparison-item {
        padding: 20px !important;
        border-radius: 15px !important;
    }

    .comparison-header {
        flex-wrap: wrap !important;
        gap: 8px !important;
    }

    .comparison-label {
        font-size: 0.85rem !important;
    }

    .comparison-status {
        padding: 4px 10px !important;
        font-size: 0.75rem !important;
    }

    /* Score/Results */
    .result-card,
    .score-card {
        padding: 25px 20px !important;
        border-radius: 16px !important;
    }

    .result-title {
        font-size: 1.5rem !important;
    }

    .result-score {
        font-size: 2.5rem !important;
    }

    /* Share buttons */
    .share-section {
        flex-direction: column !important;
        gap: 10px !important;
    }

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

/* Small Mobile breakpoint */
@media (max-width: 480px) {
    .start-screen h1 {
        font-size: 1.7rem !important;
    }

    .iq-icon {
        font-size: 3rem !important;
    }

    .question-text {
        font-size: 1rem !important;
    }

    .answer-option {
        padding: 12px !important;
        font-size: 0.9rem !important;
    }

    .timer,
    .game-timer {
        font-size: 1rem !important;
        padding: 8px 15px !important;
    }

    .result-score {
        font-size: 2rem !important;
    }

    .overall-percentile {
        font-size: 2.8rem !important;
    }

    .rank-badge {
        padding: 10px 25px !important;
        font-size: 1rem !important;
    }

    .form-card {
        padding: 25px 15px !important;
    }

    .comparison-item {
        padding: 15px !important;
    }

    .header h1 {
        font-size: 1.5rem !important;
    }
}

/* ============================================
   30 DAY CHALLENGE RESPONSIVE
   ============================================ */

/* Tablet breakpoint */
@media (max-width: 992px) {
    .challenge-calendar {
        grid-template-columns: repeat(6, 1fr) !important;
    }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
    /* Challenge Header */
    .challenge-header {
        padding: 20px 15px !important;
    }

    .challenge-header h1 {
        font-size: 1.5rem !important;
    }

    /* Calendar */
    .challenge-calendar {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 8px !important;
        padding: 15px !important;
    }

    .day-card {
        padding: 10px 5px !important;
        font-size: 0.8rem !important;
        border-radius: 8px !important;
    }

    .day-card .day-number {
        font-size: 1rem !important;
    }

    .day-card .day-label {
        font-size: 0.65rem !important;
    }

    /* Challenge Progress */
    .challenge-progress {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 20px 15px !important;
    }

    .progress-stat {
        width: 100% !important;
        text-align: center !important;
    }

    /* Challenge Actions */
    .challenge-actions {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .challenge-btn {
        width: 100% !important;
    }

    /* Streak Badge */
    .streak-badge {
        padding: 15px !important;
        font-size: 0.9rem !important;
    }

    .streak-count {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    .challenge-calendar {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
    }

    .day-card {
        padding: 8px 4px !important;
        font-size: 0.75rem !important;
    }

    .day-card .day-number {
        font-size: 0.9rem !important;
    }
}

/* ============================================
   FIX COMMON OVERFLOW ISSUES
   ============================================ */
.nav-container,
.container,
.section-container,
.calculator-section,
.content-wrapper {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* Fix for long words */
p, h1, h2, h3, h4, h5, h6, li, td, th, a, span {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
}

/* Fix horizontal scroll on canvas/charts */
canvas {
    max-width: 100% !important;
}

/* SVG responsive */
svg {
    max-width: 100% !important;
    height: auto !important;
}

/* ============================================
   ARTICLE PAGE NAVIGATION RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .article-nav {
        padding: 10px 0 !important;
    }

    .article-nav-container {
        padding: 0 15px !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

    .back-link span {
        display: none !important;
    }

    .back-link i {
        font-size: 1.2rem !important;
    }

    .article-nav-center {
        flex: 1 1 100% !important;
        order: 3 !important;
        justify-content: center !important;
        margin-top: 5px !important;
    }

    .nav-logo-small {
        width: 30px !important;
        height: 30px !important;
    }

    .article-category-nav {
        font-size: 0.8rem !important;
    }

    .article-hero-content {
        padding: 0 15px !important;
    }

    .article-main-title {
        font-size: 1.75rem !important;
        line-height: 1.3 !important;
    }

    .article-subtitle {
        font-size: 1rem !important;
    }

    .article-hero-stats {
        flex-wrap: wrap !important;
        gap: 15px !important;
        justify-content: center !important;
    }

    .hero-stat {
        min-width: 80px !important;
    }

    .hero-stat-arrow {
        display: none !important;
    }

    .info-cards-grid {
        grid-template-columns: 1fr !important;
    }

    .info-card {
        padding: 20px !important;
    }

    .chapter-number {
        font-size: 3rem !important;
    }

    .chapter-title {
        font-size: 1.4rem !important;
    }

    .article-quote {
        padding: 20px !important;
        margin: 25px 0 !important;
    }

    .article-quote p {
        font-size: 1rem !important;
    }
}

@media (max-width: 576px) {
    .article-main-title {
        font-size: 1.5rem !important;
    }

    .article-meta-top {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: flex-start !important;
    }

    .article-category-badge,
    .article-read-time {
        font-size: 0.75rem !important;
    }

    .hero-stat .stat-value {
        font-size: 1.5rem !important;
    }

    .hero-stat .stat-label {
        font-size: 0.7rem !important;
    }
}

/* ============================================
   ZERODHA VS GROWW COMPARISON PAGE RESPONSIVE
   Battle Arena, Versus Cards, Scorecard, etc.
   ============================================ */

/* Tablet and below */
@media (max-width: 768px) {
    /* Battle Arena container */
    .battle-arena {
        padding: 2rem 1rem !important;
        margin: 2rem 0 !important;
        border-radius: 16px !important;
    }

    .battle-header h2 {
        font-size: 1.4rem !important;
    }

    .round-badge {
        padding: 0.4rem 1rem !important;
        font-size: 0.75rem !important;
        letter-spacing: 1px !important;
    }

    /* Versus container - stack vertically */
    .versus-container {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* VS Circle centered between cards */
    .vs-circle {
        width: 50px !important;
        height: 50px !important;
        font-size: 0.9rem !important;
        margin: 0.5rem auto !important;
        order: 2 !important;
    }

    /* Fighter cards */
    .fighter-card {
        padding: 1.5rem !important;
        border-radius: 12px !important;
    }

    .fighter-card.zerodha {
        order: 1 !important;
    }

    .fighter-card.groww {
        order: 3 !important;
    }

    .fighter-name {
        font-size: 1.3rem !important;
    }

    .fighter-stat {
        font-size: 1.6rem !important;
        margin: 0.75rem 0 !important;
    }

    .fighter-tagline {
        font-size: 0.85rem !important;
    }

    /* Winner/Draw badges */
    .winner-badge,
    .draw-badge {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.7rem !important;
        top: -8px !important;
        right: -5px !important;
    }

    /* Tale of the Tape */
    .tale-tape {
        padding: 1rem !important;
        border-radius: 12px !important;
    }

    .tape-row {
        grid-template-columns: 1fr !important;
        gap: 0.5rem !important;
        padding: 0.75rem 0 !important;
        text-align: center !important;
    }

    .tape-zerodha,
    .tape-groww {
        padding: 0.6rem !important;
        border-radius: 8px !important;
        font-size: 0.9rem !important;
    }

    .tape-category {
        font-size: 0.75rem !important;
        padding: 0.3rem 0 !important;
        order: -1 !important;
    }

    /* Feature Battle Grid */
    .feature-battle {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .feature-card {
        padding: 1.25rem !important;
        border-radius: 12px !important;
    }

    .feature-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 1.2rem !important;
    }

    .feature-title {
        font-size: 1rem !important;
    }

    .feature-desc {
        font-size: 0.9rem !important;
    }

    /* Scorecard */
    .scorecard {
        padding: 1.5rem 1rem !important;
        border-radius: 16px !important;
    }

    .scorecard-header h2 {
        font-size: 1.5rem !important;
    }

    .score-row {
        grid-template-columns: 40px 1fr 40px !important;
        gap: 0.5rem !important;
        padding: 0.75rem 0 !important;
    }

    .score-category {
        font-size: 0.8rem !important;
        text-align: center !important;
    }

    .score-points {
        font-size: 0.9rem !important;
    }

    /* Final Scores Display */
    .final-scores {
        gap: 0.75rem !important;
        padding-top: 1rem !important;
        flex-wrap: wrap !important;
    }

    .final-score-item {
        min-width: 60px !important;
    }

    .final-score-number {
        font-size: 2rem !important;
    }

    .final-score-label {
        font-size: 0.75rem !important;
    }

    /* Legacy support - Final score display */
    .scorecard > div:last-child {
        flex-direction: row !important;
        gap: 1rem !important;
        padding: 1rem 0 !important;
    }

    .scorecard > div:last-child > div span:first-child {
        font-size: 2rem !important;
    }

    .scorecard > div:last-child > div p {
        font-size: 0.75rem !important;
    }

    /* Personality Grid */
    .personality-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    .personality-card {
        padding: 1.5rem !important;
        border-radius: 12px !important;
    }

    .personality-emoji {
        font-size: 2.5rem !important;
    }

    .personality-type {
        font-size: 1.1rem !important;
    }

    .personality-match-broker {
        font-size: 0.95rem !important;
    }

    .personality-reasons {
        font-size: 0.85rem !important;
    }

    .personality-reasons li {
        margin-bottom: 0.4rem !important;
    }

    /* Knockout Box */
    .knockout-box {
        padding: 2rem 1.5rem !important;
        border-radius: 16px !important;
        margin: 2rem 0 !important;
    }

    .knockout-box::before {
        font-size: 2rem !important;
        top: -18px !important;
    }

    .knockout-title {
        font-size: 1.5rem !important;
    }

    .knockout-box p {
        font-size: 1rem !important;
    }

    /* Key Takeaways */
    .key-takeaways-box {
        padding: 1.5rem !important;
        border-radius: 12px !important;
    }

    .key-takeaways-box h3 {
        font-size: 1.2rem !important;
    }

    .key-takeaways-box li {
        padding: 0.6rem 0 !important;
        font-size: 0.9rem !important;
    }

    /* Article TOC */
    .article-toc {
        padding: 1.25rem !important;
        margin: 1.5rem 0 !important;
    }

    .article-toc::before {
        font-size: 1.5rem !important;
        top: -12px !important;
    }

    .toc-number {
        width: 20px !important;
        height: 20px !important;
        font-size: 10px !important;
    }
}

/* Mobile small screens */
@media (max-width: 480px) {
    /* Battle Arena */
    .battle-arena {
        padding: 1.5rem 0.75rem !important;
    }

    .battle-header h2 {
        font-size: 1.2rem !important;
    }

    /* Fighter Cards */
    .fighter-card {
        padding: 1.25rem 1rem !important;
    }

    .fighter-name {
        font-size: 1.2rem !important;
    }

    .fighter-stat {
        font-size: 1.4rem !important;
    }

    /* VS Circle */
    .vs-circle {
        width: 45px !important;
        height: 45px !important;
        font-size: 0.85rem !important;
    }

    /* Scorecard */
    .score-row {
        grid-template-columns: 30px 1fr 30px !important;
    }

    .score-category {
        font-size: 0.7rem !important;
    }

    /* Final Scores for small screens */
    .final-scores {
        gap: 0.5rem !important;
    }

    .final-score-item {
        min-width: 50px !important;
    }

    .final-score-number {
        font-size: 1.75rem !important;
    }

    .final-score-label {
        font-size: 0.65rem !important;
    }

    .scorecard > div:last-child > div span:first-child {
        font-size: 1.75rem !important;
    }

    /* Personality Cards */
    .personality-card {
        padding: 1.25rem !important;
    }

    .personality-emoji {
        font-size: 2rem !important;
    }

    .personality-type {
        font-size: 1rem !important;
    }

    /* Knockout Box */
    .knockout-box {
        padding: 1.75rem 1rem !important;
    }

    .knockout-title {
        font-size: 1.3rem !important;
    }

    /* Tale of Tape */
    .tape-zerodha,
    .tape-groww {
        font-size: 0.85rem !important;
        padding: 0.5rem !important;
    }

    /* Feature Cards */
    .feature-card {
        padding: 1rem !important;
    }

    .feature-icon {
        width: 36px !important;
        height: 36px !important;
        font-size: 1rem !important;
    }
}
/* ============================================
   NAVIGATION BAR RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .nav-bar {
        padding: 12px 0;
    }

    .nav-container {
        padding: 0 20px;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(13, 13, 13, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        gap: 0;
        padding: 20px;
        border-bottom: 1px solid rgba(201, 162, 39, 0.2);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu li a {
        padding: 15px 20px;
        border-radius: 8px;
        display: block;
    }

    .nav-menu li a:hover {
        background: rgba(201, 162, 39, 0.1);
    }

    .nav-logo {
        font-size: 1.3rem;
    }
}

/* ============================================
   SITE FOOTER RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .site-footer {
        padding: 40px 0 20px;
    }

    .site-footer .footer-container {
        padding: 0 20px;
    }

    /* New centered footer styles */
    .site-footer .footer-content-centered {
        padding-bottom: 30px;
    }

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

    .site-footer .footer-brand-name {
        font-size: 1.5rem;
    }

    .site-footer .footer-tagline {
        font-size: 0.95rem;
        margin: 15px 0 25px;
    }

    .site-footer .footer-link-home {
        font-size: 1rem;
        padding: 10px 25px;
    }

    .site-footer .footer-disclaimer {
        padding-top: 20px;
        margin-top: 20px;
    }

    .site-footer .footer-disclaimer p {
        font-size: 0.8rem;
    }

    /* Old footer styles for backwards compatibility */
    .site-footer .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .site-footer .footer-brand {
        text-align: center;
    }

    .site-footer .footer-brand h3 {
        font-size: 1.5rem;
    }

    .site-footer .footer-links {
        text-align: center;
    }

    .site-footer .footer-links ul li a {
        font-size: 0.9rem;
    }

    .site-footer .footer-bottom {
        padding-top: 20px;
        margin-top: 20px;
    }

    .site-footer .footer-bottom p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .nav-logo {
        font-size: 1.2rem;
    }

    .mobile-menu-btn {
        padding: 6px;
    }

    .mobile-menu-btn span {
        width: 20px;
    }

    .site-footer {
        padding: 30px 0 15px;
    }

    /* New centered footer styles */
    .site-footer .footer-content-centered {
        gap: 20px;
        padding-bottom: 20px;
    }

    .site-footer .footer-logo-section {
        flex-direction: column;
        gap: 10px;
    }

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

    .site-footer .footer-brand-name {
        font-size: 1.3rem;
    }

    .site-footer .footer-tagline {
        font-size: 0.9rem;
    }

    .site-footer .footer-link-home {
        font-size: 0.95rem;
        padding: 10px 20px;
    }

    /* Old footer styles for backwards compatibility */
    .site-footer .footer-content {
        gap: 30px;
    }

    .site-footer .footer-brand h3 {
        font-size: 1.3rem;
    }

    .site-footer .footer-links h4 {
        font-size: 0.9rem;
    }
}