@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@400;600&display=swap');

@font-face {
    font-family: 'Berkeley Mono';
    src: url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;600&display=swap');
}

* {
    box-sizing: border-box;
}

body {
    background-color: #0a0a0a;
    color: #e4e4e4;
    font-family: 'Geist Mono', 'SF Mono', monospace;
    margin: 0;
    padding: 16px;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    body {
        padding: 12px;
        line-height: 20px;
    }
}

.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Page header container */
.page-header-container {
    background-color: #050505;
    border: 1px solid #333;
    margin-bottom: 24px;
}

@media (max-width: 767px) {
    .page-header-container {
        border-left: none;
        border-right: none;
        border-top: 1px solid #333;
        border-bottom: 1px solid #333;
        margin-left: -16px;
        margin-right: -16px;
    }
}

.page-header-container .box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Consistent headers for all boxes */
.box-header {
    background-color: #111;
    border-bottom: 1px solid #333;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 767px) {
    .box-header {
        padding: 8px 16px;
    }
}

.box-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #ff8c00;
    margin: 0;
    padding: 0;
}

h1.box-title,
h2.box-title {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: #ff8c00;
    margin: 0;
    padding: 0;
}

.timestamp {
    color: #666;
    font-size: 11px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

@media (max-width: 767px) {
    .header-controls {
        display: none !important;
    }
}

.header-subscribe-btn {
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    color: #000;
    border: none;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 1px 4px rgba(255, 140, 0, 0.3);
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .header-subscribe-btn {
        padding: 6px 12px;
        font-size: 10px;
        min-height: auto;
    }
}

.header-subscribe-btn:hover {
    background: linear-gradient(135deg, #ff9500, #ff7500);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(255, 140, 0, 0.4);
}

/* Mobile Sticky Subscribe Button */
.mobile-sticky-subscribe {
    display: none;
}

@media (max-width: 767px) {
    .mobile-sticky-subscribe {
        display: block;
    }
    
    .mobile-subscribe-btn {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: linear-gradient(135deg, #ff8c00, #ff6b00);
        color: #000;
        border: none;
        border-radius: 0;
        padding: 0 16px;
        font-family: 'Geist Mono', monospace;
        font-size: 11px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        cursor: pointer;
        transition: all 0.2s;
        height: 28px;
        min-height: 28px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-subscribe-btn:hover {
        background: linear-gradient(135deg, #ff9500, #ff7500);
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
    }
    
    body {
        padding-top: 44px;
    }
}

/* Signal Analysis Frame */
.signal-analysis-frame {
    background-color: #050505;
    border: 1px solid #333;
    margin-bottom: 24px;
    padding: 0;
}

@media (max-width: 767px) {
    .signal-analysis-frame {
        border-left: none;
        border-right: none;
        border-top: 1px solid #333;
        border-bottom: 1px solid #333;
        margin-left: -16px;
        margin-right: -16px;
    }
}

.signal-content {
    padding: 12px 16px;
}

.signal-layout {
    display: flex;
    align-items: center;
    gap: 24px;
}

.signal-recommendation {
    font-size: 48px;
    font-weight: 600;
    color: #FFB347;
    letter-spacing: 0.05em;
    flex-shrink: 0;
    min-width: 200px;
}

.signal-recommendation.buy {
    color: #4ADE80;
}

.signal-recommendation.sell {
    color: #F87171;
}

.signal-recommendation.hold {
    color: #FFB347;
}

.signal-description {
    font-size: 14px;
    line-height: 1.6;
    color: #e4e4e4;
    opacity: 0.9;
    flex: 1;
    position: relative;
}

.signal-description.truncated {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more-link {
    color: #ff8c00;
    cursor: pointer;
    font-size: 13px;
    text-decoration: underline;
    display: inline;
}

.read-more-link:hover {
    color: #ff9500;
}

/* Responsive grid */
.indicators-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 768px) {
    .indicators-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto auto;
        gap: 20px;
    }
}

/* Indicator container */
.indicator-container, .subscription-container {
    border: 1px solid #333;
    padding: 0;
    background-color: #050505;
}

@media (max-width: 767px) {
    .indicator-container, .subscription-container {
        border-left: none;
        border-right: none;
        border-top: 1px solid #333;
        border-bottom: 1px solid #333;
        margin-left: -16px;
        margin-right: -16px;
    }
}

.indicator-content {
    padding: 16px 12px;
}

@media (min-width: 768px) {
    .indicator-content {
        padding: 12px 10px;
    }
}

/* Main display section */
.main-display {
    margin-bottom: 24px;
    text-align: center;
}

.index-value {
    font-size: 42px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.index-label {
    font-size: 16px;
    margin-bottom: 20px;
    letter-spacing: 0.1em;
}

@media (min-width: 768px) {
    .index-value {
        font-size: 56px;
    }
    
    .index-label {
        font-size: 18px;
    }
}

/* Main bar visualization */
.main-bar-container {
    max-width: 600px;
    margin: 0 auto;
}

.main-bar {
    height: 24px;
    background: #1a1a1a;
    border: 1px solid #333;
    position: relative;
    margin-bottom: 8px;
}

.main-bar-fill {
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
}

.main-bar-marker {
    position: absolute;
    top: -4px;
    width: 3px;
    height: 32px;
    background: #fff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
    transform: translateX(-50%);
}

.zone-divider {
    position: absolute;
    top: 0;
    width: 1px;
    height: 100%;
    background: #000;
    opacity: 0.5;
}

.zone-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.zone-label {
    flex: 1;
    font-size: 9px;
    text-align: center;
    line-height: 11px;
    opacity: 0.8;
}

.main-stats {
    font-size: 14px;
    color: #e4e4e4;
    text-align: center;
    margin-bottom: 24px;
    font-style: normal;
    opacity: 0.9;
}

/* ASCII-style bar chart */
.ascii-bar {
    margin: 24px 0;
    font-size: 11px;
    line-height: 16px;
}

@media (max-width: 767px) {
    .ascii-bar {
        font-size: 10px;
        line-height: 14px;
    }
}

.bar-row {
    display: flex;
    align-items: center;
    margin-bottom: 2px;
}

/* Tooltip styling */
.bar-label[title] {
    cursor: help;
    position: relative;
}

.bar-label[title]:hover {
    color: #e4e4e4;
}

/* Native tooltip enhancement */
.bar-label {
    width: 160px;
    text-align: right;
    padding-right: 16px;
    color: #666;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    transition: color 0.2s;
    font-size: 10px;
}

@media (max-width: 767px) {
    .bar-label {
        width: 100px;
        padding-right: 8px;
        gap: 4px;
        font-size: 9px;
    }
}

.bar-chart {
    flex: 1;
    font-family: 'Geist Mono', 'SF Mono', monospace;
}

@media (max-width: 767px) {
    .bar-chart {
        font-size: 9px;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

/* Override base bar-chart styles for expanded state */
.bar-expanded .bar-chart-expanded {
    flex: none !important;
}

.bar-value {
    margin-left: 8px;
    color: #e4e4e4;
    font-size: 11px;
}

@media (max-width: 767px) {
    .bar-value {
        margin-left: 4px;
        font-size: 10px;
    }
}

/* Zone indicators */
.zone-indicator {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-left: 4px;
}

/* Expandable bar states */
.expandable-bar {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 4px;
    padding: 8px;
    margin: 2px 0;
    min-height: 44px;
    display: flex;
    align-items: center;
}

@media (min-width: 768px) {
    .expandable-bar {
        padding: 4px 8px;
        min-height: auto;
        display: block;
    }
}

.expandable-bar:hover {
    background-color: rgba(255, 140, 0, 0.1);
    border-left: 3px solid #ff8c00;
    padding-left: 8px;
    transition: all 0.2s ease;
}

.expandable-bar:hover .bar-label {
    color: #ccc;
}

.expandable-bar.expanded {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 16px;
    margin: 8px 0;
    display: block;
}

.bar-collapsed {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.bar-expanded {
    display: none;
    padding: 6px 0;
}

.bar-expanded .expanded-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 4px;
    width: 100%;
    position: relative;
    min-height: 0;
}

.bar-expanded .component-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    flex: 1;
    line-height: 1.2;
}

.bar-expanded .current-reading {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    text-align: right;
    z-index: 10;
}

.bar-expanded .reading-value {
    font-size: 32px;
    font-weight: 700;
    color: #FFB347;
    line-height: 0.9;
}

.bar-expanded .vs-average {
    font-size: 14px;
    color: #ccc;
    opacity: 0.8;
    white-space: nowrap;
    line-height: 1;
}

.bar-expanded .component-description {
    font-size: 13px;
    color: #aaa;
    line-height: 1.3;
    margin-top: -2px;
    padding: 0;
    font-style: italic;
    opacity: 0.9;
    max-width: 70%;
    clear: both;
}

.bar-expanded .expanded-bar-container {
    margin: 8px 0;
    text-align: center;
    width: 100%;
    display: block;
}

.bar-expanded .bar-chart-expanded.fear,
.bar-expanded .bar-chart-expanded.greed,
.bar-expanded .bar-chart-expanded.neutral,
.bar-expanded .bar-chart-expanded {
    font-family: 'Geist Mono', 'SF Mono', monospace;
    font-size: 16px;
    letter-spacing: 1.5px;
    text-align: center;
    display: inline-block;
    margin: 0;
    padding: 0;
    flex: none !important;
    width: auto;
}

.bar-expanded .range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0;
    width: 100%;
    text-align: center;
}

.range-left, .range-center, .range-right {
    text-align: center;
}

.range-left {
    text-align: left;
}

.range-right {
    text-align: right;
}

.range-label {
    font-size: 11px;
    color: #888;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.range-value {
    font-size: 13px;
    font-weight: 600;
    color: #ccc;
}

/* Color indicators */
.fear-extreme { color: #7B68EE; }
.fear { color: #4169E1; }
.neutral { color: #999; }
.greed { color: #FFB347; }
.greed-extreme { color: #FF6B6B; }

.positive { color: #4ADE80; }
.negative { color: #F87171; }

/* Collapsible sections */
.collapsible-section {
    margin-bottom: 16px;
}

.section-header {
    background-color: #111;
    border-top: 1px solid #333;
    border-bottom: 1px solid #333;
    padding: 10px 12px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
    font-size: 11px;
    min-height: 44px;
}

.section-header:hover {
    background-color: #1a1a1a;
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: #e4e4e4;
}

.section-summary {
    font-size: 10px;
    color: #666;
}

.section-content {
    background-color: #0a0a0a;
    border-bottom: 1px solid #333;
    padding: 16px 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    font-size: 11px;
    line-height: 18px;
}

/* Table styling */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    font-size: 11px;
}

.data-table th,
.data-table td {
    padding: 8px 0;
    text-align: left;
    border-bottom: 1px solid #222;
}

.data-table th {
    color: #666;
    font-weight: normal;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    color: #e4e4e4;
}

.data-table tr:hover td {
    background-color: #111;
}

/* ASCII decorations */
.ascii-divider {
    margin: 16px 0;
    color: #333;
    text-align: center;
    font-size: 11px;
}

.aaii-segment {
    position: absolute;
    height: 100%;
}

/* Sentiment color indicators */
.bullish { color: #FFB347; }
.bearish { color: #4169E1; }
.extreme-bullish { color: #FF6B6B; }

/* SSI-specific styling */
.confidence-indicator {
    color: #888;
    font-size: 10px;
    margin-left: 4px;
}

.ssi-month-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #222;
    font-family: 'Geist Mono', monospace;
}

.ssi-month-row:last-child {
    border-bottom: none;
}

.ssi-month-label {
    font-size: 11px;
    color: #ccc;
    flex: 1;
}

.ssi-month-value {
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    min-width: 60px;
}

/* Subscription container styling */
.subscription-content {
    padding: 20px 16px 16px 16px;
}

@media (min-width: 768px) {
    .subscription-content {
        padding: 64px 20% 12px 20%;
    }
}

.subscription-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
    font-family: 'Geist Mono', monospace;
}


.simple-subscription {
    display: flex;
    flex-direction: column;
    gap: 18px;
    font-family: 'Geist Mono', monospace;
}

.offer-header {
    font-size: 12px;
    color: #ff8c00;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.alert-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 24px;
}

.alert-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    padding: 4px 0;
    line-height: 1.4;
}

@media (min-width: 768px) {
    .alert-row {
        font-size: 11px;
        padding: 2px 0;
    }
}

.alert-row.highlight {
    color: #ff8c00;
    font-weight: 600;
}

.item-bullet {
    color: #00FF41;
    font-weight: bold;
    font-size: 12px;
}

.item-text {
    color: #ccc;
    line-height: 1.3;
}

.alert-row.highlight .item-text {
    color: #ff8c00;
}

.delivery-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    padding: 6px 0;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
}

.delivery-label {
    color: #888;
    font-weight: normal;
}

.delivery-value {
    color: #e4e4e4;
    font-weight: 600;
}

.pricing-terminal {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pricing-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    padding: 6px 0;
}

@media (min-width: 768px) {
    .pricing-line {
        font-size: 11px;
        padding: 6px 0;
    }
}

.price-label {
    color: #888;
    font-weight: normal;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.price-value {
    color: #00FF41;
    font-weight: 600;
}

.subscribe-btn-terminal {
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    color: #000;
    border: none;
    padding: 14px 20px;
    border-radius: 4px;
    font-family: 'Geist Mono', monospace;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(255, 140, 0, 0.3);
    width: 100%;
    margin-top: 6px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 768px) {
    .subscribe-btn-terminal {
        padding: 10px 20px;
        font-size: 11px;
        min-height: auto;
    }
}

.subscribe-btn-terminal:hover {
    background: linear-gradient(135deg, #ff9500, #ff7500);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(255, 140, 0, 0.4);
}

#loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 10, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    font-size: 16px;
    color: #e4e4e4;
    transition: opacity 0.3s;
}

/* Add mobile responsive stacking for signal layout */
@media (max-width: 767px) {
    .signal-layout {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .signal-recommendation {
        min-width: 0;
        margin-bottom: 6px;
        font-size: 36px;
    }

    .signal-description {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .signal-content {
        padding: 16px;
    }
}

/* Subscription Modal */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #111;
    border: 2px solid #333;
    border-radius: 4px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    font-family: 'Geist Mono', monospace;
}

.modal-header {
    background-color: #0a0a0a;
    border-bottom: 1px solid #333;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #ff8c00;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.1em;
}

.close {
    color: #666;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: #ff8c00;
}

.modal-body {
    padding: 20px;
}

.modal-body p {
    color: #e4e4e4;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

#subscription-form {
    display: flex;
    margin-top: 24px;
    flex-direction: column;
    gap: 15px;
}

#email-input {
    background-color: #0a0a0a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 12px 16px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: #e4e4e4;
    min-height: 44px;
}

#email-input:focus {
    outline: none;
    border-color: #ff8c00;
    box-shadow: 0 0 0 2px rgba(255, 140, 0, 0.2);
}

#email-input::placeholder {
    color: #666;
}

#subscribe-submit {
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
    color: #000;
    border: none;
    border-radius: 4px;
    padding: 12px 20px;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}

#subscribe-submit:hover {
    background: linear-gradient(135deg, #ff9500, #ff7500);
    transform: translateY(-1px);
}

#subscribe-submit:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

.message {
    padding: 12px;
    border-radius: 4px;
    font-size: 13px;
    margin-top: 15px;
    border: 1px solid;
}

.message.success {
    background-color: rgba(74, 222, 128, 0.1);
    border-color: #4ADE80;
    color: #4ADE80;
}

.message.error {
    background-color: rgba(248, 113, 113, 0.1);
    border-color: #F87171;
    color: #F87171;
}

/* Manage Subscription Section */
#manage-subscription-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#manage-email-input {
    background-color: #0a0a0a;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 12px 16px;
    font-family: 'Geist Mono', monospace;
    font-size: 11px;
    color: #e4e4e4;
    min-height: 44px;
}

#manage-email-input:focus {
    outline: none;
    border-color: #FFB347;
    box-shadow: 0 0 0 2px rgba(255, 179, 71, 0.2);
}

#manage-email-input::placeholder {
    color: #666;
}

#manage-submit {
    background-color: #1a1a1a;
    color: #e4e4e4;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 12px 20px;
    font-family: 'Geist Mono', monospace;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 44px;
}

#manage-submit:hover {
    background-color: #222;
    border-color: #FFB347;
    color: #FFB347;
}

#manage-submit:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
    transform: none;
    border-color: #333;
}

#toggle-manage-section {
    font-size: 11px;
    letter-spacing: 0.05em;
    color: #FF8c00;
}

@media (max-width: 767px) {
    .modal-content {
        width: 95%;
        margin: 20px;
    }

    .modal-header {
        padding: 12px 16px;
    }

    .modal-body {
        padding: 24px 16px;
    }
} 