/* Modern Theme - Wise Old Man Inspired */
/* General Styles */
:root {
    --page-bg: #050814;
    --page-grad-green: rgba(34, 197, 94, 0.10);
    --page-grad-blue: rgba(59, 130, 246, 0.10);

    --text: rgba(255, 255, 255, 0.92);
    --muted: rgba(255, 255, 255, 0.62);
    --muted-2: rgba(255, 255, 255, 0.42);

    --line: rgba(255, 255, 255, 0.08);
    --hover: rgba(255, 255, 255, 0.03);

    --control-bg: rgba(255, 255, 255, 0.04);
    --control-border: rgba(255, 255, 255, 0.14);
}

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    background:
        radial-gradient(1100px 700px at 20% -10%, var(--page-grad-green), transparent 55%),
        radial-gradient(900px 600px at 85% 8%, var(--page-grad-blue), transparent 55%),
        var(--page-bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0 20px;
    font-weight: 400;
    font-size: 16px;
}

h1 {
    color: #FFFFFF;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
}

h1 img {
    height: 60px;
    top: 10px;
    margin-right: 10px;
    position: relative;
}

/* Button Styles */
button {
    background-color: #5B9FED;
    color: #FFFFFF;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

button:hover {
    background-color: #4A8DD8;
    transform: translateY(-1px);
}

/* Graph Styles - defined in index.html template */

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    background: transparent;
    color: var(--text);
    border-radius: 0;
    overflow: visible;
    border: none;
}

th, td {
    padding: 1rem;
    text-align: left;
}

th {
    background-color: rgba(255, 255, 255, 0.02);
    color: rgba(255, 255, 255, 0.55);
    position: sticky;
    top: 0;
    z-index: 1;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.9rem;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: transparent !important;
}

/* Remove any zebra striping */
tr:nth-child(even) {
    background-color: transparent !important;
}

tr:nth-child(odd) {
    background-color: transparent !important;
}

tbody tr {
    background-color: transparent !important;
}

/* Sort Icon Styles */
.sort-icon {
    margin-left: 5px;
    color: #6B7280;
    cursor: pointer;
}

.sort-icon.active {
    color: #5B9FED;
}

/* Dropdown Styles */
.dropdown {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
    margin-right: 10px;
    z-index: 4;
}

.dropdown-button {
    background-color: #21252e;
    color: #FFFFFF;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s;
}

.dropdown-button:hover {
    background-color: #2a2e3a;
    border-color: rgba(91, 159, 237, 0.3);
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #21252e;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    padding: 1rem;
    z-index: 2;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    top: 100%;
    left: 0;
}

.dropdown-content label {
    display: block;
    margin-bottom: 0.5rem;
    color: #9CA3AF;
    font-size: 0.9rem;
}

/* Input Styles */
.margin-input,
.time-input {
    padding: 0.5rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    background-color: #1a1d29;
    color: #FFFFFF;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

.margin-input:focus,
.time-input:focus {
    outline: none;
    border-color: #5B9FED;
}

select {
    background-color: #1a1d29;
    border: 1px solid rgba(255,255,255,0.1);
    color: #FFFFFF;
    padding: 0.5rem;
    border-radius: 6px;
    margin-top: 0.5rem;
    font-family: 'Inter', sans-serif;
}

/* Trial Status Banner */
.trial-status-banner {
    background: linear-gradient(135deg, rgba(91, 159, 237, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    color: #10B981;
    padding: 0.75rem 1rem;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 8px;
    margin: 15px auto 10px auto;
    border: 1px solid rgba(16, 185, 129, 0.2);
    max-width: fit-content;
    display: inline-block;
}

/* License Status Banner */
.license-status-banner {
    position: fixed;
    top: 150px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 3;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 400px;
}

.license-status-banner.trial-status {
    background: rgba(251, 191, 36, 0.1);
    color: #FBBF24;
    border: 1px solid rgba(251, 191, 36, 0.2);
}

.license-status-banner.license-status {
    background: rgba(16, 185, 129, 0.1);
    color: #10B981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-icon {
    font-size: 18px;
}

.upgrade-link {
    margin-left: auto;
    padding: 4px 12px;
    background: #5B9FED;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
}

.upgrade-link:hover {
    background: #4A8DD8;
}

/* Profit Color Classes */
.profit-yellow {
    color: #FBBF24;
    font-weight: 600;
}

.profit-light-green,
.profit-green {
    color: #10B981;
    font-weight: 600;
}

.profit-default {
    color: #D1D5DB;
}

.graph-row {
    display: none;
}

/* Latest Trade Info */
.latest-trade {
    color: #6B7280;
    font-size: 0.8rem;
}

/* Search Bar */
#searchBar {
    width: 100%;
    padding: 0.75rem 1rem;
    background: #21252e;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #FFFFFF;
    font-size: 1rem;
    margin-bottom: 20px;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

#searchBar:focus {
    outline: none;
    border-color: #5B9FED;
}

#searchBar::placeholder {
    color: #6B7280;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
}

.pagination-button {
    background: #21252e;
    color: #FFFFFF;
    border: 1px solid rgba(255,255,255,0.1);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.pagination-button:hover {
    background: #5B9FED;
    border-color: #5B9FED;
}

.pagination-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

#currentPage {
    color: #9CA3AF;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

/* Profits Dropdown */
.profits-dropdown-container {
    position: relative;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
    z-index: 4;
}

.profits-dropdown-button {
    padding: 0.5rem 1rem;
    background-color: #21252e;
    color: #FFFFFF;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: all 0.2s;
}

.profits-dropdown-button:hover {
    background-color: #2a2e3a;
    border-color: rgba(91, 159, 237, 0.3);
}

/* Latest Buy/Sell Dropdowns */
.latest-buy-dropdown-container,
.latest-sell-dropdown-container {
    position: relative;
    display: inline-block;
    margin-right: 10px;
    margin-bottom: 10px;
    z-index: 4;
}

.latest-buy-dropdown-button,
.latest-sell-dropdown-button {
    padding: 0.5rem 1rem;
    background-color: #21252e;
    color: #FFFFFF;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    transition: all 0.2s;
}

.latest-buy-dropdown-button:hover,
.latest-sell-dropdown-button:hover {
    background-color: #2a2e3a;
    border-color: rgba(91, 159, 237, 0.3);
}

/* Average Price Filter */
.avg-price-filter-container {
    position: relative;
    display: inline-block;
    margin-bottom: 10px;
    margin-right: 10px;
    z-index: 4;
    vertical-align: top;
}

.avg-price-label {
    display: flex;
    align-items: center;
    background-color: #21252e;
    color: #FFFFFF;
    padding: 0.5rem 1rem;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    user-select: none;
    transition: all 0.2s;
}

.avg-price-label:hover {
    background-color: #2a2e3a;
    border-color: rgba(91, 159, 237, 0.3);
}

.avg-price-checkbox {
    margin-left: 8px;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

/* Show Graph Button */
.show-graph-btn {
    background: #5B9FED;
    color: #FFFFFF;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.show-graph-btn:hover {
    background: #4A8DD8;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 0 10px;
    }
    
    table {
        font-size: 0.85rem;
    }

    th, td {
        padding: 0.75rem;
    }

    .graph-container {
        padding: 1rem;
    }

    .price-chart-container {
        height: 200px;
    }

    .volume-chart-container {
        height: 60px;
    }
    
    h1 {
        font-size: 2rem;
    }
}

/* Timestamp */
#timestamp {
    position: absolute;
    top: 10px;
    left: 20px;
    font-size: 14px;
    color: #9CA3AF;
}

th:first-child {
    min-width: 250px;
}
