/**
 * ME İstatistik Web - eBayi Tarzı Tema
 * Geliştirici: Mustafa Erken - www.mustafaerken.com
 */

:root {
    --red: #D71920;
    --red-dark: #A01016;
    --red-darker: #7A0B10;
    --red-light: #FF4A50;
    --red-gradient: linear-gradient(180deg, #E8252C 0%, #C8102E 45%, #9B0C24 100%);
    --nav-gradient: linear-gradient(180deg, #D71920 0%, #B81218 100%);
    --black: #1A1A1A;
    --black-soft: #2D2D2D;
    --white: #FFFFFF;
    --gray-50: #FAFAFA;
    --gray-100: #F0F0F0;
    --gray-200: #DDDDDD;
    --gray-300: #CCCCCC;
    --gray-400: #999999;
    --gray-600: #666666;
    --gray-800: #333333;
    --success: #1B8A4A;
    --success-light: #E8F8EF;
    --warning: #F5A623;
    --warning-light: #FFF8E6;
    --info: #1565C0;
    --shadow-sm: 0 1px 4px rgba(0,0,0,.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,.12);
    --shadow-lg: 0 8px 28px rgba(0,0,0,.16);
    --radius: 4px;
}

* { box-sizing: border-box; }

body {
    background: var(--gray-100);
    color: var(--black);
    font-family: 'Roboto', 'Segoe UI', system-ui, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 14px;
    line-height: 1.5;
}

/* ─── ÜST BAR (eBayi tarzı) ─── */
.ebayi-topbar {
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    font-size: .78rem;
    color: var(--gray-600);
}
.ebayi-topbar a {
    color: var(--gray-800);
    text-decoration: none;
    font-weight: 500;
    transition: color .15s;
}
.ebayi-topbar a:hover { color: var(--red); }
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .45rem 0;
    flex-wrap: wrap;
    gap: .5rem;
}
.topbar-links { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.topbar-links .sep { color: var(--gray-300); }
.topbar-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: var(--success-light);
    color: var(--success);
    padding: .2rem .65rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* ─── MARKA ALANI ─── */
.ebayi-brand-bar {
    background: var(--white);
    border-bottom: 3px solid var(--red);
    box-shadow: var(--shadow-sm);
}
.brand-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .85rem 0;
    flex-wrap: wrap;
    gap: .75rem;
}
.brand-logo {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    text-decoration: none;
    color: var(--black);
}
.brand-logo .logo-me {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--red);
    line-height: 1;
    letter-spacing: -1px;
}
.brand-logo .logo-text {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.brand-tagline {
    font-size: .82rem;
    color: var(--gray-600);
    font-weight: 500;
}
.brand-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ─── ANA NAVİGASYON ─── */
.ebayi-main-nav {
    background: var(--nav-gradient);
    border-bottom: 3px solid var(--red-darker);
    box-shadow: var(--shadow-md);
}
.ebayi-main-nav .nav-inner {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    scrollbar-width: none;
}
.ebayi-main-nav .nav-inner::-webkit-scrollbar { display: none; }
.ebayi-nav-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .85rem 1.1rem;
    color: rgba(255,255,255,.92);
    text-decoration: none;
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .6px;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,.12);
    transition: background .15s, color .15s;
    flex-shrink: 0;
}
.ebayi-nav-item:first-child { border-left: 1px solid rgba(255,255,255,.12); }
.ebayi-nav-item:hover {
    background: rgba(0,0,0,.18);
    color: var(--white);
}
.ebayi-nav-item.active {
    background: var(--white);
    color: var(--red);
    box-shadow: inset 0 -3px 0 var(--red);
}
.ebayi-nav-item i { font-size: 1rem; }

/* ─── ALT BİLGİ ŞERİDİ ─── */
.ebayi-info-strip {
    background: var(--black-soft);
    color: rgba(255,255,255,.85);
    font-size: .78rem;
    padding: .4rem 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.info-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
}
.info-strip-inner .live-dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    margin-right: .35rem;
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

/* ─── ANA İÇERİK ─── */
.site-main { flex: 1; }
.site-main > .container { padding-top: 1.25rem; padding-bottom: 2rem; }

/* ─── SAYFA BAŞLIĞI / BANNER ─── */
.page-header {
    background: var(--red-gradient);
    color: var(--white);
    border-radius: var(--radius);
    padding: 1.1rem 1.5rem;
    margin-bottom: 1.25rem;
    border: none;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.page-header::after {
    content: '';
    position: absolute;
    right: -20px; top: -20px;
    width: 120px; height: 120px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
}
.page-header h1 {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1.45rem;
    margin: 0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    position: relative;
}
.page-header p { margin: .35rem 0 0; opacity: .88; font-size: .88rem; position: relative; }
.page-header .btn { position: relative; }

/* ─── PANELLER (card-modern) ─── */
.card-modern {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.card-modern .card-header {
    background: var(--red-gradient);
    color: var(--white);
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: .88rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    border: none;
    padding: .7rem 1.1rem;
    border-bottom: 2px solid var(--red-darker);
    display: flex;
    align-items: center;
    gap: .5rem;
}
.card-modern .card-body { padding: 1.1rem; }

/* ─── CHIP / SEÇİM BUTONLARI ─── */
.chip-group { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
    display: inline-block;
    padding: .4rem .9rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-300);
    background: var(--gray-50);
    color: var(--gray-800);
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    transition: all .15s;
    text-decoration: none;
    text-align: center;
}
.chip:hover {
    border-color: var(--red);
    color: var(--red);
    background: #FFF5F5;
}
.chip.active {
    background: var(--red);
    border-color: var(--red-dark);
    color: var(--white);
    box-shadow: inset 0 -2px 0 var(--red-darker);
}

/* ─── BUTONLAR ─── */
.btn-red {
    background: var(--red-gradient);
    border: 1px solid var(--red-dark);
    color: var(--white);
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    padding: .65rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: 0 2px 6px rgba(215,25,32,.3);
    transition: all .15s;
}
.btn-red:hover, .btn-red:focus {
    background: var(--red-dark);
    border-color: var(--red-darker);
    color: var(--white);
    box-shadow: 0 3px 10px rgba(215,25,32,.4);
    transform: translateY(-1px);
}
.btn-red:disabled { opacity: .55; transform: none; box-shadow: none; }

.btn-outline-red {
    border: 2px solid var(--red);
    color: var(--red);
    font-weight: 700;
    border-radius: var(--radius);
    font-family: 'Roboto Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.btn-outline-red:hover {
    background: var(--red);
    color: var(--white);
}

.btn-black {
    background: var(--black-soft);
    border: 1px solid var(--black);
    color: var(--white);
    font-weight: 700;
    border-radius: var(--radius);
    font-family: 'Roboto Condensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: .3px;
}
.btn-black:hover { background: var(--black); color: var(--white); }

/* ─── AT SATIRLARI ─── */
.horse-row {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: .75rem 1rem;
    margin-bottom: .45rem;
    background: var(--white);
    transition: border-color .15s, box-shadow .15s;
    border-left: 3px solid transparent;
}
.horse-row:hover {
    border-color: var(--red-light);
    border-left-color: var(--red);
    box-shadow: var(--shadow-sm);
}
.horse-row.scratched { background: #FFF0F0; opacity: .75; border-left-color: var(--gray-400); }
.horse-row.locked { background: var(--warning-light); border-color: var(--warning); border-left-color: var(--warning); }
.horse-row.coupled { border-left-color: #8e44ad; }

.horse-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px; height: 34px;
    border-radius: var(--radius);
    background: var(--red-gradient);
    color: var(--white);
    font-weight: 900;
    font-size: .9rem;
    font-family: 'Roboto Condensed', sans-serif;
    box-shadow: 0 2px 4px rgba(215,25,32,.25);
}

.score-badge {
    display: inline-block;
    padding: .15rem .55rem;
    border-radius: var(--radius);
    font-weight: 800;
    font-size: .82rem;
    background: var(--black-soft);
    color: var(--white);
    font-family: 'Roboto Condensed', sans-serif;
}

.label-badge {
    display: inline-block;
    padding: .12rem .5rem;
    border-radius: 2px;
    font-size: .7rem;
    font-weight: 700;
    color: var(--white);
    text-transform: uppercase;
    letter-spacing: .3px;
}
.label-banko { background: var(--red-dark); }
.label-agir-favori { background: #9B0C24; }
.label-guclu { background: var(--success); }
.label-kupona { background: var(--gray-800); }
.label-surpriz { background: #9b59b6; }
.label-zayif { background: var(--gray-400); }
.label-riskli-favori { background: #e67e22; }
.label-value { background: #16a085; }

.risk-low { color: var(--success); font-weight: 700; }
.risk-mid { color: var(--warning); font-weight: 700; }
.risk-high { color: var(--red); font-weight: 700; }

/* ─── ACCORDION ─── */
.leg-accordion .accordion-button {
    background: var(--black-soft);
    color: var(--white);
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-size: .88rem;
    border-radius: var(--radius) !important;
}
.leg-accordion .accordion-button:not(.collapsed) {
    background: var(--red-gradient);
    color: var(--white);
    box-shadow: none;
}
.leg-accordion .accordion-button::after { filter: invert(1); }
.leg-accordion .accordion-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: .5rem;
    overflow: hidden;
}

/* ─── TABLOLAR (eBayi tarzı) ─── */
.table { font-size: .84rem; }
.agf-table, .ebayi-table {
    font-size: .82rem;
    border-collapse: collapse;
    width: 100%;
}
.agf-table th, .ebayi-table th {
    background: var(--black-soft);
    color: var(--white);
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    font-size: .75rem;
    padding: .55rem .65rem;
    border: 1px solid var(--gray-800);
    position: sticky;
    top: 0;
    z-index: 2;
}
.agf-table td, .ebayi-table td {
    padding: .45rem .65rem;
    border: 1px solid var(--gray-200);
    vertical-align: middle;
}
.agf-table tbody tr:nth-child(even), .ebayi-table tbody tr:nth-child(even) {
    background: var(--gray-50);
}
.agf-table tbody tr:hover, .ebayi-table tbody tr:hover {
    background: #FFF5F5;
}
.agf-table .agf-up { color: var(--success); font-weight: 700; }
.agf-table .agf-down { color: var(--red); font-weight: 700; }
.agf-table .agf-fav { background: rgba(215,25,32,.07) !important; font-weight: 600; }

/* ─── İSTATİSTİK KARTLARI ─── */
.stat-card {
    text-align: center;
    padding: 1rem;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-top: 3px solid var(--red);
    box-shadow: var(--shadow-sm);
    transition: box-shadow .15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card .stat-value {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--red);
    line-height: 1.1;
}
.stat-card .stat-label {
    font-size: .72rem;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: .5px;
    font-weight: 700;
    margin-top: .25rem;
}

/* ─── YÜKLEME ─── */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}
.loading-overlay .spinner-border { width: 3rem; height: 3rem; color: var(--red); }

/* ─── KUPON ─── */
.coupon-leg {
    border-left: 4px solid var(--red);
    padding-left: 1rem;
    margin-bottom: 1rem;
    background: var(--gray-50);
    padding: .75rem 1rem;
    border-radius: 0 var(--radius) var(--radius) 0;
}
.coupon-tab-link.active { background: var(--red) !important; color: #fff !important; }

.nav-tabs .nav-link {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: .78rem;
    letter-spacing: .4px;
    color: var(--gray-800);
    border-radius: var(--radius) var(--radius) 0 0;
}
.nav-tabs .nav-link.active {
    color: var(--red);
    border-color: var(--gray-200) var(--gray-200) var(--white);
    border-top: 3px solid var(--red);
    font-weight: 900;
}

.agf-panel {
    background: #F5F9FF;
    border: 1px solid #C5D9F0;
    border-left: 4px solid var(--info);
    border-radius: var(--radius);
    padding: .75rem 1rem;
}

/* ─── BİLGİSAYAR TABLOSU ─── */
.computer-table-scroll { overflow-x: auto; }
.computer-table-row { display: flex; gap: 10px; min-width: max-content; }
.computer-leg-col {
    width: 168px; min-width: 168px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-top: 3px solid var(--red);
    border-radius: var(--radius);
    padding: 8px;
}
.computer-leg-head {
    font-family: 'Roboto Condensed', sans-serif;
    font-size: .75rem;
    font-weight: 800;
    color: var(--black-soft);
    margin-bottom: 4px;
    text-transform: uppercase;
}
.maiden-tag { font-size: .65rem; color: #d35400; font-weight: 700; margin-bottom: 4px; }
.computer-th-row {
    display: flex;
    border-bottom: 2px solid var(--red);
    padding-bottom: 4px;
    font-size: .65rem;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
}
.computer-th-row .th-puan { width: 44px; }
.computer-data-row {
    display: flex;
    padding: 3px 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: .7rem;
}
.computer-data-row.first-row { background: var(--warning-light); }
.puan-val { width: 44px; font-weight: 800; font-family: 'Roboto Condensed', sans-serif; }
.computer-data-row.first-row .puan-val { color: var(--success); }
.at-line { flex: 1; line-height: 1.3; }
.summary-block { margin-top: 8px; padding: 6px; border-radius: var(--radius); font-size: .65rem; }
.summary-block.derece-block { background: var(--warning-light); }
.summary-block.galop-block { background: #FFF3E0; }
.tek-line {
    margin-top: 6px;
    font-size: .7rem;
    font-weight: 800;
    color: var(--success);
    text-align: center;
    font-family: 'Roboto Condensed', sans-serif;
}

.score-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem .75rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}
.score-mini-val { font-weight: 900; color: var(--red); font-family: 'Roboto Condensed', sans-serif; }

.info-table td { padding: .55rem 1rem; border-bottom: 1px solid var(--gray-200); }
.info-table tr:nth-child(even) { background: var(--gray-50); }

.saved-card { border: 2px solid var(--gray-200); border-radius: var(--radius); }
.saved-card-won { border-color: var(--success) !important; background: var(--success-light); }
.saved-card-alive { border-color: var(--info) !important; background: #E3F2FD; }
.saved-card-lost { border-color: #f5b7b1 !important; background: #fdf8f8; }

.kupon-ayak-box {
    border: 1px solid var(--gray-200);
    border-top: 3px solid var(--red);
    border-radius: var(--radius);
    padding: .75rem;
    text-align: center;
    min-height: 100px;
    background: var(--white);
}

.history-chip {
    display: inline-block;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    padding: .1rem .35rem;
    border-radius: 2px;
    font-size: .7rem;
    margin-right: 2px;
}

.race-card .nav-link.active { color: var(--red); border-color: var(--red); font-weight: 700; }

.report-pre {
    background: var(--black-soft);
    color: #f0f0f0;
    padding: 1rem;
    border-radius: var(--radius);
    font-size: .8rem;
    white-space: pre-wrap;
    word-break: break-word;
    border-left: 4px solid var(--red);
}

/* ─── ALERT ─── */
.alert {
    border-radius: var(--radius);
    border: none;
    border-left: 4px solid;
    font-size: .88rem;
}
.alert-danger { border-left-color: var(--red); background: #FFF0F0; color: var(--red-dark); }
.alert-success { border-left-color: var(--success); background: var(--success-light); }
.alert-warning { border-left-color: var(--warning); background: var(--warning-light); }
.alert-info { border-left-color: var(--info); background: #E3F2FD; }

/* ─── FORM ─── */
.form-label { font-weight: 700; font-size: .82rem; text-transform: uppercase; letter-spacing: .3px; color: var(--gray-800); }
.form-control, .form-select {
    border-radius: var(--radius);
    border-color: var(--gray-300);
    font-size: .88rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 .2rem rgba(215,25,32,.15);
}

/* ─── FOOTER (eBayi tarzı) ─── */
.site-footer {
    background: var(--black);
    color: rgba(255,255,255,.65);
    margin-top: auto;
    border-top: 4px solid var(--red);
}
.footer-top {
    padding: 2rem 0 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer-col h6 {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    font-size: .82rem;
    color: var(--white);
    margin-bottom: .85rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--red);
    display: inline-block;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: .4rem; }
.footer-col ul li a {
    color: rgba(255,255,255,.6);
    text-decoration: none;
    font-size: .82rem;
    transition: color .15s;
}
.footer-col ul li a:hover { color: var(--red-light); }
.footer-bottom {
    padding: 1rem 0;
    text-align: center;
    font-size: .78rem;
    color: rgba(255,255,255,.45);
}
.footer-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
}
.footer-link:hover { color: var(--red-light); }
.footer-dev-link { color: rgba(255,255,255,.55); text-decoration: none; }
.footer-dev-link:hover { color: var(--red-light); }

.footer-disclaimer {
    padding: 1.25rem 0 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    background: rgba(0,0,0,.15);
}
.disclaimer-box {
    max-width: 920px;
    margin: 0 auto;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(255,255,255,.12);
    border-left: 4px solid var(--red);
    border-radius: var(--radius);
    background: rgba(255,255,255,.04);
    text-align: center;
}
.disclaimer-title {
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: rgba(255,255,255,.85);
    margin-bottom: .5rem;
}
.disclaimer-title i { color: var(--red-light); margin-right: .35rem; }
.disclaimer-text {
    font-size: .78rem;
    line-height: 1.65;
    color: rgba(255,255,255,.55);
    margin: 0;
}
.disclaimer-text strong { color: rgba(255,255,255,.75); font-weight: 600; }

/* ─── HIZLI ERİŞİM ŞERİDİ ─── */
.quick-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
    margin-bottom: 1.25rem;
}
.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: .85rem .5rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-top: 3px solid var(--red);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--gray-800);
    font-family: 'Roboto Condensed', sans-serif;
    font-weight: 700;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .3px;
    transition: all .15s;
    box-shadow: var(--shadow-sm);
}
.quick-item i { font-size: 1.4rem; color: var(--red); }
.quick-item:hover {
    border-color: var(--red);
    color: var(--red);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
    .brand-logo .logo-me { font-size: 1.8rem; }
    .brand-logo .logo-text { font-size: 1.1rem; }
    .ebayi-nav-item { padding: .7rem .75rem; font-size: .75rem; }
    .page-header { padding: .9rem 1.1rem; }
    .page-header h1 { font-size: 1.15rem; }
    .chip { font-size: .78rem; padding: .35rem .7rem; }
    .footer-top .row > div { margin-bottom: 1.25rem; }
}
