:root {
    --primary-color: #c7af26; /* Set default primary color */
    --background-color: #1f1f1f;
    --text-color: #ffffff;
    --filter-control-background: color-mix(in srgb, var(--primary-color), black 20%);
    --filter-control-hover: color-mix(in srgb, var(--primary-color), black 40%);
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

.title-block {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 50px 20px;
    margin-bottom: 20px;
}

.title-block h1 {
    font-size: 4rem;
    margin: 0;
    font-weight: bold;
}

h5 {
    margin-bottom: 0;
}

header {
    background-color: var(--primary-color);
    padding: 20px;
    text-align: center;
}

header#filters {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
}

.filter {
    background-color: var(--filter-control-background);
    color: var(--text-color);
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.filter:hover {
    background-color: var(--filter-control-hover);
}

.checkbox-group {
    display: flex;
    gap: 20px;
}

select#version-filter,
select#device-filter {
    appearance: none;
    border: none;
    padding: 4px 32px 4px 16px;
    border-radius: 6px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23ffffff" width="24px" height="24px"><path d="M7 10l5 5 5-5z" stroke="%23ffffff" stroke-width="2" stroke-linejoin="round" stroke-linecap="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
}

label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

input[type="checkbox"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    position: relative;
}

input[type="checkbox"]:checked::after {
    content: '\2713';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

button#randomiser {
    border: none;
    padding: 4px 8px 4px 8px;
    border-radius: 6px;
}

input[type="text"] {
    border: none;
    padding: 4px 16px;
    border-radius: 6px;
    max-width: 120px;
}

/* For cross-browser consistency (Safari looks a bit odd otherwise) */
input[type="text"]::placeholder {
    color: var(--text-color);
    opacity: 0.55;
}

.filter:active {
    transform: scale(0.95);
    transition: transform 0.1s ease;
}

.portfolio {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    row-gap: 40px;
    padding: 20px;
    padding-bottom: 40px;
}

.portfolio-item {
    background-color: #4a4a4a;
    padding: 20px;
    padding-bottom: 0px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
    height: 100%;
}

.portfolio-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.portfolio-item h3 {
    margin-top: 10px;
    color: var(--text-color);
}

.portfolio-item:hover {
    transform: translateY(-10px);
}

.top-right-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 10px 20px;
    background-color: #4a4a4a;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.top-right-btn:hover {
    background-color: #45a049;
}

a {
    text-decoration: none; 
    color: inherit; 
}

a:hover {
    text-decoration: none; 
    color: inherit; 
}

.image-wrap {
  position: relative;   /* ← THIS is what fixes it */
  display: inline-block;
}

.image-wrap .prev,
.image-wrap .next {
  position: absolute;
  top: 26%;
  transform: translateY(-26%);
  z-index: 2;

  background: none;
  color: white;
  border: none;
  font-size: 2rem;
  line-height: 1;
  
  cursor: pointer;
}

.image-wrap .prev {
  touch-action: manipulation;
  left: -1.5rem;
}

.image-wrap .next {
  touch-action: manipulation;
  right: -1.5rem;
}

table {
    margin: 0 auto;
}

td {
    text-align: left;
}
