/* style.css */

:root {
    --bg-color: #161512;        /* Dark chess theme (Lichess style) */
    --card-bg: #262421;          /* Background for table and search input */
    --text-color: #bababa;      /* Main readable body text */
    --text-light: #ffffff;      /* For highlights and headings */
    --accent-color: #b58863;    /* Classic dark square chess color */
    --accent-light: #f0d9b5;    /* Classic light square chess color */
    --border-color: #363431;    /* Thin, subtle borders */
    --hover-bg: #2d2b27;        /* Row background color on hover */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 30px 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 100%;
    max-width: 1200px;
}

h1 {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 25px;
    font-weight: 700;
    font-size: 2.2rem;
    letter-spacing: 0.5px;
}

/* Search box styling */
.search-container {
    margin-bottom: 25px;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 14px 20px;
    background-color: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 16px;
    box-sizing: border-box;
    transition: all 0.25s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(181, 136, 99, 0.25);
}

.search-input::placeholder {
    color: #666;
}

/* Table styling */
.table-wrapper {
    overflow-x: auto;
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 15px;
}

th, td {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

th {
    background-color: rgba(0, 0, 0, 0.3);
    color: var(--accent-light);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    user-select: none;
}

tr:last-child td {
    border-bottom: none;
}

/* Hover effect and row transition */
tbody tr {
    transition: background-color 0.15s ease;
}

tbody tr:hover {
    background-color: var(--hover-bg);
    cursor: pointer;
}

/* Column specific styling */
.col-num {
    width: 5%;
    text-align: center;
    color: #555;
    font-weight: bold;
}

.col-eco {
    width: 8%;
    font-weight: 700;
    color: var(--accent-color);
    letter-spacing: 0.5px;
}

.col-opening {
    width: 25%;
    font-weight: 600;
    color: var(--text-light);
}

.col-variation {
    width: 27%;
    color: #a0a0a0;
}

/* Moves column (Notation) */
.col-moves {
    width: 35%;
    font-family: 'Fira Code', 'Courier New', Courier, monospace;
    color: #85c1e9; /* Light blue that is easily readable on a dark background */
    font-size: 14px;
    font-weight: 500;
}

/* Responsive adjustments for smaller screens (Mobile) */
@media (max-width: 768px) {
    th, td {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    .col-moves {
        font-size: 13px;
    }
}
