/* ==========================================================================
   1. General & Body Styles
   ========================================================================== */
html, body {
    width: 100%;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
}

.card { /* General purpose card */
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    padding: 1rem;
}

/* ==========================================================================
   2. Main Page Layout (Grid, Sidebars, etc.)
   ========================================================================== */
.page-container {
    max-width: 1440px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.8fr 3fr 0.8fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "left-sidebar main-content right-sidebar"
        "bottom-card bottom-card bottom-card";
    gap: 1rem;
    padding: 0.5rem;
    min-height: 100vh;
    box-sizing: border-box;
    align-items: start; 
}

.main-content {
    grid-area: main-content;
}

.left-sidebar {
    grid-area: left-sidebar;
}

.right-sidebar {
    grid-area: right-sidebar;
}

.sidebar-card, .bottom-card {
    background-color: rgb(255, 255, 255);
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
}

.bottom-card {
    grid-area: bottom-card;
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    margin-top: 1rem;
    overflow: hidden;
}

/* ==========================================================================
   3. Session Timeline
   ========================================================================== */
.main-timeline-container {
    display: grid;
    grid-template-columns: 120px 1fr;
    overflow-y: hidden;
}

#timeline-grid {
    position: relative;
    z-index: 10;
    background-color: #fff;
    width: 100%;
    flex-shrink: 0;
    overflow: hidden;
    box-sizing: border-box;
}

#current-time-tracker {
    z-index: 30;
}

#current-time-tracker::after {
    content: '';
    position: absolute;
    left: 50%;
    top: calc(100% - 1px);
    transform: translateX(-50%);
    width: 2px;
    background-color: #c7e0c8;
    height: 500px; 
    z-index: 15; 
    pointer-events: none; 
}

.session-bar-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 0;
    align-items: center;
    padding: 0.5rem 0;
    background-color: #F9FAFB;
    border-radius: 0.25rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: visible;
}

.session-info-column {
    display: flex;
    gap: 0.25rem;
    white-space: nowrap;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding-left: 1rem;
    padding-right: 1rem;
    border-right: 1px solid #e2e8f0;
    width: 120px;
    box-sizing: border-box;
}

.session-bars-column {
    position: relative;
    height: 40px;
    background-color: transparent;
    overflow: visible;
}

.session-bar-segment {
    height: 100%;
    border-radius: 4px;
    position: absolute;
    top: 0;
    z-index: 1;
}
.sydney { background-color: #345dc9; }
.tokyo { background-color: #8B5CF6; }
.london { background-color: #10B981; }
.newyork { background-color: #3B82F6; }

.session-time-line {
    position: absolute;
    top: -40px;
    bottom: -25px; 
    width: 2px;
    background-color: #c7e0c8;
    z-index: 5;
    transform: translateX(-50%);
}

.session-status-label {
    position: absolute;
    top: -24px;
    left: 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    z-index: 2;
}

/* --- Desktop Number Lines & Timeline Bar Area --- */
.number-line-desktop,
#timeline-bar-area {
    width: 100%;
    flex-shrink: 0;
    overflow-x: visible;
}
#timeline-bar-area {
    position: relative;
    height: 40px;
    margin-top: 0;
}
.number-line-desktop {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
}
.number-line-desktop > div {
    flex-grow: 1;
    text-align: center;
}
.number-line-desktop > div:first-child,
.number-line-desktop > div:last-child {
    flex-grow: 0;
    flex-shrink: 0;
    width: auto;
}

/* --- Mobile Timeline Styles --- */
.mobile-content-area-grid {
    display: none;
}
.info-column-placeholder {
    width: 120px;
    visibility: hidden;
    height: 1px;
}
.timeline-track-content-mobile {
    display: flex;
    flex-direction: column;
    width: 100%;
}
.mobile-number-line {
    display: flex;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    justify-content: space-between;
    width: 100%;
    overflow-x: visible;
    flex-wrap: nowrap;
}
.mobile-number-line > div {
    flex-grow: 1; flex-shrink: 1; text-align: center;
    min-width: 0; padding-inline: 2px; white-space: nowrap;
    font-size: 0.65rem; font-weight: bold;
}
.mobile-number-line > div:first-child,
.mobile-number-line > div:last-child {
    flex-grow: 0; flex-shrink: 0; width: auto;
}


/* ==========================================================================
   4. Coupons & Ad Banners
   ========================================================================== */
.coupon-scroll-container {
    display: flex;
    overflow-x: auto;
    padding-bottom: 16px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #d1d5db #f3f4f6;
    scroll-snap-type: x mandatory;
    gap: 16px;
}

.coupon-card {
    width: 280px;
    flex-shrink: 0;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    padding: 16px;
    background-color: #ffffff;
    position: relative;
    scroll-snap-align: start;
}

.coupon-tag {
    position: absolute;
    top: 0;
    padding: 4px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}
.coupon-tag.featured, .coupon-tag.new {
    left: 0;
    border-top-left-radius: 8px;
    border-bottom-right-radius: 8px;
    border-top-right-radius: 0;
    border-bottom-left-radius: 0;
}
.coupon-tag.percentage {
    right: 0;
    border-top-right-radius: 8px;
    border-bottom-left-radius: 8px;
    background-color: #ef4444;
}
.coupon-tag.featured { background-color: #ef4444; }
.coupon-tag.new { background-color: #10b981; }

.coupon-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin: 0 auto 12px auto;
}

.coupon-title {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 8px;
}

.coupon-description {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    margin-bottom: 16px;
}

.coupon-get-code-btn {
    background-color: #10b981;
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
    width: 100%;
    transition: background-color 0.2s ease-in-out;
}
.coupon-get-code-btn:hover {
    background-color: #059669;
}

.ad-banner {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background-image: linear-gradient(to bottom, #201801, #3B82F6);
    padding: 0.5rem 2rem;
    width: 100%;
    height: 70px;
    box-sizing: border-box;
    border-radius: 8px;
    margin-top: 1rem;
}

.ad-links {
    display: flex;
    align-items: center;
    color: white;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 0.8rem;
}

.ad-link-item {
    padding: 0 1.5rem 10px;
    text-align: center;
    line-height: 1.4;
    border-right: 1px solid #2d4b8a;
    position: relative;
}
.ad-link-item:last-child {
    border-right: none;
}

.ad-bonus-new-tag {
    background-color: #E41E26;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.ad-trade-button {
    background-color: #E41E26;
    color: white;
    font-family: Arial, sans-serif;
    font-weight: bold;
    padding: 0.8rem 2rem;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
}

/* ==========================================================================
   5. General Modal Styles
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    margin: auto;
    padding: 0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    width: 90%;
    max-width: 469px;
    max-height: 800px;
    overflow: hidden;
    position: relative;
    animation: fadeIn 0.3s ease-out;
    color: #333;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   6. AI Signal Modal UI
   ========================================================================== */
.signal-container {
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    font-family: sans-serif;
}
.signal-banner {
    width: 100%;
    background-color: #F02F5E; /* Placeholder background */
}
.uploaded-chart-image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
}
.signal-content-body {
    background-color: #1F2937;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 0 1.5rem 1.5rem 1.5rem; /* Padding for centered button */
}
.signal-header {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem 0; /* Vertical padding */
    color: #fff;
    gap: 1rem;
}
.rocket-icon {
    width: 60px;
    height: 60px;
    object-fit: contain;
    flex-shrink: 0;
    margin-right: 10px;
}
.signal-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
}
.signal-item {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}
.signal-icon {
    margin-right: 0.5rem;
    font-size: 1.1em;
    color: #FFD700;
    width: 20px;
    text-align: center;
}
.signal-label {
    font-weight: 500;
    min-width: 100px;
    color: #9CA3AF; /* Light gray for labels */
}
.signal-value {
    font-weight: 600;
    color: #fff; /* White for values */
}
.buy-button-container {
    background-color: #10B981; /* Default green for BUY */
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    position: relative;
    overflow: hidden;
    height: 70px;
    margin-bottom: 0.5rem; /* Spacing between buttons */
}
.buy-button-container.bg-red-600 { background-color: #DC2626; } /* Red for SELL */
.buy-button-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #059669; /* Darker green for BUY circle */
    flex-shrink: 0;
}
.buy-button-container.bg-red-600 .buy-button-circle { background-color: #B91C1C; } /* Darker red for SELL circle */
.buy-button-text {
    font-size: 2.5rem;
    font-weight: bold;
    color: white;
    flex-grow: 1;
    text-align: center;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.buy-button-chart-line {
    width: 80px;
    height: auto;
    object-fit: contain;
    flex-shrink: 0;
    filter: brightness(1.5);
}
.risk-warning {
    font-size: 0.7rem;
    color: #9CA3AF;
    text-align: center;
    padding: 0;
    margin-top: 1rem;
    line-height: 1.4;
}
.trade-real-account-btn {
    width: 100%;
    display: block;
    margin-top: 1rem;
    box-sizing: border-box;
    background-color: #1e8256; /* Green */
    color: white;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}
.trade-real-account-btn:hover {
    background-color: #28a745;
}

/* Helper colors for text */
.text-green-400 { color: #4ade80; }
.text-red-500 { color: #ef4444; }
.text-blue-400 { color: #60a5fa; }

/* ==========================================================================
   7. Miscellaneous & Responsive Overrides
   ========================================================================== */
   /* Add this CSS to your main stylesheet */
    .broker-card {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem;
        border-radius: 0.5rem;
        border-width: 2px;
        transition: all 0.2s ease-in-out;
        background-color: #f9fafb; /* A very light gray background */
    }

    .broker-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        border-color: #6366f1; /* Indigo color on hover */
    }

    .broker-logo {
        width: 40px;
        height: 40px;
        object-fit: contain;
        border-radius: 0.25rem;
    }

    .broker-name {
        font-weight: 600;
        color: #374151; /* Dark gray text */
    }

    .visit-icon {
        color: #9ca3af; /* Medium gray icon */
        transition: color 0.2s ease-in-out;
    }

    .broker-card:hover .visit-icon {
        color: #4f46e5; /* Darker indigo on hover */
    }
    .broker-logo-card {
    background-color: #fff;
    padding: 0.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.broker-logo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    border-radius: 9999px;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    text-transform: uppercase;
}
.broker-logo-placeholder.interactive { background-color: #005EB8; }
.broker-logo-placeholder.oanda { background-color: #000000; }
.broker-logo-placeholder.admirals { background-color: #E41E26; }
.broker-logo-placeholder.ig { background-color: #ff4b00; }
.broker-logo-placeholder.icmarkets { background-color: #4CAF50; }

@media (min-width: 1024px) { /* Desktop Ad Banner */
    .ad-banner {
        position: fixed;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        z-index: 100;
        max-width: 100%;
        width: 100%;
        border-radius: 0;
    }
}

@media (min-width: 640px) { /* Tablet and Up */
    .main-timeline-container,
    .session-bar-row {
        grid-template-columns: 175px 1fr;
    }
    .session-info-column {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        gap: 0.75rem;
        padding-left: 0;
        width: auto;
    }
}

@media (max-width: 639px) { /* Mobile */
    .rocket-icon {
        display: none;
    }
    .signal-header {
        gap: 0;
    }
    .page-container {
        display: block;
        padding: 0;
    }
    .main-content {
        padding: 0;
    }
    .main-content .w-full {
        overflow: visible;
    }
    .bottom-card {
        position: static;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
        margin-top: 0;
    }
    .coupon-scroll-container {
        flex-direction: column;
        overflow-x: hidden;
        padding: 1rem 0;
    }
    .coupon-card {
        width: 100%;
    }
    .ad-links .ad-link-item {
        display: none;
    }
    .ad-links .ad-link-item.bonus-link {
        display: block;
        border-right: none;
        padding: 0 0.5rem;
        font-size: 0.7rem;
        line-height: 1.2;
        font-weight: normal;
        text-align: center;
    }
    .ad-logo img {
        height: 60px !important;
    }
    .ad-trade-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    .mobile-content-area-grid {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 0rem;
        align-items: start;
        width: 100%;
        margin-top: 0.5rem;
    }
    .ad-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    margin-top: 0;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    height: 50px;
    background-image: linear-gradient(to bottom, #201801, #3B82F6);
}

.ad-logo {
    flex-shrink: 0;
}

.ad-logo img {
    width: 100px;
    height: auto;
    object-fit: contain;
}

.ad-links .ad-link-item {
    display: none;
}

.ad-links .ad-link-item.bonus-link {
    display: block;
    border-right: none;
    padding: 0 0.5rem;
    font-size: 0.7rem;
    line-height: 1.2;
    font-weight: normal;
    text-align: center;
}

.ad-trade-button {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
}
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}
.blinking-colon {
    animation: blink 1s step-start infinite;
}

