:root {
    --bg-dark: #0f1623;
    --bg-sidebar: #131b2e;
    --bg-card: #1c253b;
    --bg-hover: #252f48;
    --accent: #2752ff;
    --accent-hover: #1a40e0;
    --text-primary: #ffffff;
    --text-secondary: #8b9bb4;
    --border-color: rgba(255, 255, 255, 0.08);
    --green: #22c55e;
    --red: #ef4444;
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    height: 100vh;
    overflow: hidden;
}

.app-container {
    display: grid;
    grid-template-columns: 280px 1fr 300px;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow-y: auto;
}

.search-box {
    position: relative;
    margin-bottom: 16px;
}

.search-box input {
    width: 100%;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    padding: 10px 36px 10px 12px;
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 13px;
}

.search-box i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
}

.menu-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    background: var(--bg-dark);
    padding: 4px;
    border-radius: 6px;
}

.menu-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
}

.menu-tab.active {
    background: var(--accent);
    color: white;
}

.time-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-size: 13px;
    margin-bottom: 16px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
}

.time-filter:hover {
    background: var(--bg-hover);
}

/* Sports Menu */
.sport-item {
    margin-bottom: 2px;
}

.sport-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 8px;
    cursor: pointer;
    border-radius: 6px;
    transition: background 0.2s;
}

.sport-header:hover {
    background: var(--bg-hover);
}

.sport-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
}

.sport-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 12px;
}

.sport-children {
    padding-left: 12px;
    margin-top: 2px;
}

.country-item {
    padding: 8px 8px 8px 24px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
}

.country-item:hover {
    background: var(--bg-hover);
    color: white;
}

/* Main Content */
.main-content {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--bg-dark);
}

.main-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg-dark);
    z-index: 10;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
}

.breadcrumb i {
    color: var(--text-secondary);
    font-size: 12px;
}

.market-headers {
    display: flex;
    gap: 24px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    margin-right: 60px; /* Space for expand button */
}

.market-col {
    width: 180px;
    text-align: center;
}

/* Match List */
.match-list {
    padding: 16px;
}

.match-row {
    background: var(--bg-card);
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    padding: 16px;
    transition: background 0.2s;
}

.match-row:hover {
    background: #202a40;
}

.match-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.match-teams {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.team {
    font-size: 14px;
    font-weight: 500;
}

.match-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Live Match Score */
.match-score {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.score-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.score-separator {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* Live Indicator */
.live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.live-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(0.8);
    }
}

.live-time {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.match-odds {
    display: flex;
    gap: 12px;
}

.odd-group {
    display: flex;
    gap: 1px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    width: 180px;
}

.odd-btn {
    flex: 1;
    background: var(--bg-card);
    border: none;
    color: var(--text-primary);
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 40px;
}

.odd-btn:hover {
    background: var(--bg-hover);
}

.odd-btn.locked {
    color: var(--text-secondary);
    cursor: not-allowed;
}

.match-more {
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    margin-left: 16px;
}

.match-more:hover {
    color: white;
}

/* Match Details */
.match-details {
    background: #151b2c;
    margin-top: -4px;
    margin-bottom: 8px;
    border-radius: 0 0 8px 8px;
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.detail-market {
    background: var(--bg-dark);
    border-radius: 6px;
    overflow: hidden;
}

.detail-header {
    padding: 8px 12px;
    background: rgba(255,255,255,0.03);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.detail-odds {
    padding: 8px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
}

.detail-odd-btn {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
}

.detail-odd-btn:hover {
    border-color: var(--accent);
}

.detail-odd-val {
    color: var(--accent);
    font-weight: 700;
}

/* Betslip */
.betslip-sidebar {
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: relative;
}

.betslip-header {
    padding: 16px;
    text-align: center;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    background: #101626;
    flex-shrink: 0; /* Header'ın küçülmesini engelle */
}

.betslip-settings {
    padding: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0; /* Settings'in küçülmesini engelle */
}

.betslip-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 14px;
}

.betslip-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    min-height: 0; /* Flexbox scroll için gerekli */
}

.betslip-bet-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.betslip-match-info {
    margin-bottom: 8px;
}

.betslip-match-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.betslip-match-details {
    font-size: 11px;
    color: var(--text-secondary);
}

.betslip-selection-info {
    margin-bottom: 8px;
    padding: 8px;
    background: var(--bg-dark);
    border-radius: 4px;
}

.betslip-market-name {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.betslip-event-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.betslip-bet-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.betslip-odd-display {
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
}

.betslip-remove-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.betslip-remove-btn:hover {
    background: var(--red);
    border-color: var(--red);
    color: white;
}

.betslip-total {
    margin-top: 16px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.betslip-total-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.betslip-total-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent);
}

.betslip-amount-section {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-sidebar);
    position: sticky;
    bottom: 60px; /* Butonun yüksekliği kadar üstte */
    z-index: 10;
    flex-shrink: 0;
}

.betslip-amount-input {
    width: 100%;
    padding: 10px;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 500;
}

.betslip-amount-input:focus {
    outline: none;
    border-color: var(--accent);
}

.betslip-amount-input::placeholder {
    color: var(--text-secondary);
}

.betslip-potential-win {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--bg-card);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.betslip-potential-win-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.betslip-potential-win-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--green);
}

.betslip-actions {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-sidebar);
    position: sticky;
    bottom: 0;
    z-index: 10;
    flex-shrink: 0; /* Buton alanının küçülmesini engelle */
}

.btn-primary {
    width: 100%;
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.hidden {
    display: none;
}

.loading-spinner {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.2);
}

/* Match Detail View */
.match-detail-view {
    padding: 0;
    overflow-y: auto;
    height: 100%;
    background: var(--bg-dark);
    position: relative;
}

.match-detail-view::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 300px;
    background: linear-gradient(135deg, rgba(39, 82, 255, 0.1) 0%, rgba(15, 22, 35, 0.9) 100%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 200"><rect fill="%231a2e4a" width="400" height="200"/><path d="M0 100 Q100 50 200 100 T400 100" stroke="%233352ff" stroke-width="2" fill="none" opacity="0.3"/><circle cx="200" cy="100" r="30" fill="%233352ff" opacity="0.2"/></svg>');
    background-size: cover;
    background-position: center;
    z-index: 0;
    opacity: 0.3;
}

.match-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: transparent;
    position: relative;
    z-index: 1;
}

.match-detail-back-btn {
    background: rgba(28, 37, 59, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: all 0.2s;
    backdrop-filter: blur(10px);
}

.match-detail-back-btn:hover {
    background: rgba(37, 47, 72, 0.9);
    border-color: var(--accent);
}

.match-detail-title {
    font-size: 18px;
    font-weight: 600;
    display: none;
}

.match-detail-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 40px;
    position: relative;
    z-index: 1;
}

.match-detail-main {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.match-detail-header-info {
    text-align: left;
    padding: 20px 24px;
    background: transparent;
    position: relative;
    z-index: 1;
}

.match-detail-league {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.match-detail-league::before {
    content: '';
    width: 4px;
    height: 4px;
    background: var(--accent);
    border-radius: 50%;
}

.match-detail-date {
    font-size: 12px;
    color: var(--text-secondary);
    opacity: 0.7;
}

.match-detail-score-card {
    background: rgba(28, 37, 59, 0.6);
    backdrop-filter: blur(10px);
    border-radius: 0;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.match-detail-team {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
}

.match-detail-team-name {
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    color: var(--text-primary);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.match-detail-team-score {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.match-detail-vs {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0 12px;
    flex-shrink: 0;
}

.match-detail-status-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
    min-width: 80px;
}

.match-detail-status-right .match-detail-status-item {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    font-size: 12px;
    color: var(--text-primary);
    font-weight: 500;
}

.match-detail-text-info {
    font-size: 11px;
    color: var(--text-secondary);
    text-align: right;
}

.match-detail-status {
    display: none;
}

.match-detail-stats,
.match-detail-info {
    background: rgba(28, 37, 59, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 0;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.match-detail-stats:last-child,
.match-detail-info:last-child {
    border-bottom: none;
}

.match-detail-section-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 13px;
}

.match-detail-section-title i {
    color: var(--accent);
    font-size: 14px;
}

.match-detail-stat-item {
    margin-bottom: 20px;
}

.match-detail-stat-item:last-child {
    margin-bottom: 0;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-bars {
    display: flex;
    gap: 16px;
    align-items: center;
}

.stat-bar {
    flex: 1;
    height: 28px;
    background: rgba(15, 22, 35, 0.6);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
}

.stat-bar-fill {
    height: 100%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 10px;
    min-width: 35px;
    transition: width 0.3s ease;
}

.stat-bar-fill-right {
    justify-content: flex-end;
    margin-left: auto;
    background: rgba(39, 82, 255, 0.5);
}

.stat-bar-fill span {
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.match-detail-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.match-detail-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    background: rgba(15, 22, 35, 0.4);
    border-radius: 6px;
    border: 1px solid var(--border-color);
}

.info-label {
    font-size: 11px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.info-value {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Match Detail Markets */
.match-detail-markets {
    background: rgba(28, 37, 59, 0.4);
    backdrop-filter: blur(10px);
    border-radius: 0;
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
}

.markets-loading {
    text-align: center;
    padding: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

.markets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.market-card {
    background: rgba(15, 22, 35, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    transition: all 0.2s;
}

.market-card:hover {
    background: rgba(15, 22, 35, 0.8);
    border-color: var(--accent);
}

.market-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

.market-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.market-key {
    font-size: 11px;
    color: var(--text-secondary);
    background: rgba(39, 82, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
}

.market-odds-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
}

.market-odd-btn {
    background: rgba(28, 37, 59, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-height: 60px;
    justify-content: center;
}

.market-odd-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.market-odd-btn .odd-name {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    text-align: center;
}

.market-odd-btn:hover .odd-name {
    color: white;
}

.market-odd-btn .odd-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

.market-odd-btn:hover .odd-price {
    color: white;
}