/* Button Font Fix & Global Buttons */
.btn,
.cta-button,
.tool-btn,
button,
input,
textarea {
    font-family: var(--font-family) !important;
}

/* Footer Improvements */
footer {
    margin-top: auto;
    width: 100%;
}

.footer-content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem 2rem;
    color: white;
    background: #0f172a;
    /* Keep it dark */
    border-radius: 20px 20px 0 0;
    margin-top: 4rem;
}

.footer-bottom {
    text-align: center;
    padding: 2rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    background: #0f172a;
}

.dark-mode .footer-content-grid,
.dark-mode .footer-bottom {
    background: #020617;
    /* Even darker in dark mode */
}

/* Chart Page Tool Buttons */
.chart-tools-bar {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    background: var(--white);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--glass-border);
}

.tool-btn {
    padding: 1rem 2rem;
    border: 2px solid var(--primary-light);
    background: var(--white);
    color: var(--text);
    border-radius: 50px;
    font-weight: 900;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.1rem;
    position: relative;
    overflow: hidden;
}

.tool-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--primary-light);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.tool-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(26, 95, 180, 0.2), transparent);
    transition: left 0.5s ease;
}

.tool-btn i {
    color: var(--primary);
    font-size: 1.2rem;
    position: relative;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tool-btn:hover {
    background: var(--primary-light);
    transform: translateY(-3px) scale(1.05);
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(26, 95, 180, 0.3);
}

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

.tool-btn:hover::after {
    left: 100%;
}

.tool-btn:hover i {
    transform: scale(1.3) rotate(10deg);
}

.tool-btn:active {
    transform: translateY(-1px) scale(1.02);
    transition: transform 0.1s ease;
}

.tool-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(26, 95, 180, 0.3);
}

.tool-btn.active::before {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
}

.tool-btn.active i {
    color: white;
    transform: scale(1.2);
}

.dark-mode .tool-btn {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.dark-mode .tool-btn.active {
    background: var(--primary);
}

/* Hero Section */
.hero {
    position: relative;
    height: 90vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    overflow: hidden;
    margin-top: -80px;
    /* Offset fixed header */
}

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

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.8));
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 5;
    color: white;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1.5rem;
}

.hero-title {
    font-size: clamp(3rem, 10vw, 6rem);
    font-weight: 900;
    margin-bottom: 0.2rem;
    color: white;
}

.hero-title span {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
    font-weight: 700;
}

.hero-text-content p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    opacity: 0.8;
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.2rem 2.5rem;
    background: var(--gradient-accent);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 900;
    font-size: 1.2rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 20px rgba(255, 107, 0, 0.3);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

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

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
}

.cta-button i {
    position: relative;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cta-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 35px rgba(255, 107, 0, 0.5);
}

.cta-button:hover::before {
    width: 400px;
    height: 400px;
}

.cta-button:hover::after {
    left: 100%;
}

.cta-button:hover i {
    transform: translateX(-5px) scale(1.2);
}

.cta-button:active {
    transform: translateY(-2px) scale(1.02);
    transition: transform 0.1s ease;
}

/* Dark mode support for CTA button */
.dark-mode .cta-button {
    background: var(--gradient-accent) !important;
    color: white !important;
    box-shadow: 0 10px 20px rgba(255, 107, 0, 0.4) !important;
}

.dark-mode .cta-button:hover {
    box-shadow: 0 15px 35px rgba(255, 107, 0, 0.6) !important;
    background: var(--gradient-accent) !important;
    color: white !important;
}

.dark-mode .cta-button::before {
    background: rgba(255, 255, 255, 0.3) !important;
}

.dark-mode .cta-button::after {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent) !important;
}

/* Ticker */
.ticker-wrap {
    width: 100%;
    background: #0f172a;
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.ticker {
    display: inline-flex;
    animation: tickerLoop 30s linear infinite;
    will-change: transform;
}

.ticker-item {
    display: inline-block;
    padding: 0 2rem;
    color: white;
    font-weight: 700;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.ticker-item span.up {
    color: #10b981;
}

.ticker-item span.down {
    color: #ef4444;
}

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

    100% {
        transform: translateX(100%);
    }
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.news-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.news-header {
    display: flex;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #eee;
}

.news-category {
    padding: 4px 12px;
    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.news-content {
    padding: 1.5rem;
}

.news-title {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.news-summary {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.btn-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Bitcoin Loading */
.bitcoin-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    transition: opacity 0.5s ease;
}

.bitcoin-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.bitcoin-logo-container {
    font-size: 5rem;
    color: #f7931a;
    cursor: pointer;
    transition: transform 0.3s;
}

.bitcoin-logo-container:hover {
    transform: scale(1.1);
}

/* Section Title */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
    margin-top: 4rem;
    /* Add margin after hero/ticker */
}

/* Trust Badge removed - no longer needed */

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

/* Dark Mode Overrides */
.dark-mode .news-card {
    background: #1e293b;
    border-color: rgba(255, 255, 255, 0.1);
}

.dark-mode .news-title {
    color: white;
}

.dark-mode .news-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }

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

    .chart-main-card {
        height: 500px !important;
    }
}

@media (max-width: 768px) {
    .hero {
        height: auto;
        padding: 120px 0 80px;
        margin-top: 0;
    }

    .hero-content {
        text-align: center;
        align-items: center;
        gap: 2rem;
        padding-bottom: 2rem;
    }

    .hero-text-content {
        text-align: center;
        width: 100%;
    }

    .cta-button {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }

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

    .hero-floating-elements {
        display: none;
    }

    .news-grid,
    .brokers-grid {
        grid-template-columns: 1fr !important;
    }

    /* Trust badge removed */

    .hero-content {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
        padding-bottom: 2rem;
    }

    .hero-text-content {
        text-align: center;
        width: 100%;
    }

    .cta-button {
        width: 100%;
        max-width: 100%;
        justify-content: center;
    }

    .hologram-section div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    .hologram-section > .container > div[style*="display: flex"] {
        flex-direction: column;
    }
    
    .hologram-section div[style*="grid-template-columns"] > div:first-child {
        margin-bottom: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .cta-button {
        padding: 1rem 2rem;
        font-size: 1rem;
    }

    .bitcoin-logo-container {
        width: 150px;
        height: 150px;
    }

    .bitcoin-logo {
        font-size: 4.5rem;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }
}

/* --- Floating Elements --- */
.hero-floating-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 3;
}

.floating-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    animation: floatEnhanced 6s ease-in-out infinite;
    transition: var(--transition);
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
}

/* Animations & Hovers */
.news-card,
.broker-card,
.hologram-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease !important;
}

.news-card:hover,
.broker-card:hover,
.hologram-card:hover {
    transform: translateY(-15px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2) !important;
    border-color: var(--primary) !important;
}

.cta-button:hover {
    box-shadow: 0 0 20px var(--primary);
    transform: scale(1.05) translateY(-2px);
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

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

.float-right-1 {
    top: 20%;
    right: 10%;
}

.float-left-1 {
    top: 30%;
    left: 10%;
    animation-delay: 0.5s;
}

.float-left-2 {
    top: 75%;
    left: 12%;
    animation-delay: 2s;
}

@keyframes floatEnhanced {

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

    33% {
        transform: translateY(-20px) rotate(3deg) scale(1.05);
    }

    66% {
        transform: translateY(10px) rotate(-3deg) scale(0.95);
    }
}

#particles-js,
#particles-hologram {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    right: 0;
    z-index: 1;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 50px var(--primary);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 100px var(--primary);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 50px var(--primary);
    }
}