/* Reset default margin and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    padding: 40px 20px;
}

/* Container for the main content */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header styling */
h1 {
    font-size: 58px;
    font-weight: 400;
    margin-bottom: 40px;
    color: #1a1a1a;
    font-family: 'Instrument Serif', serif;
}

/* Input section styling */
.input-section {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    align-items: center;
    justify-content: space-between;
}

/* Input group styling */
.input-group {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Button container styling */
.button-group {
    display: flex;
    gap: 10px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

/* Label styling */
label {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    white-space: nowrap;
}

/* Input field styling */
#color-input {
    padding: 12px 16px;
    flex: 1;
    max-width: 600px;
    min-width: 450px;
    font-size: 14px;
    background-color: #F7F5F1;
    border: none;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
}

#color-input:focus {
    outline: none;
    border-color: #244043;
    box-shadow: 0 0 0 3px rgba(36, 64, 67, 0.1);
}

/* Button styling */
button {
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

/* Primary button styling */
.btn-primary {
    padding: 12px 30px;
    border-radius: 500px;
    background-color: #EC694A;
    color: white;
}

.btn-primary:hover {
    background-color: #c1563d;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Secondary button styling */
.btn-secondary {
    padding: 12px 30px;
    border-radius: 500px;
    background-color:#eee8e1;
    color: #000;
}

.btn-secondary:hover {
    background-color: #e8e8e8;
    border-color: #999;
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* Styling for the color list */
#color-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Wrapper for each color entry */
#color-list .color-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* The color box (square) for each color */
#color-list .color-box {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: transform 0.2s;
    border: 1px solid #00000024;
}

#color-list .color-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Text label for the color */
#color-list .color-item span {
    font-size: 12px;
    color: #666;
    font-family: 'Courier New', monospace;
    font-weight: 500;
    margin-bottom: 6px;
}

/* Remove button for each color item */
.remove-btn {
    background: none;
    border: none;
    color: #ccc;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    margin-top: 4px;
    transition: color 0.2s;
}

.remove-btn:hover {
    color: #ff6b6b;
}

/* Table styling */
table {
    margin-top: 40px;
    border-collapse: collapse;
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

/* Table header cell styling */
th, td {
    padding: 20px 16px;
    font-size: 13px;
}

/* Table header background and font */
th {
    background-color: #f8f8f8;
    font-weight: 600;
    color: #333;
}

/* First cell in the row */
td:first-child {
    font-weight: 600;
    color: #333;
    text-align: left;
}

/* Styling for "AAA" cells (blue for excellent contrast) */
td.AAA {
    background-color: #ADD8E6; /* Light blue for AAA */
    color: #000; /* Black text for visibility */
}

/* Styling for "AA" cells (green for good contrast) */
td.AA {
    background-color: #90EE90; /* Green for AA */
    color: #000; /* Black text for visibility */
}

/* Styling for "Fail" cells (red for poor contrast) */
td.Fail {
    background-color: #FFCCCB; /* Red for Fail */
    color: #000; /* Black text for visibility */
}