/* ========================================
   MODERN BROKER PLATFORM - ENHANCEMENTS
   Advanced Features & Components
   ======================================== */

/* ===== IMPORT THIS FILE IN YOUR HTML FOR ENHANCED FEATURES ===== */
/* <link rel="stylesheet" href="modern-enhancements.css"> */

/* ===== ADVANCED GRADIENT BACKGROUNDS ===== */
.gradient-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%);
}

.gradient-success {
    background: linear-gradient(135deg, #10b981 0%, #34d399 50%, #6ee7b7 100%);
}

.gradient-dark {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #334155 100%);
}

.gradient-text {
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== GLASSMORPHISM EFFECTS ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.glass-card-dark {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    color: #ffffff;
}

/* ===== PRICE DISPLAY COMPONENTS ===== */
.price-display {
    font-family: 'Roboto Mono', 'Courier New', monospace;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.price-up {
    color: #10b981;
    animation: priceUp 0.3s ease-out;
}

.price-down {
    color: #ef4444;
    animation: priceDown 0.3s ease-out;
}

@keyframes priceUp {
    0% {
        background-color: rgba(16, 185, 129, 0.2);
    }
    100% {
        background-color: transparent;
    }
}

@keyframes priceDown {
    0% {
        background-color: rgba(239, 68, 68, 0.2);
    }
    100% {
        background-color: transparent;
    }
}

/* ===== TRADING STATS CARDS ===== */
.stat-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #2563eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.stat-card-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.stat-card-change {
    display: inline-flex;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
}

.stat-card-change.positive {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.stat-card-change.negative {
    background-color: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* ===== PROGRESS BARS ===== */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 9999px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

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

/* ===== NOTIFICATION BADGES ===== */
.notification-badge {
    position: relative;
}

.notification-badge::after {
    content: attr(data-count);
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    padding: 0 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ===== SKELETON LOADERS ===== */
.skeleton {
    background: linear-gradient(
        90deg,
        #e5e7eb 0%,
        #f3f4f6 50%,
        #e5e7eb 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 0.5rem;
}

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

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

.skeleton-title {
    height: 1.5rem;
    margin-bottom: 1rem;
}

.skeleton-circle {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
}

/* ===== TOOLTIP ===== */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #1f2937;
    color: #ffffff;
    text-align: center;
    border-radius: 0.5rem;
    padding: 0.75rem;
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

.tooltip .tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ===== CHARTS & GRAPHS CONTAINER ===== */
.chart-container {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
}

.chart-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
}

/* ===== TIMELINE COMPONENT ===== */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #2563eb, #3b82f6);
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.625rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2563eb;
    border: 3px solid #ffffff;
    box-shadow: 0 0 0 3px #2563eb;
}

.timeline-content {
    background: #ffffff;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ===== ALERT COMPONENTS ===== */
.alert {
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    animation: slideInDown 0.3s ease-out;
}

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

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border-left: 4px solid #10b981;
    color: #065f46;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
    color: #991b1b;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border-left: 4px solid #3b82f6;
    color: #1e40af;
}

/* ===== DASHBOARD GRID ===== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (min-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1536px) {
    .dashboard-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ===== FLOATING ACTION BUTTON ===== */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 15px 35px rgba(37, 99, 235, 0.5);
}

/* ===== TRADE BUTTON STYLES ===== */
.btn-buy {
    background: linear-gradient(135deg, #10b981, #34d399);
    color: #ffffff;
    font-weight: 700;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-buy:hover {
    background: linear-gradient(135deg, #059669, #10b981);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.btn-sell {
    background: linear-gradient(135deg, #ef4444, #f87171);
    color: #ffffff;
    font-weight: 700;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-sell:hover {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.4);
}

/* ===== MARKET STATUS INDICATOR ===== */
.market-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

.market-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.market-status.open::before {
    background-color: #10b981;
}

.market-status.closed::before {
    background-color: #ef4444;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

/* ===== PRINT STYLES ===== */
@media print {
    .no-print,
    .fab,
    .scroll-to-top {
        display: none !important;
    }

    body {
        background: #ffffff;
    }

    .card,
    .stat-card,
    .chart-container {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }
}

/* ===== TERMS & CONDITIONS PAGE ===== */
body.elementor-page-556 {
    background: radial-gradient(circle at 20% 20%, #13284d 0, rgba(19, 40, 77, 0) 25%), radial-gradient(circle at 80% 0%, #0b1530 0, rgba(11, 21, 48, 0) 20%), #0b1222;
    color: #0f172a;
}

.terms-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 80px;
    color: #0f172a;
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
}

.gradient-broker {
    background: linear-gradient(135deg, #0f1f3a 0%, #13305c 45%, #0f4c81 100%);
}

.tc-hero {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 48px 48px 42px;
    color: #e5edff;
    box-shadow: 0 20px 55px rgba(5, 19, 47, 0.35);
}

.tc-hero::after,
.tc-hero::before {
    content: '';
    position: absolute;
    border-radius: 999px;
    filter: blur(28px);
    opacity: 0.4;
    pointer-events: none;
}

.tc-hero::before {
    width: 280px;
    height: 280px;
    background: rgba(255, 255, 255, 0.12);
    top: -80px;
    right: -60px;
}

.tc-hero::after {
    width: 240px;
    height: 240px;
    background: rgba(82, 180, 255, 0.22);
    bottom: -70px;
    left: -40px;
}

.tc-hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #dbe8ff;
    letter-spacing: 0.02em;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.tc-hero__title {
    font-size: 2.6rem;
    line-height: 1.2;
    margin: 18px 0 12px;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.tc-hero__lede {
    font-size: 1.05rem;
    max-width: 760px;
    color: #e0e9ff;
    margin: 0 0 20px;
}

.tc-hero__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    color: #d0ddff;
}

.tc-meta__item {
    font-weight: 600;
}

.tc-meta__dot {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    display: inline-flex;
}

.tc-hero__cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    background: #fbbf24;
    color: #1f2937;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tc-hero__cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(251, 191, 36, 0.35);
}

.tc-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin: 28px 0 36px;
}

.tc-highlight-card {
    background: #0f172a;
    color: #e5e7eb;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 18px 40px rgba(7, 15, 35, 0.28);
}

.tc-highlight__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.85rem;
    color: #7dd3fc;
    margin: 0 0 6px;
}

.tc-highlight__title {
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.5;
}

.tc-layout {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 24px;
    align-items: start;
}

.tc-nav {
    position: sticky;
    top: 110px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 18px 18px 16px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

.tc-nav__title {
    color: #c7d7ff;
    margin: 0 0 8px;
    letter-spacing: 0.03em;
    font-weight: 700;
}

.tc-nav__list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: grid;
    gap: 8px;
}

.tc-nav__list a {
    display: block;
    padding: 10px 12px;
    border-radius: 12px;
    color: #e5edff;
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
}

.tc-nav__list a:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.tc-nav__note {
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.06);
    color: #c7d7ff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tc-pill {
    display: inline-flex;
    padding: 6px 12px;
    background: rgba(125, 211, 252, 0.18);
    color: #e0f2fe;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.tc-legal {
    background: #ffffff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(9, 16, 29, 0.15);
    border: 1px solid #e5e7eb;
}

.tc-block {
    padding: 18px 0;
    border-bottom: 1px solid #e5e7eb;
}

.tc-block:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.tc-block__heading {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.tc-block__index {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: #ffffff;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

.tc-block h3 {
    margin: 0;
    font-size: 1.4rem;
    letter-spacing: -0.01em;
    color: #0f172a;
}

.tc-block p {
    margin: 0 0 10px;
    color: #1f2937;
    line-height: 1.7;
}

.tc-subsection {
    margin: 10px 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
}

.tc-subsection h4 {
    margin: 0 0 6px;
    color: #0f172a;
}

.tc-subsection p {
    margin: 0;
}

.tc-list {
    list-style: none;
    padding: 0;
    margin: 12px 0 0;
    display: grid;
    gap: 10px;
}

.tc-list li {
    position: relative;
    padding-left: 18px;
    line-height: 1.6;
    color: #111827;
}

.tc-list li::before {
    content: '';
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    left: 0;
    top: 0.55em;
}

@media (max-width: 1024px) {
    .tc-layout {
        grid-template-columns: 1fr;
    }

    .tc-nav {
        position: relative;
        top: auto;
        order: 2;
    }

    .tc-legal {
        order: 1;
    }
}

@media (max-width: 640px) {
    .terms-shell {
        padding: 32px 16px 64px;
    }

    .tc-hero {
        padding: 32px 24px;
    }

    .tc-hero__title {
        font-size: 2.2rem;
    }

    .tc-hero__meta {
        gap: 8px;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-light: #0f172a;
        --white: #1e293b;
        --gray-900: #f9fafb;
        --gray-700: #d1d5db;
    }

    body {
        background-color: #0f172a;
        color: #f9fafb;
    }

    .card,
    .stat-card,
    .chart-container {
        background: #1e293b;
        color: #f9fafb;
    }
}
