:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --text-color: lightcyan;
    --bg-color: navy;
    --highlight-bg: lightseagreen;
}
body {
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 20px;
    background: var(--bg-color);
    min-height: 100vh;
    text-align: center;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}
h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 500;
    opacity: 0.9;
}
h2 { font-weight: normal; }
#sub { font-size: 0.75em; }
.stats {
    border: 1px solid var(--highlight-bg);
    /* border-radius: 10px; */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    margin: 1.5rem auto 2rem;
    max-width: 400px;
    min-width: 320px;
    padding-bottom: 0.7rem;
    width: 60%;
}
.stats h5 {
    background-color: var(--highlight-bg);
    /* border-radius: 10px 0 0 0; */
    font-size: 0.7rem;
    font-weight: 500;
    margin: 0 55% 0 0;
    padding: 0.3rem;
    text-transform: uppercase;
}
.stats p {
    margin: 0.5rem 0 0 0;
}
.filter-buttons {
    margin: 1.5rem 0;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}
.filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--text-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
}
.filter-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}
.filter-btn.active {
    background: var(--highlight-bg);
}
.filter-btn.active:hover {
    background: var(--primary-color);
}

table {
    width: 100%;
    max-width: 600px;
    margin: 1rem auto;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
.weight-column {
    display: none;
}
.show-weight .weight-column {
    display: table-cell;
}
th {
    background: var(--highlight-bg);
    padding: 0.3rem 0.5rem;
    text-align: left;
    letter-spacing: 0.5px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    user-select: none;
}
th:hover {
    background: var(--primary-color);
}
th.sortable::after {
    content: ' ⇅';
    opacity: 0.5;
    margin-left: 8px;
}
th.sort-asc::after {
    content: ' ⇩';
    opacity: 1;
}
th.sort-desc::after {
    content: ' ⇧';
    opacity: 1;
}
th.right-align, td.right-align {
    text-align: right;
}
tr:nth-child(even) {
    background: var(--bg-color);
}
td {
    padding: 0.5rem;
}
td a {
    color: var(--text-color);
    /* text-decoration: none; */
}
tr:hover td {
    background-color: var(--primary-color);
}

.symbol {
    text-align: left;
}
/* .price {
    color: black;
} */
.eps {
    opacity: 0.7;;
}
.pe {
    font-style: italic;
}

#dataTable {
    display: none;
}

.no-data {
    padding: 40px;
    font-style: italic;
    font-size: 1.1em;
}

.loading {
    padding: 20px;
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}
