/* ===========================
   TEMA RENKLERİ
   =========================== */
:root{
    --bg-page: #1e1e1e;
    --bg-section: #242424;
    --bg-section-alt: #2f2f2f;
    --bg-header-block: #2a2a2a;

    --line-soft: rgba(255,255,255,0.07);
    --line-softer: rgba(255,255,255,0.04);

    --text-primary: #E0E0E0;
    --text-secondary: #9ca3af;
    --text-dim: #6b6b6b;

    --accent-positive-bg: rgba(34,197,94,0.18);
    --accent-positive-text: #38d26f;
    --accent-negative-bg: rgba(239,68,68,0.18);
    --accent-negative-text: #ef5f5f;

    --accent-brand-start: #e67e22;
    --accent-brand-end: #d35400;
}

/* ===========================
   SAYFA KABUĞU
   =========================== */
.main-wrapper{
    background: var(--bg-page);
    color: var(--text-primary);
    min-height: 100vh;
    margin-top:20px;
}
@media(max-width:768px){
    .main-wrapper{ margin-top:24px; }
}

.main-inner{
    padding: 0 0 40px 0;
}
.container{
    max-width:1600px;
    margin:0 auto;
    padding:0 20px;
    color:var(--text-primary);
}
@media(max-width:768px){
    .container{ padding:0 10px; }
}

/* ===========================
   BREADCRUMB
   =========================== */
.breadcrumb-bar{
    font-size:13px;
    color:var(--text-secondary);
    margin-bottom:16px;
    display:flex;
    flex-wrap:wrap;
    row-gap:6px;
    line-height:1.4;
}
.breadcrumb-bar a{
    color:var(--text-secondary);
    text-decoration:none;
}
.breadcrumb-bar a:hover{
    color:var(--accent-brand-start);
}
.breadcrumb-sep{
    margin:0 8px;
    color:var(--text-secondary);
}
.breadcrumb-current{
    color:var(--text-primary);
    font-weight:600;
}

/* ===========================
   VERİ UYARI KUTUSU (GENEL)
   =========================== */
.disclaimer-box{
    background: var(--bg-section-alt);
    border:1px solid var(--line-soft);
    border-radius:12px;
    padding:14px 16px;
    font-size:12px;
    line-height:1.6;
    color:var(--text-secondary);
    box-shadow:0 10px 40px rgba(0,0,0,0.6);
    margin-bottom:20px;
}
.disclaimer-head{
    font-size:12px;
    color:var(--accent-brand-start);
    font-weight:600;
    margin-bottom:6px;
    display:flex;
    align-items:center;
    gap:6px;
    text-shadow:0 1px 4px rgba(230,126,34,0.3);
}
.disclaimer-dot{
    width:8px;
    height:8px;
    border-radius:50%;
    background:var(--accent-brand-start);
    box-shadow:0 0 8px rgba(230,126,34,0.7);
}
.disclaimer-box b{
    color:var(--text-primary);
    font-weight:600;
}
/* kompakt versiyon (grafikten önce kullandık) */
.disclaimer-compact{
    background: var(--bg-section);
    border:1px solid var(--line-softer);
    border-radius:10px;
    font-size:12px;
    color:var(--text-secondary);
    margin-top:20px;
    margin-bottom:24px;
}
.disclaimer-compact .disclaimer-head{
    color:var(--accent-brand-start);
}
.disclaimer-compact .disclaimer-text{
    font-size:12px;
    line-height:1.6;
    color:var(--text-secondary);
}

/* ===========================
   GRID LAYOUT
   =========================== */
.row{
    display:flex;
    align-items:flex-start;
    flex-wrap:nowrap;
    margin:0 -15px;
}
.span8,.span4{
    min-width:0;
    padding:0 15px;
}
.span8{ flex:0 0 66.6667%; max-width:66.6667%; }
.span4{ flex:0 0 33.3333%; max-width:33.3333%; }
@media(max-width:1200px){
    .row{ flex-wrap:wrap; }
    .span8,.span4{ flex:0 0 100%; max-width:100%; }
}

/* ===========================
   GENEL WIDGET
   =========================== */
.widget{
    background: var(--bg-section);
    border-radius:16px;
    border:1px solid var(--line-soft);
    overflow:hidden;
    box-shadow:0 10px 40px rgba(0,0,0,0.6);
    margin-bottom:22px;
    transition:all .2s ease;
}
.widget:hover{
    box-shadow:0 12px 45px rgba(0,0,0,0.8);
}
.widget-header{
    background: linear-gradient(90deg, #1f1f1f 0%, #141414 100%);
    border-bottom:2px solid var(--accent-brand-start);
    padding:16px 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    flex-wrap:nowrap;
    gap:12px;
}
.widget-header-left{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px;
    min-width:0;
}
.widget-header-right{
    margin-left:auto;
    font-size:12px;
    font-weight:600;
    color:#fff;
    white-space:nowrap;
    text-transform:uppercase;
    letter-spacing:.4px;
}

/* Başlık hiyerarşisi */
.widget-header h1,
.widget-header h2,
.widget-header h3{
    margin:0;
    font-size:18px;
    font-weight:700;
    color:var(--text-primary);
    line-height:1.3;
    text-shadow:0 1px 4px rgba(0,0,0,0.6);
}
@media(max-width:768px){
    .widget-header{
        padding:14px 16px;
        flex-wrap:wrap;
    }
    .widget-header h1,
    .widget-header h2,
    .widget-header h3{
        font-size:16px;
    }
    .widget-header-right{
        font-size:11px;
    }
}

.widget-content{
    background: var(--bg-section-alt);
    color: var(--text-primary);
    padding:20px;
}
.widget-content--tv{
    background: var(--bg-section);
    padding:0;
}

@media(max-width:768px){
    .widget-content{ padding:16px; }
}

/* ===========================
   FİYAT BLOKU (main-price-display)
   =========================== */
.main-price-display{
    background: var(--bg-section);
    border:1px solid var(--line-softer);
    border-radius:12px;
    padding:20px;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap:20px;
    box-shadow:0 6px 18px rgba(0,0,0,0.6);
}
.price-section{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:center;
    gap:15px;
    text-align:center;
}
.trend-icon{
    width:40px;
    height:40px;
    border-radius:8px;
    background: radial-gradient(circle at 30% 30%, rgba(230,126,34,0.3) 0%, rgba(0,0,0,0) 60%), #1f1f1f;
    border:1px solid var(--line-soft);
    box-shadow:0 6px 20px rgba(0,0,0,0.8);
    font-size:12px;
    font-weight:700;
    line-height:40px;
    text-align:center;
    min-width:40px;
    color:#fff;
}
.trend-icon.down{
    background: radial-gradient(circle at 30% 30%, rgba(239,68,68,0.4) 0%, rgba(0,0,0,0) 60%), #2a0000;
    border:1px solid var(--accent-negative-text);
    color:var(--accent-negative-text);
    text-shadow:0 0 6px rgba(239,68,68,0.5);
}
.trend-icon.up{
    background: radial-gradient(circle at 30% 30%, rgba(34,197,94,0.4) 0%, rgba(0,0,0,0) 60%), #002a00;
    border:1px solid var(--accent-positive-text);
    color:var(--accent-positive-text);
    text-shadow:0 0 6px rgba(34,197,94,0.5);
}

.pair-info{
    color:var(--text-primary);
    font-size:20px;
    font-weight:700;
    letter-spacing:-0.02em;
    line-height:1.3;
}
.current-price{
    font-size:32px;
    font-weight:800;
    font-family:'Courier New',monospace;
    color:var(--accent-brand-start);
    letter-spacing:-0.02em;
    text-shadow:0 0 10px rgba(230,126,34,0.25);
}
.price-change{
    display:inline-block;
    font-size:14px;
    font-weight:700;
    line-height:1.2;
    border-radius:8px;
    padding:6px 10px;
    border:1px solid transparent;
    font-family:'Courier New',monospace;
}
.price-change.negative{
    background: var(--accent-negative-bg);
    color: var(--accent-negative-text);
    border-color: var(--accent-negative-text);
}
.price-change.positive{
    background: var(--accent-positive-bg);
    color: var(--accent-positive-text);
    border-color: var(--accent-positive-text);
}

/* ===========================
   DETAY BLOĞU (alış/satış/değişim/son fiyat)
   =========================== */
.price-details{
    background: var(--bg-section-alt);
    border:1px solid var(--line-soft);
    border-radius:12px;
    margin-top:20px;
    padding:20px;
    box-shadow:0 6px 18px rgba(0,0,0,0.6);
}
.price-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:15px;
    margin-bottom:20px;
}
.price-item{
    background: var(--bg-section);
    border:1px solid var(--line-soft);
    border-radius:12px;
    padding:16px;
    text-align:center;
    box-shadow:0 4px 12px rgba(0,0,0,0.6);
}
.price-item-label{
    font-size:12px;
    color:var(--text-secondary);
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.8px;
    margin-bottom:8px;
}
.price-item-value{
    font-size:20px;
    font-weight:700;
    color:var(--text-primary);
    font-family:'Courier New',monospace;
    line-height:1.3;
}
.last-updated{
    background: var(--bg-section);
    border:1px solid var(--line-softer);
    border-radius:8px;
    padding:10px 12px;
    font-size:11px;
    line-height:1.4;
    color:var(--text-secondary);
    font-family:'Courier New',monospace;
    text-align:center;
    box-shadow:0 4px 12px rgba(0,0,0,0.6);
}

/* ===========================
   İÇERİK BLOĞU (AÇIKLAMA / MAKALE)
   =========================== */
.post-content{
    background: var(--bg-section-alt);
    border-top:1px solid var(--line-soft);
    border-radius:16px;
    color:var(--text-primary);
    box-shadow:0 10px 40px rgba(0,0,0,0.6);
}
.post-content > div{
    padding:20px;
    font-size:15px;
    line-height:1.6;
    color:var(--text-primary);
}
.post-content a{
    color:var(--accent-brand-start);
    text-decoration:none;
    font-weight:600;
}
.post-content a:hover{
    color:var(--accent-brand-end);
    text-decoration:underline;
}

/* ===========================
   TRADINGVIEW BLOĞU
   =========================== */
.widget--tv .widget-content{
    background: var(--bg-section);
    padding:0;
}
.tv-holder{
    position:relative;
    width:100%;
    height:68vh;
    min-height:520px;
    background:var(--bg-section-alt);
    border-top:1px solid var(--line-soft);
}
@media(max-width:768px){
    .tv-holder{
        height:62vh;
        min-height:420px;
    }
}
.tradingview-widget-container,
.tradingview-widget-container > div,
#tradingview_chart_widget,
.tradingview-widget-container iframe{
    position:absolute;
    inset:0;
    width:100% !important;
    height:100% !important;
    border:none;
}

/* ===========================
   YORUMLAR BLOĞU
   =========================== */
.comment-widget .comment-widget-content{
    background: var(--bg-section-alt);
    padding:16px;
    min-height:600px;
    max-height:80vh;
    overflow:auto;
    border-top:1px solid var(--line-soft);
}
#commentBox{
    width:100%;
    min-height:500px;
    border:none;
    overflow:auto;
}
@media(max-width:768px){
    .comment-widget .comment-widget-content{
        min-height:400px;
        padding:12px;
    }
    #commentBox{
        min-height:300px;
        height:70vh;
    }
}

/* ===========================
   SAĞ SİDEBAR BLOKLARI
   =========================== */
.sidebar-widget{
    background: var(--bg-section);
    border-radius:16px;
    border:1px solid var(--line-soft);
    overflow:hidden;
    box-shadow:0 10px 40px rgba(0,0,0,0.6);
    margin-bottom:22px;
}
.sidebar-widget-header{
    background: linear-gradient(90deg,#1f1f1f 0%,#141414 100%);
    border-bottom:2px solid var(--accent-brand-start);
    padding:16px 20px;
    color:var(--accent-brand-start);
    font-size:16px;
    font-weight:700;
    text-shadow:0 1px 4px rgba(230,126,34,0.3);
}
.sidebar-widget-content{
    background: var(--bg-section);
    padding:20px;
}
.sidebar-article{
    margin-bottom:18px;
    padding-bottom:18px;
    border-bottom:1px solid var(--line-soft);
    color:var(--text-primary);
}
.sidebar-article:last-child{
    margin-bottom:0;
    padding-bottom:0;
    border-bottom:none;
}
.sidebar-article-thumb{
    text-align:center;
    margin-bottom:12px;
}
.sidebar-article-thumb img{
    width:100%;
    height:150px;
    object-fit:cover;
    border-radius:8px;
    box-shadow:0 6px 20px rgba(0,0,0,0.8);
}
.sidebar-article-title a{
    color:var(--text-primary);
    font-size:16px;
    font-weight:600;
    text-decoration:none;
}
.sidebar-article-title a:hover{
    color:var(--accent-brand-start);
}
.sidebar-article-summary{
    font-size:14px;
    color:var(--text-secondary);
    line-height:1.5;
    margin-top:6px;
}

/* ===========================
   EKONOMİ TAKVİMİ TABLO
   =========================== */
.table{
    width:100%;
    background:var(--bg-section-alt);
    border-radius:12px;
    border:1px solid var(--line-soft);
    box-shadow:0 6px 18px rgba(0,0,0,0.6);
    color:var(--text-primary);
    border-collapse:separate;
    border-spacing:0;
}
.table td{
    padding:10px 12px;
    vertical-align:top;
    font-size:12px;
    color:var(--text-primary);
    border-top:1px solid var(--line-soft);
}
.table tr:first-child td{
    border-top:none;
}
.table-striped > tbody > tr:nth-of-type(odd) td{
    background:rgba(255,255,255,0.02);
}
.economic-time{
    color:var(--accent-brand-start);
    font-weight:700;
    font-size:12px;
}
.event-title{
    font-size:12px;
    color:var(--accent-brand-start);
    font-weight:700;
    line-height:1.4;
    padding-bottom:4px;
    margin-bottom:6px;
    border-bottom:1px dashed var(--line-soft);
}
.event-detail{
    font-size:12px;
    color:var(--text-primary);
    line-height:1.4;
}

/* ===========================
   GLOBAL A / LINKLER
   =========================== */
a{
    color:var(--accent-brand-start);
    text-decoration:none;
}
a:hover{
    color:var(--accent-brand-end);
    text-decoration:underline;
}
@media (max-width: 768px) {

    /* HEADER YENİ MOBİL DAVRANIŞI */
    .widget-header {
        /* tekrar ayarlıyoruz */
        display: flex;
        flex-wrap: wrap;              /* başlık kırılırsa alt satıra geçebilsin */
        flex-direction: row;          /* tekrar yatay akış */
        align-items: center;          /* dikey ortala (işte istediğin o "kutunun ortasında dursun" hissi) */
        justify-content: flex-start;
        row-gap: 8px;                 /* alt satıra inen buton ile başlık arası nefes */
        column-gap: 8px;
        min-height: 52px;             /* header yüksekliği sabit daha tok dursun */
        padding: 12px 14px 14px;
    }

    /* BAŞLIK BLOĞU */
    .widget-header-left {
        order: 1;
        flex: 1 1 auto;               /* genişliği kaplasın */
        min-width: 0;
        max-width: 100%;
        display: block;
    }

    .widget-header-left h1,
    .widget-header-left h2,
    .widget-header-left h3 {
        font-size: 15px;
        line-height: 1.4;
        margin: 0;
        max-width: 100%;
        white-space: normal;          /* çok uzun başlık satır atabilir */
        word-break: break-word;
        text-overflow: unset;
        overflow: visible;
    }

    /* DETAY GİZLE ROZETİ */
    .widget-header-right {
        order: 2;
        flex: 0 0 auto;
        align-self: flex-start;       /* şunu flex-start yerine center yaparsak rozet tam ortada dikeylenir */
        align-self: center;           /* <-- kritik: hem başlıkla aynı dikey hatta ortalanacak */
        font-size: 11px;
        line-height: 1.2;
        letter-spacing: .4px;
        padding: 2px 6px;
        border-radius: 6px;
        background: rgba(0,0,0,0.3);
        border: 1px solid rgba(255,255,255,0.07);
        text-transform: uppercase;
        color: var(--accent-brand-start);
        text-shadow:0 1px 3px rgba(0,0,0,0.8);
        box-shadow:0 4px 12px rgba(0,0,0,0.6);
    }

    /* header altındaki turuncu çizgiye (border-bottom) görsel olarak çok yakın durmasın diye */
    .widget-header {
        border-bottom-width: 2px;
    }
}
@media (max-width: 768px) {
  .widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;            /* ✅ artık ikinci satıra inemez */
    min-height: 52px;             /* kutu yüksekliği sabit */
    padding: 12px 14px;
  }

  .widget-header-left {
    flex: 1 1 auto;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .widget-header-left h1,
  .widget-header-left h2,
  .widget-header-left h3 {
    font-size: 15px;
    line-height: 1.4;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .widget-header-right {
    flex: 0 0 auto;
    align-self: center;           /* ✅ dikey ortalama */
    font-size: 11px;
    line-height: 1.2;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.07);
    color: var(--accent-brand-start);
    text-transform: uppercase;
    white-space: nowrap;          /* ✅ asla alt satıra geçmesin */
    box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  }
}
