:root {
    --bg-color: #0f172a;
    --card-bg: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent-buy: #10b981;
    --accent-sell: #f43f5e;
    --border-color: rgba(255, 255, 255, 0.1);
    --hover-bg: rgba(255, 255, 255, 0.05);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 1000px;
}

header {
    margin-bottom: 2rem;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 600;
    background: linear-gradient(to right, #60a5fa, #c084fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.table-wrapper {
    background: var(--card-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th {
    text-align: center;
    padding: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

td {
    padding: 1.25rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    font-size: 1rem;
    transition: background-color 0.2s;
}

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

tr:hover td {
    background-color: var(--hover-bg);
}

/* Specific Column Styles */
.col-ticket {
    font-family: 'Courier New', monospace;
    color: var(--text-secondary);
    white-space: nowrap;
}

.col-symbol {
    font-weight: 600;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-buy {
    background-color: rgba(16, 185, 129, 0.2);
    color: var(--accent-buy);
}

.badge-sell {
    background-color: rgba(244, 63, 94, 0.2);
    color: var(--accent-sell);
}

.col-price {
    font-weight: 600;
}

.col-time {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
    min-width: 140px;
    /* Ensure time doesn't break weirdly */
}

.col-days {
    white-space: nowrap;
}

/* Loading & No Data States */
.loading,
.no-data {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.hidden {
    display: none;
}

/* Animation */
tbody tr {
    animation: fadeIn 0.4s ease-out forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header p {
        font-size: 0.9rem;
    }

    .table-wrapper {
        padding: 0.5rem;
    }

    table {
        min-width: auto;
        /* Allow sizing down */
    }

    th,
    td {
        padding: 0.75rem 0.3rem;
        font-size: 0.8rem;
        /* Smaller font */
    }

    /* Column tweaks for mobile */
    .col-ticket {
        font-size: 0.75rem;
    }

    .badge {
        padding: 0.15rem 0.4rem;
        font-size: 0.7rem;
    }

    .col-time {
        font-size: 0.75rem;
        min-width: auto;
    }

    /* Allow symbol to wrap if needed or keep it small */
    .col-symbol {
        font-size: 0.85rem;
    }
}

/* Extra small devices */
@media (max-width: 480px) {

    th,
    td {
        padding: 0.5rem 0.1rem;
        font-size: 0.75rem;
    }

    /* Maybe hide Ticket number on very small screens? Or just keep it very small */
    .col-ticket {
        letter-spacing: -0.5px;
    }
}