:root {
    --bloom-orange: #f58220;
    --bloom-bg: #000;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial Narrow', sans-serif;
}

body {
    background: #111;
    color: white;
    padding: 10px;
    height: 100vh;
    overflow: hidden;
    text-transform: uppercase;
}

.grid-container {
    display: grid;
    grid-template-columns: 350px 1fr 250px;
    grid-template-rows: 1fr 250px;
    gap: 8px;
    height: 97vh;
    width: 100%;
}

.box-live {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Empurra o breaking news para a base de forma fluida */
    padding-bottom: 0; /* Removido o padding estático que quebrava o espaço */
}

.box-highlights {
    grid-column: 1;
    grid-row: 2;
    height: 250px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.box-feed {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.box-markets {
    grid-column: 3;
    grid-row: 1 / span 2;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 0 !important;
    overflow: hidden;
}

.box {
    background: var(--bloom-bg);
    border: 1px solid var(--bloom-orange);
    position: relative;
    padding: 12px;
}

.main-title {
    font-size: 2.8rem; /* Reduzido levemente de 3.2rem para melhor encaixe */
    font-weight: 900;
    line-height: 1.0; /* Aumentado de 0.85 para não sufocar as letras maiúsculas */
    margin-top: 15px; /* Ajustado de 25px para economizar espaço vertical */
    margin-bottom: 10px; /* Margem controlada para o texto inferior */
}

.ticker-wrapper {
    flex: 1;
    position: relative;
    overflow: hidden;
    margin-top: 20px;
    margin-right: 10px;
    margin-left: 10px;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: left;
}

.ticker-item {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    color: var(--bloom-orange);
    font-weight: bold;
    font-size: 1.35rem;
    line-height: 1.2;
    text-transform: uppercase;
    animation: pushDown 10s infinite;
}

@keyframes pushDown {
    0% { transform: translateY(100%); opacity: 0; }
    5% { transform: translateY(0); opacity: 1; }
    95% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-100%); opacity: 0; }
}

.ticker-link {
    text-decoration: none;
    color: var(--bloom-orange);
    display: flex;
    align-items: flex-start;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.ticker-wrapper:hover .ticker-item {
    animation-play-state: paused;
}

.live-indicator {
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
}

.live-indicator::before {
    content: "●";
    color: #ff0000;
    animation: suaveBlink 2s ease-in-out infinite;
    font-size: 1.2rem;
}

.live-indicator a {
    text-decoration: none !important;
    color: white !important;
    font-weight: bold;
}

.live-indicator a:hover {
    color: var(--bloom-orange) !important;
}

.indicator {
    text-decoration: none !important;
    color: white !important;
    font-weight: 400;
}

.indicator a {
    text-decoration: none !important;
    color: white !important;
    font-weight: 400;
}

.indicator a:hover {
    color: var(--bloom-orange) !important;
}

hr {
    margin-top: 10px;
    margin-bottom: 10px;
}

.aovivo {
    color: red;
}

#btn-atualizar {
    background: ORANGE;
    border: none;
    border-radius: 0px;
    color: #000;
    font-size: 14px;
    cursor: pointer;
    margin-top: -10px;
    margin-left: 0px;
    padding: 7px 10px 7px 10px;
}

.notificacao-floating {
    display: none;
    background-color: ORANGE;
    color: BLACK;
    padding: 12px 0px;
    border-radius: 0px;
    text-align: center;
    cursor: pointer;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

@keyframes suaveBlink {
    0%, 100% { opacity: 1; filter: brightness(1.2); }
    50% { opacity: 0.2; filter: brightness(0.8); }
}

.top-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

#hora-atual {
    font-weight: bold;
    font-size: 1.1rem;
    font-family: monospace;
}

.timeline {
    height: calc(100% - 100px);
    overflow-y: auto;
}

.post {
    border-bottom: 1px solid #222;
    padding: 15px 0;
    background: transparent !important;
}

.post h2 a {
    color: var(--bloom-orange) !important;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 1.1;
}

.post.destaque {
    border-left: 4px solid #cc0000 !important;
    padding-left: 15px;
}

.post.destaque h2 a {
    color: #fff !important;
}

.breaking-news {
    position: relative; /* Alterado de absolute para relative para respeitar o fluxo */
    margin-top: auto; /* Garante que ela se apoie perfeitamente no final do bloco */
    width: 100%;
    background: #cc0000;
    display: flex;
    height: 35px;
    align-items: center;
    overflow: hidden;
}

.breaking-news marquee {
    flex: 1;
    min-width: 0;
}

.breaking-label {
    background: white;
    color: black;
    font-weight: bold;
    padding: 0 10px;
    font-size: 12px;
    height: 100%;
    display: flex;
    align-items: center;
}

marquee {
    color: white;
    font-weight: bold;
    font-size: 1.1rem;
}

#marquee-breaking a:hover {
    text-decoration: underline;
}

.tradingview-widget-container {
    height: 100% !important;
    width: 100% !important;
}

.menu {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    align-items: center;
}

.aba {
    cursor: pointer;
    background: #333;
    color: white;
    padding: 10px 8px 10px 10px;
    font-size: 15px;
    text-decoration: none;
}

.aba.ativo {
    background: orange;
    color: black;
    font-weight: bold;
}

#busca-personalizada {
    width: 100% !important;
    height: 27px !important;
    font-size: 0.8rem !important;
    background: #111;
    border: 1px solid orange;
    color: white;
    padding: 0 5px;
    border-radius: 0;
}

.label-vertical-orange {
    position: absolute;
    left: -25px;
    top: 50%;
    transform: rotate(-90deg);
    background: var(--bloom-orange);
    color: black;
    padding: 2px 10px;
    font-weight: bold;
    font-size: 10px;
}

.label-vertical {
    position: absolute;
    left: -35px;
    top: 50%;
    transform: rotate(-90deg);
    color: #444;
    font-size: 10px;
}

.box-header {
    margin-bottom: 10px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
    padding: 5px 0;
}

.tag {
    position: relative;
    background: #222;
    color: #fff;
    padding: 3px 8px;
    font-size: 11px;
    cursor: pointer;
    border: 1px solid #444;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tag.ativa {
    background: var(--bloom-orange) !important;
    color: black !important;
    border-color: black;
    font-weight: bold;
}

.tag-badge {
    display: none;
    width: 8px;
    height: 8px;
    background-color: #ff0000;
    border-radius: 50%;
    position: absolute;
    top: -4px;
    right: -4px;
    box-shadow: 0 0 5px #ff0000;
}

.tag.notificar .tag-badge {
    display: block;
    animation: pulseRed 1.5s infinite;
}

@keyframes pulseRed {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

.remove-tag {
    color: #888;
    margin-left: 5px;
    font-size: 10px;
}

.remove-tag:hover {
    color: #fff;
}

.timeline::-webkit-scrollbar {
    width: 6px;
}

.timeline::-webkit-scrollbar-track {
    background: #000;
}

.timeline::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

.timeline::-webkit-scrollbar-thumb:hover {
    background: var(--bloom-orange);
}

.timeline {
    scrollbar-width: thin;
    scrollbar-color: #333 #000;
}

@media (max-width: 1024px) {
    body {
        overflow-y: auto !important;
        height: auto;
        padding: 5px;
        background: #000;
    }

    .grid-container {
        display: flex;
        flex-direction: column;
        height: auto;
        gap: 15px;
        max-width: 100%;
    }

    .box {
        width: 100%;
        height: auto !important;
        padding: 15px !important;
    }

    .post h2 a {
        font-size: 1.6rem !important;
        line-height: 1.2;
    }

    .menu {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        margin-bottom: 10px;
    }

    .aba {
        font-size: 1.6rem !important;
        padding: 8px 12px !important;
    }

    #busca-personalizada {
        width: 100% !important;
        height: 55px !important;
        font-size: 1.4rem !important;
        margin-top: 5px;
        background: #111;
        border: 1px solid var(--bloom-orange);
        color: white;
        padding: 0 15px;
        border-radius: 0;
    }

    .tag {
        font-size: 1.1rem !important;
        padding: 6px 12px !important;
    }

    .breaking-news {
        height: 60px !important;
    }

    .breaking-label {
        font-size: 1.7rem !important;
        line-height: 1;
        padding: 0 5px !important;
    }

    marquee {
        font-size: 2.3rem !important;
    }

    .main-title {
        font-size: 1.8rem !important;
        margin-top: -10px;
    }

    .ticker-item {
        font-size: 1.6rem !important;
        line-height: 1.1;
    }

    .box-highlights {
        height: 180px !important;
    }

    .ticker-wrapper {
        height: 130px !important;
    }

    .label-vertical, .label-vertical-orange, .next-update {
        display: none !important;
    }

    .timeline {
        height: auto !important;
        overflow-y: visible !important;
    }

.top-info-row {display: flex;flex-direction: row;justify-content: space-between;align-items: center;width: 100%;margin-bottom: 15px;margin-top: 15px;border-bottom: 1px solid #222;padding-bottom: 5px;}.live-indicator {font-size: 1.3rem !important;white-space: nowrap;display: flex;align-items: center;gap: 8px;color: white !important;}.live-indicator a {text-decoration: none !important;color: white !important;font-weight: bold;}.live-indicator a:hover {color: var(--bloom-orange) !important;}#hora-atual {font-size: 1.1rem;font-weight: bold;font-family: monospace;}}@media (max-width: 768px) {.aovivo, .main-title .indicator {display: none !important;}}.copy-btn {display: inline-flex;align-items: center;justify-content: center;width: 16px;height: 16px;color: #777;cursor: pointer;transition: .18s;}.copy-btn:hover {color: #f59a23;}
