:root{
	--bg:#f3f4f6;
	--panel:#ffffff;
	--muted:#6b7280;
	--accent:#3981B6;
	--accent-2:#65a2cf;
	--glass: rgba(0,0,0,0.04);
	--card-radius:8px;
	--gap:12px;
	--max-width:1400px;
	--fs-sm:0.875rem;
	--fs-base:1rem;
	color-scheme: light;
	font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

*{box-sizing:border-box}
html,body{margin:0;background:var(--bg);font-size:var(--fs-base);color:#111827}

/* Page wrapper */
.app{
	/* max-width:var(--max-width); */
	display:grid;
	grid-template-columns: 260px auto 1fr;
	gap:20px;
	padding:20px;
	align-items: start;
}

.sidebar {
    background: var(--panel);
    border-radius: var(--card-radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
	height: auto;            
    max-height: 100vh;        
	align-self: flex-start;
    overflow-y: auto;
	z-index:999;
}

.rightbar {
    background: var(--panel);
    border-radius: var(--card-radius);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    height: auto;
    max-height: 100vh;
    align-self: flex-start;
    overflow-y: auto;
    z-index: 999; 
}
.rightbar h3{margin:0 0 8px 0;font-size:0.95rem}
.rightbar h4{margin:0 0 8px 0;font-size:0.85rem}
.rightbar p{margin:0;color:var(--muted);font-size:0.9rem}

.app.no-rightbar {
	grid-template-columns: 260px 1fr;
}

.frame {
	background:#f9fafb;padding:10px;border-radius:8px;border:1px solid #ccc;
}

.exp-container {
    width: 100%;          /* Bar genişliği */
    height: 6px;          /* Bar yüksekliği */
    background-color: #f9fafb; /* Arka plan rengi */
    border-radius: 6px;     /* Yuvarlak köşeler */
    overflow: hidden;       /* İç bar dışa taşmasın */
    border: 1px solid #ccc; /* İnce sınır */
}

.exp-bar {
    height: 100%;
    background-color: #3981B6; /* Sarı/turuncu ilerleme rengi */
    width: 0%;                 /* Başlangıçta %0 */
    transition: width 0.3s ease; /* Yumuşak animasyon */
}

.gradient-text {
	display:inline-block;
	background: linear-gradient(to right, 
    #3981B6,   /* Açık mavi */
    #2F6A91,   /* Orta mavi */
    #244F6D,   /* Daha koyu */
    #1A364D    /* En koyu */
	);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text; /* Safari/Firefox */
	color: transparent;
}

.ticker {
	overflow: hidden;
	white-space: nowrap;
	width: 100%;
	background: #f9fafb;
	color: #6b7280;
	padding: 8px 10px;
	border-radius: 8px;
	box-sizing: border-box;
	border:1px solid #ccc;
}

/* Kayan içerik */
.ticker-content {
	display: inline-block;
	padding-left: 100%; /* Başlangıçta sağdan başlasın */
	animation: scroll 60s linear infinite;
}

/* Her bir öğe arası boşluk */
.ticker-content span {
	display: inline-block;
	margin-right: 30px;
	white-space: nowrap;
}

.ticker-content span a {
	text-decoration:none;
	color: #6b7280;
}

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

/* Responsive font ve padding */
@media (max-width: 768px) {
	.ticker {
		position:fixed;
		left:0;
		right:0;
		top:135px;
		margin:0;
		border-radius:0;
		font-size: 14px;
		padding: 6px 8px;
	}
	.ticker-content span {
		margin-right: 30px;
	}
}

@media (max-width: 480px) {
	.ticker {
		font-size: 12px;
		padding: 4px 6px;
	}
	.ticker-content span {
		margin-right: 20px;
	}
}

/* Kayan animasyon */
@keyframes scroll {
	0% { transform: translateX(0); }
	100% { transform: translateX(-100%); }
}

.logo{display:flex;align-items:center;gap:10px}
.mark{width:44px;height:44px;border-radius:10px;background:linear-gradient(135deg,var(--accent),var(--accent-2));display:flex;align-items:center;justify-content:center;font-weight:700;color:white}
.logo h1{font-size:1rem;margin:0}

.toplogo{height:75px;background:var(--panel);padding:14px;display:flex;align-items:center;justify-content: space-between;gap:10px; padding-left:20px; border-bottom:1px solid #ccc; z-index:998;}
.toplogo h1{font-size:1.1rem;margin:0}

.toplogo > a {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: inherit;
}

.lang-switch {
	margin-left: auto; /* dili sağ tarafa iter */
	display: flex;
	align-items: center;
	gap: 10px;
	padding-right:20px;
}

.lang-switch a {
	color: var(--text-color, #007bff);
	text-decoration: none;
	font-size: 0.95rem;
	font-weight: 500;
	transition: color 0.2s;
}

.lang-switch a:hover {
	color: var(--accent-color, #0056b3);
	text-decoration: underline;
}

.nav-section {
	margin-top: 6px;
}

.nav-section a {
	display: flex;
	align-items: center;
	padding: 5px;
	border-radius: 8px;
	color: var(--muted);
	text-decoration: none;
	gap: 8px;
}

.nav-section a:hover {
	background: var(--glass);
	color: var(--accent);
}

.nav-section a.active {
	background: linear-gradient(90deg, rgba(0,0,0,0.05), rgba(0,0,0,0.02));
	color: var(--accent);
}

/* Dropdown */
.dropdown {
	display: flex;
	flex-direction: column;
}

.dropdown-menu {
	display: none;
	flex-direction: column;
	padding-left: 15px;
	padding-top:5px;
}

.dropdown-menu a {
	padding: 5px;
	font-size: 14px;
}

.sidebar .stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px;}
.stat{background:#f9fafb;padding:7px;border-radius:10px;text-align:center}
.stat .val{font-weight:600}
.small{font-size:0.8rem;color:var(--muted)}
.medium{font-size:0.9rem;color:var(--muted)}
.big{font-size:1rem;color:var(--muted)}

.alert-success { background-color: #739c28; color:white; padding:8px; border-radius:8px;}
.alert-danger { background-color: #eb4646; color:white; padding:8px; border-radius:8px;}
.alert-warning { background-color: #3981B6; color:white; padding:8px; border-radius:8px;}
.alert-info { background-color: #3981B6; color:white; padding:8px; border-radius:8px;}

/* MAIN */
.main{
	max-width:1080px;display:grid;flex-direction:column;gap:16px;
}

/* Top navbar inside main area */
.topbar{
	display:flex;
	align-items:center;
	height:60px;
	gap:12px;
	justify-content:space-between;
	padding:12px;
	border-radius:8px;
	background:var(--panel);
	box-shadow:0 4px 10px rgba(0,0,0,0.08);
	overflow-x: auto;
	white-space: nowrap;     /* satır kırılmasını engeller */
	z-index:998;
}
.contentbar{
	display:flex;
	align-items:center;
	gap:12px;
	justify-content:space-between;
	padding:12px;
	border-radius:8px;
	background:var(--panel);
	box-shadow:0 4px 10px rgba(0,0,0,0.08);
	overflow-x: auto;
	white-space: nowrap;     /* satır kırılmasını engeller */
}
.medalbar{
	display:flex;
	align-items:center;
	gap:12px;
	justify-content:space-between;
	padding:12px;
	border-radius:8px;
	background:var(--panel);
	box-shadow:0 4px 10px rgba(0,0,0,0.08);
	overflow-x: auto;
	white-space: nowrap;     /* satır kırılmasını engeller */
}
.medal-text {
    display: flex;
    flex-direction: column; /* name üstte, description altta */
}

.medal-name {
    font-weight: bold;
    font-size: 0.9rem;
}

.medal-desc {
    font-size: 0.8rem;
    color: #666;
}
.controls{display:flex;gap:8px;align-items:center}
.btn{background:transparent;border:1px solid #d1d5db;padding:8px 12px;border-radius:10px;color:var(--muted);cursor:pointer;text-decoration: none;}
.small-btn{background:transparent;border:1px solid #d1d5db;padding:4px 6px;border-radius:8px;color:var(--muted);cursor:pointer;text-decoration: none;}
.link-btn{background:transparent;border:1px solid #d1d5db;padding:8px 12px;border-radius:10px;color:var(--muted);cursor:pointer;text-decoration: none;}
.link-btn-img {
	display: flex;       
	flex-direction: column;   /* resim üstte, yazı altta */
	align-items: center;      /* ortala */
	justify-content: center;
	text-align: center;
	width: 125px;             /* kare yap */
	height: 80px;
	gap: 6px;                   
	background: transparent;        
	border:1px solid #d1d5db;
	color:var(--muted);
	padding: 8px 12px;
	border-radius: 10px;
	cursor: pointer;
	text-decoration: none;
}
.link-btn-img:hover {
	background: var(--panel-hover, #f0f0f0);
	transform: translateY(-1px);
}
.medal-btn-img {
	display: flex;       
	flex-direction: column;   /* resim üstte, yazı altta */
	align-items: center;      /* ortala */
	justify-content: center;
	text-align: center;
	width: 135px;             /* kare yap */
	height: 100px;
	gap: 6px;                   
	background: #f9fafb;       
	color:var(--muted);
	padding: 8px 12px;
	border-radius: 10px;
	text-decoration: none;
	white-space: wrap;
}
.medal-btn-img:hover {
	background: var(--panel-hover, #f0f0f0);
}
.btn.primary{background:linear-gradient(90deg,var(--accent),var(--accent-2));color:white;border:0}
.search{min-width:200px}

.hover:hover{
	background:#f0f0f0 !important;
}

.badge-green {
	background: rgba(54, 209, 75, 0.8);
	padding:5px;
	font-size:0.7rem;
	color:white;
	border-radius: 8px;
}

.badge-red {
	background: rgba(201, 42, 42, 0.8);
	padding:5px;
	font-size:0.7rem;
	color:white;
	border-radius: 8px;
}

.badge-blue {
	background: rgba(35, 48, 186, 0.8);
	padding:5px;
	font-size:0.7rem;
	color:white;
	border-radius: 8px;
}

.badge-gold {
	background: rgba(255, 140, 0, 0.9);
	padding:5px;
	font-size:0.7rem;
	color:white;
	border-radius: 8px;
}

.status-badge {
	position: relative;   /* Badge için referans */
	display: inline-flex;
	align-items: center;
}

.badge {
	position: absolute;
	top: -6px;
	right: -6px;
	background: red;
	color: #fff;
	font-size: 11px;
	font-weight: bold;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 4px rgba(0,0,0,0.2);
}

/* Genel overflow class */
.overflow-x {
	overflow-x: auto;      /* taşan kısımları yatay kaydır */
	overflow-y: hidden;    /* dikey scroll çıkmasın */
	white-space: nowrap;   /* satır kırılmasını engelle */
	-webkit-overflow-scrolling: touch; /* mobilde smooth kaydırma */
	scrollbar-width: thin; /* Firefox */
}

.overflow-x > * {
	min-width: max-content;  /* içindeki çocuk eleman satır kırmadan, içerik kadar geniş olur */
}

.translatable {
    display: block;      /* p veya div için */
    font-size: inherit;
    line-height: inherit;
    margin: inherit;
    padding: inherit;
}

/* Dashboard grid */
.grid{
	display:grid;gap:12px;grid-template-columns:repeat(4,1fr);
}
.flex-container {
	display: flex;
	flex-direction: column; /* alt alta */
	gap: 10px; /* aradaki boşluk */
}
.flex-auto {
	display: flex;
	gap: 12px;
	flex-wrap: nowrap; /* öğeler tek satırda kalır */
	overflow-x: auto; /* taşan içerik için kaydırma */
	padding-bottom: 4px; /* kaydırma çubuğu için boşluk */
}
.flex-equal {
	flex: 1;            /* eşit genişlik alır */
	min-width: 0;       /* içerik taşmasını engeller */
}

.card{background:var(--panel);padding:14px;border-radius:8px;box-shadow:0 2px 6px rgba(0,0,0,0.05)}
.card h3{margin:0 0 8px 0;font-size:0.95rem}
.card p{margin:0;color:var(--muted);font-size:0.9rem}
.full {grid-column: span 4;}
.half {grid-column: span 2;}
.card.full.bg-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
    min-height: 150px;
	
    display: flex;              /* içerik hizalama için */
    align-items: center;        /* dikey ortalama */
    justify-content: center;    /* yatay ortalama */
    text-align: center;         /* metin ortalama */
    color: #fff;                /* metin rengi */
    font-size: 20px;            /* isteğe göre */
    font-weight: bold;
    position: relative;
}
.card.full.bg-image::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.1); /* siyah yarı saydam katman */
    border-radius: inherit;
}
.card.full.bg-image > * {
    position: relative;
    z-index: 1;
}

/* wide chart placeholder */
.charts{grid-column:span 2;display:flex;flex-direction:column;gap:12px}
.market-list{display:flex;flex-direction:column;gap:8px}
.market-item{display:flex;justify-content:space-between;align-items:center;padding:10px;border-radius:8px;background:#f3f4f6}
.chat-box{display:flex;justify-content:space-between;align-items:center;padding:10px;margin-bottom:10px;border-radius:8px;background:#f3f4f6;border:1px solid var(--glass);}

/* Right-side column */
.right-col{display:flex;flex-direction:column;gap:12px}
.bottomnav { display:none; }
/* Responsive */
@media (max-width:1000px){
	.app{grid-template-columns:220px 1fr;padding:12px}
	.grid{grid-template-columns:repeat(2,1fr)}
	.charts{grid-column:auto}
}
@media (max-width:720px){
	.app{grid-template-columns:1fr;padding:10px; margin-top:55px;}
	.sidebar{position:fixed;left:-320px;top:0;height:100%;width:260px;z-index:999;transition:left .25s;box-shadow:20px 0 40px rgba(0,0,0,0.2)}
	.sidebar.open{left:0;border-radius:0;}
	.rightbar{position:fixed;right:-320px;top:0;height:100%;width:260px;z-index:999;transition:right .25s;box-shadow: -20px 0 40px rgba(0,0,0,0.2)}
	.rightbar.open{right:0;border-radius:0;}
	.main{padding-top:110px;margin-bottom:60px;}
	.topbar{position:fixed;left:0;right:0;top:75px;justify-content: flex-start;margin:0;padding:10px 12px;border-radius:0}
	.chip{margin-left: auto;}
	.toplogo{position:fixed;left:0;right:0;top:0;margin:0;padding:10px 12px;border-radius:0;border-bottom:none;}
	.bottomnav{
		position:fixed;
		background:var(--panel);
		display:flex;
		align-items:center;
		justify-content:space-around;
		gap:0; 
		left:0;
		right:0;
		bottom:0;
		margin:0;
		padding:6px 0;
		border-radius:0;
		border-top:1px solid #ccc;
		z-index:998;
		height:60px; /* Sabit yükseklik */
	}
	.bottomnav .menu-item{
		display:flex;
		flex-direction:column;
		align-items:center;
		justify-content:center;
		font-size:10px;
		color:#555;
		text-align:center;
		flex:1; /* 5 öğeyi eşit yap */
		cursor:pointer;
		transition: color 0.2s;
	}	
	.bottomnav .menu-item a {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		color: inherit; /* Menü rengi */
		text-decoration: none; /* alt çizgi kaldır */
		width: 100%; /* Menü öğesini doldur */
		height: 100%;
		border-right:1px solid #ccc;
	}
	.bottomnav .menu-item img{
		width:24px;
		height:24px;
		margin-bottom:2px;
	}	
	.bottomnav .menu-item:hover,
	.bottomnav .menu-item.active{
		color:var(--primary); /* Öne çıkacak renk */
	}	
	.gradient-text {
		font-size: 16px;
		font-weight: bold;
	}
	.gradient-text .small {
		font-size: 10px;
	}
	.grid{grid-template-columns:1fr}
	.half {grid-column: span 4;}
	body.nav-open{overflow:hidden}
	body.rightnav-open{overflow:hidden}
}

/* micro styles */
.footer-note{font-size:0.82rem;color:var(--muted);}

/* utility */
.row{display:flex;gap:8px;align-items:center}
.chip{padding:6px 8px;border-radius:999px;background:#e5e7eb;font-size:0.85rem;color:#374151}

.table-wrapper {
	overflow-x: auto;
	border-radius: 12px;
	background: var(--panel);
	box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.border-bottom { border-bottom: 1px solid #ccc; padding-bottom:5px; }
.border-all { border: 1px solid #ccc; }

table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.90rem;
	margin-top:10px;
	table-layout: auto;
}

thead {
	background: #f3f4f6;
}

thead th {
	text-align: left;
	padding: 12px;
	color: var(--muted);
	font-weight: 600;
	border-bottom: 1px solid #e5e7eb;
}

tbody tr {
	border-bottom: 1px solid #e5e7eb;
	transition: background 0.2s;
}

tbody td {
	padding: 8px;
	color: inherit;
}

tbody tr:hover {
	background: var(--glass);
}

td, th {
	white-space: nowrap;     /* satır kırılmasını engeller */
	overflow: hidden;        /* taşan yazıyı gizler */
	text-overflow: ellipsis; /* ... koyar */
	max-width: 180px;        /* isteğe göre hücre genişliği sınırı */
}

.td-small {
	width: 1%;           /* mümkün olan en küçük genişlik */
	white-space: nowrap;  /* satır içi kırılmayı engelle */
}

body.dark thead {
	background: rgba(255,255,255,0.05);
}

body.dark tbody tr {
	border-bottom: 1px solid rgba(255,255,255,0.1);
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-bottom: 14px;
}

label {
	font-size: 0.9rem;
	color: var(--muted);
	font-weight: 600;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
select,
textarea {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 10px;
	background: #f9fafb;
	font-size: 0.95rem;
	color: inherit;
	outline: none;
	transition: border 0.2s, background 0.2s;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--accent);
	background: #fff;
}

textarea {
	resize: vertical;
	min-height: 90px;
}

button.form-btn {
	background: linear-gradient(90deg, var(--accent), var(--accent-2));
	border: none;
	color: #fff;
	padding: 10px 14px;
	font-size: 1rem;
	border-radius: 10px;
	cursor: pointer;
	transition: opacity 0.2s, transform 0.1s;
}

button.form-btn:hover {
	opacity: 0.9;
}

button.form-btn:active {
	transform: scale(0.97);
}

body.dark input,
body.dark select,
body.dark textarea {
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid rgba(255, 255, 255, 0.15);
	color: #f1f5f9;
}

body.dark input:focus,
body.dark select:focus,
body.dark textarea:focus {
	border-color: var(--accent);
	background: rgba(255, 255, 255, 0.08);
}

.list-group {
	display: flex;
	flex-direction: column;
	padding-top:5px;
}

.list-group .item {
	padding-bottom: 3px;
	padding-top:3px;
	border-bottom: 1px solid #ccc;
}

.list-group .item:last-child {
	border-bottom: none; 
}

.item:hover {
	background: var(--glass);
}

.card.withimage {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 16px;
}

.card.withimage .card-image {
	flex: 0 0 120px; /* sabit genişlik */
}

.card.withimage .card-image img {
	width: 100%;
	border-radius: 8px;
	display: block;
}

.card.withimage .card-content {
	flex: 1; /* geri kalan alanı kapla */
}

.card.withimage .market-list {
	margin-top: 8px;
}

.card.withimage .market-item {
	display: flex;
	justify-content: space-between;
	border-bottom: 1px solid #ddd;
}

.card.withimage .market-item:last-child {
	border-bottom: none;
}

@media (max-width: 768px) {
	.card.withimage {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
	
	.card.withimage .card-image {
		flex: 0 0 auto;
		margin-bottom: 12px;
	}
	
	.card.withimage .card-content {
		width: 100%;
	}
}
