body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #1a1a1a;
    color: #f0f0f0;
    margin: 0;
    padding: 20px;
}

/* --- Navigation Menu --- */
.top-nav {
    text-align: center;
    padding: 10px 0;
    margin-bottom: 20px;
}

.top-nav a {
    color: #aaa;
    text-decoration: none;
    padding: 10px 20px;
    margin: 0 10px;
    border-radius: 8px;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}

.top-nav a:hover {
    background-color: #333;
    color: #fff;
}

.top-nav a.active {
    background-color: #3498db;
    color: #fff;
}

/* --- Main Layout --- */
.main-content-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.price-table-container {
    width: 100%; /* Make price table full width */
}

.server-status-container {
    display: none; /* Hide server status module */
}

.container {
    background: #2c2c2c;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 24px;
    margin: 0 0 10px 0;
}

.update-info {
    font-size: 12px;
    color: #aaa;
}

/* --- Price Table Styles --- */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 5px;
    text-align: center;
}

th, td {
    padding: 10px;
    background-color: #3a3a3a;
    border-radius: 5px;
    transition: background-color 0.2s ease-in-out;
    vertical-align: middle;
}

.price-cell {
    position: relative;
}

.clickable-row:hover td {
    background-color: #4f4f4f;
}

.clickable-row:hover td.buy { background-color: #d64536; }
.clickable-row:hover td.sell { background-color: #2ecc71; }

thead th {
    background-color: #4a4a4a;
    font-size: 14px;
    font-weight: bold;
}

.site-server { width: 150px; }

tbody td img { max-width: 100px; height: auto; display: block; margin: 0 auto; }

.tag { font-size: 10px; padding: 2px 5px; border-radius: 3px; margin-left: 5px; vertical-align: middle; }
.tag.yeni { background-color: #3498db; color: white; }

tbody td > span { position: relative; }

td.buy { background-color: #c0392b; color: white; }
td.sell { background-color: #27ae60; color: white; }
.clickable-row { cursor: pointer; }

/* --- Price Cell Tooltip --- */
.price-cell::after {
    content: 'Geçmiş fiyatları görmek için tıklayınız';
    position: absolute;
    bottom: calc(100% + 5px); /* Position above the cell with a 5px gap */
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a1a1a;
    color: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #555;
    font-size: 12px;
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.price-cell:hover::after {
    opacity: 1;
    visibility: visible;
}


/* --- Price Trend Arrows --- */
.arrow-up {
  width: 0; 
  height: 0; 
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #4CAF50; /* Green */
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}

.arrow-down {
  width: 0; 
  height: 0; 
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #f44336; /* Red */
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}


/* --- Custom Chart Legend --- */
#custom-legend-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* Spacing between items */
    padding: 10px 0;
    margin-bottom: 15px;
}

.legend-item {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    transition: opacity 0.2s;
}

.legend-item img {
    width: 80px; /* Fixed width for logos */
    height: 20px; /* Fixed height for logos */
    object-fit: contain; /* Ensure logos fit well */
    margin-right: 8px;
}

.legend-item.hidden {
    opacity: 0.5;
    text-decoration: line-through;
}

.legend-color-box {
    display: inline-block;
    width: 15px;
    height: 15px;
    margin-right: 8px;
    border-radius: 3px;
    vertical-align: middle;
}

.legend-btn {
    background-color: #4a4a4a;
    color: #fff;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px;
    font-size: 12px;
}

.legend-btn:hover {
    background-color: #5a5a5a;
}

/* --- Modal Styles --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: #2c2c2c;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    width: 80%;
    max-width: 900px;
    position: relative;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.close-button:hover {
    color: #fff;
}

.chart-container-modal {
    height: 450px; /* Adjust as needed */
}
