/* ===== HÜSEYİNBEY SARRAFIYE — style.css ===== */

:root {
    --bg-color:    #f0f0f0;
    --card-bg:     #ffffff;
    --border-color:#d8d8d8;
    --box-buy:     #b71c1c;
    --box-sell:    #1b5e20;
    --gold:        #B8860B;
    --gold-light:  #C9A227;
    --silver:      #6b7280;
    --silver-light:#9ca3af;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background: var(--bg-color);
    color: #1a1a1a;
    font-family: 'Barlow', sans-serif;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* ============================
   HEADER  (2-sütun grid)
   ============================ */
.app-header {
    display: grid;
    grid-template-columns: 1fr clamp(180px, 18vw, 300px);
    background: #ffffff;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 1vh;
    box-shadow: 0 2px 12px rgba(0,0,0,.1);
    flex-shrink: 0;
}

/* SÜTUN 1: başlık + şerit */
.header-left {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.header-top-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 1vh 1.5vw 6px;
}

.header-title {
    font-size: clamp(1rem, 2.4vw, 2rem);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background: linear-gradient(to bottom, #D4AF37 0%, #B8860B 45%, #8B6914 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,.15));
    -webkit-font-smoothing: antialiased;
}

.header-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(.75rem, 1.3vw, 1rem);
    font-weight: 700;
    color: #888;
    letter-spacing: .5px;
}

.header-sep { color: #ccc; }

/* SÜTUN 2: logo */
.header-logo-col {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1vh 2vw;
    border-left: 1px solid #f0f0f0;
    background: #fff;
}

.header-logo {
    height: auto;
    max-height: clamp(72px, 10.5vh, 140px);
    max-width: clamp(180px, 17vw, 290px);
    width: auto;
    object-fit: contain;
}

/* ============================
   KAYAN ŞERİT  (header-left altında)
   ============================ */
.marquee-bar {
    overflow: hidden;
    background: linear-gradient(90deg, #2d1a00 0%, #4a2c00 50%, #2d1a00 100%);
    border-top: 1px solid rgba(184,134,11,.25);
    flex-shrink: 0;
    margin-top: auto;
    height: clamp(26px, 3.5vh, 44px);
    display: flex;
    align-items: center;
}

.marquee-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
    animation: marquee-scroll 30s linear infinite;
    will-change: transform;
}

.marquee-track span {
    font-size: clamp(.65rem, 1.2vw, .9rem);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 0 20px;
    color: #D4AF37;
}

.marquee-sep {
    color: rgba(255,255,255,.3) !important;
    font-size: .45rem !important;
    padding: 0 2px !important;
    letter-spacing: 0 !important;
}

@keyframes marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ============================
   ANA LAYOUT (2 SÜTUN)
   ============================ */
.layout-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5vw;
    padding: 0 1.5vw;
    flex: 1;
    min-height: 0;
}

/* ============================
   KOLON BÖLÜMÜ
   ============================ */
.col-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* Kolon başlık satırı */
.col-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1vh;
    flex-shrink: 0;
    padding-right: 2px;
    min-height: 3.5vh;
}

.header-labels { display: flex; gap: .8vw; }

.header-label {
    width: clamp(90px, 12vw, 220px);
    text-align: center;
    font-size: clamp(.9rem, 2vh, 1.3rem);
    font-weight: 700;
    color: #444;
}

/* Fiyat listesi */
.price-list {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    gap: 4px;
    min-height: 0;
    overflow: hidden;
}

/* Tek satır */
.price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--card-bg);
    border-radius: 7px;
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--gold);
    flex: 1 1 0;
    min-height: 0;
    padding: 0 .8vw;
    box-shadow: 0 2px 5px rgba(0,0,0,.07);
    opacity: 0;
    transform: translateY(10px);
    animation: fade-in-row .35s ease-out forwards;
    position: relative;
}

/* Gümüş satırlarında gümüş rengi sol kenar */
#gumus-list .price-row { border-left-color: var(--silver-light); }

.price-row:nth-child(even) { background-color: #fafafa; }

.price-row.loading-placeholder {
    opacity: 1; transform: none; animation: none;
    border-left-color: rgba(184,134,11,.25);
}

/* Ürün adı */
.item-name {
    font-size: clamp(13px, min(2vw, 3.8vh), 36px);
    font-weight: 800;
    text-transform: uppercase;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-left: 6px;
    color: #1a1a1a;
}

/* Fiyat kutuları */
.price-boxes {
    display: flex;
    gap: .8vw;
    align-items: center;
    height: 82%;
}

.price-box {
    width: clamp(90px, 12vw, 220px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    font-family: 'Oswald', sans-serif;
    font-size: clamp(18px, min(3vw, 5vh), 52px);
    letter-spacing: -.3px;
    font-weight: 700;
    border-radius: 6px;
    box-shadow: inset 0 0 10px rgba(0,0,0,.25);
    white-space: nowrap;
    overflow: hidden;
    color: #ffffff;
}

.box-buy  { background-color: var(--box-buy);  animation: flash-buy  1.5s ease-out; }
.box-sell { background-color: var(--box-sell); animation: flash-sell 1.5s ease-out; }

/* ============================
   CANLI ROZET
   ============================ */
.live-indicator {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(0,180,80,.08);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0,180,80,.3);
    position: relative;
    overflow: hidden;
}

.live-indicator::after {
    content: '';
    position: absolute;
    top: 0; left: -150%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0,180,80,.2), transparent);
    transform: skewX(-20deg);
    animation: radar-scan 3s infinite linear;
    pointer-events: none;
}

.live-dot {
    width: 10px; height: 10px;
    background: #00c853;
    border-radius: 50%;
    box-shadow: 0 0 8px #00c853;
    animation: blink-live 1.5s infinite;
    flex-shrink: 0;
    position: relative; z-index: 2;
}
.live-dot.small { width: 8px; height: 8px; }

.live-text {
    color: #1b7a3e;
    font-weight: 700;
    font-size: clamp(.65rem, 1.3vw, .95rem);
    letter-spacing: 1px;
    position: relative; z-index: 2;
}

/* ============================
   ONS & GÜMÜŞ SPOT KUTULARI
   ============================ */
.col-info-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .8vw;
    flex-shrink: 0;
    margin-top: .8vh;
    padding-bottom: .5vh;
}

.spot-box {
    background-color: #ffffff;
    border-radius: 10px;
    padding: .6vh .8vw;
    text-align: center;
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: background-color .1s, box-shadow .1s;
}

.spot-title {
    font-size: clamp(.75rem, 1.5vh, 1.1rem);
    font-weight: 700;
    color: #666;
    text-transform: uppercase;
    line-height: 1.1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.spot-value {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(.95rem, 2.8vh, 2.2rem);
    font-weight: 700;
    color: #1a1a1a;
    margin-top: 2px;
    line-height: 1.1;
    letter-spacing: .5px;
}

/* ONS — yeşil */
.spot-ons { background: #e8f5e9; border-color: rgba(27,94,32,.25); }
.spot-ons .spot-title { color: #1b5e20; }
.spot-ons .spot-value { color: #1b5e20; }

/* GÜMÜŞ — gri/gümüş */
.spot-gumus { background: #f5f5f5; border-color: rgba(107,114,128,.2); }
.spot-gumus .spot-title { color: var(--silver); }
.spot-gumus .spot-value { color: #374151; }

.flash-spot-up   { animation: spot-green-intense .6s ease-out; }
.flash-spot-down { animation: spot-red-intense   .6s ease-out; }

/* ============================
   FOOTER
   ============================ */
.footer-area {
    flex-shrink: 0;
    padding: 8px 2vw;
    background-color: transparent;
    z-index: 10;
}

.progress {
    height: 7px;
    background: #e0e0e0;
    border-radius: 10px;
    margin-bottom: 6px;
    border: 1px solid #d0d0d0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--gold);
    border-radius: 10px;
    transition: width 1s linear;
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px;
}

.footer-note, .footer-refresh {
    font-size: clamp(.65rem, 1.3vw, .9rem);
    color: rgba(0,0,0,.4);
    font-weight: 600;
    letter-spacing: 1px;
}
.footer-refresh { color: rgba(150,110,0,.7); }
.footer-refresh strong { color: var(--gold); }

.signature {
    font-size: clamp(.65rem, 1.3vw, .9rem);
    color: rgba(0,0,0,.3);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: lowercase;
}
.signature strong { color: rgba(184,134,11,.6); }

/* ============================
   ANİMASYONLAR
   ============================ */
@keyframes fade-in-row {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes flash-buy {
    0%   { background-color: #ef5350; box-shadow: 0 0 20px #ef5350; }
    100% { background-color: var(--box-buy); box-shadow: inset 0 0 10px rgba(0,0,0,.25); }
}

@keyframes flash-sell {
    0%   { background-color: #66bb6a; box-shadow: 0 0 20px #66bb6a; }
    100% { background-color: var(--box-sell); box-shadow: inset 0 0 10px rgba(0,0,0,.25); }
}

@keyframes blink-live {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: .4; transform: scale(.8); }
}

@keyframes radar-scan {
    0%   { left: -150%; }
    50%  { left:  150%; }
    100% { left:  150%; }
}

@keyframes spot-green-intense {
    0%   { background-color: rgba(100,220,130,.45); border-color: rgba(27,94,32,.6); }
    100% { background-color: #e8f5e9; border-color: rgba(27,94,32,.25); }
}

@keyframes spot-red-intense {
    0%   { background-color: rgba(255,120,120,.4); border-color: rgba(183,28,28,.5); }
    100% { background-color: #f5f5f5; border-color: rgba(107,114,128,.2); }
}

/* ============================
   RESPONSİF
   ============================ */
@media (max-width: 900px) {
    body { height: auto; min-height: 100vh; overflow-y: auto; }
    .layout-grid { grid-template-columns: 1fr; gap: 12px; padding: 0 12px; }
    .col-section { height: auto; }
    .price-list { height: auto; overflow: visible; justify-content: flex-start; gap: 4px; }
    .price-row { flex: none; min-height: 44px; }
    .item-name { font-size: clamp(.85rem, 4vw, 1.3rem); }
    .header-label, .price-box { width: clamp(80px, 22vw, 130px); }
    .price-box { font-size: clamp(1rem, 6vw, 1.8rem); height: auto; }
    .col-info-boxes { gap: 10px; margin-top: 10px; }
    .header-logo { max-height: 56px; max-width: 160px; }
    .header-logo-col { padding: 8px 12px; }
}

@media (max-width: 480px) {
    .app-header { grid-template-columns: 1fr; }
    .header-logo-col { display: none; }
    .header-title { font-size: clamp(.9rem, 5vw, 1.3rem); }
    .price-box { font-size: clamp(.9rem, 5.5vw, 1.5rem); }
}
