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

body{
    background-color: #0f0f0f;
    color: #e0e0e0;
   font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
   font-size: 15px;
}

/*Nav*/
nav{
    background-color: #1a1a1a;
    padding: 12px 24px;
    display:flex ;
    gap: 8px;
    border-bottom: 1px solid #2a2a2a;
}

nav button{
    background: none;
    border: 1px solid #333;
    color: #aaa;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

nav button:hover {
    background-color: #2a2a2a;
    color: #fff;
    border-color: #00bcd4;
}

main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px;
}

h2 {
    font-size: 22px;
    color: #fff;
    margin-bottom: 24px;
}

h3 {
    font-size: 16px;
    color: #aaa;
    margin: 24px 0 12px;
}

/*Stats*/
#stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

#stats div {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: 16px;
}

#stats p:first-child {
    font-size: 15px;
    color: #aaa;
    margin-bottom: 8px;
}

#stats p:last-child {
    font-size: 24px;
    font-weight: 600;
    color: #00bcd4;
}

/*Form*/
form {
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

label {
    display: block;
    font-size: 13px;
    color: #aaa;
    margin-bottom: 6px;
}

input, select, textarea {
    width: 100%;
    background-color: #0f0f0f;
    border: 1px solid #333;
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;    
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #00bcd4;
}

form button {
    grid-column: span 3;
    background-color: #00bcd4;
    color: #0f0f0f;
    border: none;
    padding: 10px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

form button:hover {
    background-color: #00acc1;
}

#f-success {
    grid-column: span 3;
    color: #00bcd4;
    font-size: 13px;
    opacity: 0;
}

#f-success.visible {
    opacity: 1;
}

/*History table*/
#history-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #1a1a1a;
    border-radius: 10px;
    overflow: hidden;
}

#history-table td:last-child, #history-table th:last-child {
    width: 100%;
}

#history-table td:first-child {
    white-space: nowrap;
}

th {
    background-color: #222;
    color: #aaa;
    font-size: 13px;
    font-weight: 500;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #2a2a2a;
}

td {
    padding: 12px 16px;
    font-size: 14px;
    border-bottom: 1px solid #1f1f1f;
    color: #e0e0e0;
}

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

tr:hover td {
    background-color: #222;
}

/* delete button */
td button {
    background: none;
    border: 1px solid #444;
    color: #f44336;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
}

td button:hover {
    background-color: #f44336;
    color: #fff;
    border-color: #f44336;
}

/*empty message */
#history-empty {
    color: #aaa;
    font-size: 14px;
    padding: 24px 0;
}

/*Charts*/
canvas {
    max-width: 100%;
    margin-bottom: 24px;
    background-color: #1a1a1a;
    border-radius: 10px;
    padding: 16px;
    border: 1px solid #2a2a2a;
}

/*chart container - limit winloss chart size*/
#chart-winloss {
    max-width: 300px;
    max-height: 300px;
    display: block;
    margin: 0 auto 24px;
}

/* active nav button*/
nav button.active {
    background-color: #2a2a2a;
    color: #fff;
    border-color: #00bcd4;
}