/* Global Styles */
body {
  margin: 0;
  font-family: sans-serif;
  background-color: #ffffff;
  color: black;
}

p {
  line-height: 1.4;
}

/* Header */
header {
  text-align: center;
  padding: 20px 20px;
  background-color: #000000;
}

header img {
  width: 120px;
  height: auto;
}

/* Main Layout */
main {
  display: flex;
  flex-direction: row;
  max-width: 1400px;
  margin: 0 auto;
}


#legend {
  margin-top: 20px;
  font-size: 0.9rem;
}

.legend-swatch {
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 50%;
  background-color: #000;
}

.legend-swatch.half {
  clip-path: inset(0 50% 0 0); /* left half */
}

.column {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.column:first-child {
  flex: 0 0 28vw;

}

/* Color Display (Right Column) */
#colorDisplay {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 10px;
    min-height:60vh;
}

.color-box {

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  min-height: 60px;
  box-shadow:2px 2px 4px rgba(0, 0, 0, 0.15);
}

.circle-row {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  gap: 1.5vw;
}

#resetLink {
    margin-top:10px;
    font-size:.9rem;
}

.circle-wrapper {
  height: 80%;
  aspect-ratio: 1 / 1;
  position: relative;
  flex-shrink: 0;
  max-width: 80px;   /* NEW: prevent growing too large */
  max-height: 80px;  /* NEW: scale down on small screens */
}
.circle {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #ccc;
  transition: background-color 0.3s ease;
}

.circle.full {
  clip-path: none;
}

.circle.half {
  clip-path: inset(0 50% 0 0); /* left half only */
}

.circle.hidden {
  visibility: hidden;
}

/* Inputs (Left Column) */
#hexInputs {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

#hexInputs input {
  padding: 10px;
  font-size: 16px;
}

/* Buttons */
#addInput,
#applyColors, #randomColors  {
  margin-top:10px;
  padding: 10px 15px;
  font-size: 14px;
  cursor: pointer;
border-width:0px;
 border-radius:6px;
}

#addInput {
    background-color: #eeeeee;
    
}
#applyColors{
    color:#ffffff;
    background-color: #000000;
}

#randomColors{
    background-color: #ffffff;
    border-width:1px;
}

#randomColors:hover{
    background-image: linear-gradient(45deg,#ffaa00,#fff200);
    border-width:1px;
    border-color: #ffffff;
    transition: background-color .7s ease;
}

/* Footer */
footer {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
    text-align:center;
  padding: 40px 20px;
    font-size:0.9rem;
}

footer a{
    color:#000000;
}
.color-input-pair {
  display: flex;
  gap: 10px;
  align-items: center;
}

.color-input-pair input[type="color"] {
  width: 40px;
  height: 40px;
  border: none;
  padding: 0;
  cursor: pointer;
}

.color-input-pair input[type="text"] {
  flex: 1;
  padding: 10px;
  font-size: 14px;
}

.grey{    background-color:#eeeeee;}

#posterGrid {
  max-width: 1400px;
  margin: 40px auto;
  padding: 40px;

}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.poster-b, .poster-a, .poster-c, .poster-d {
  position: relative;
  overflow: hidden;
background-color:#ffffff;
}

.poster-b .shape-overlay {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: auto;
  max-width: none;
        
}
.poster-item {
  aspect-ratio: 16 / 9;
  width: 100%;
      box-shadow:2px 2px 4px rgba(0, 0, 0, 0.15);

}

.st0{
    fill:#666666;
}

.st1{
    fill:#808080;
}

.st2{
    fill:#999999;
}
.st3{
    fill:#b3b3b3;
}
.st4{
    fill:#cccccc;
}
.st5{
    fill:#e6e6e6;
}

.dark{fill:#000000;}
.white{fill:#ffffff;}
.light{fill:#e6e6e6;}
.overlay{fill:#000000;opacity: 0.15;}
.overlay-light{fill:#fff;opacity: 0.15;}
/* Responsive */
@media (max-width: 780px) {
  main {
    flex-direction: column;
    height: auto;
    max-height: none;
  }
  .color-box {
    flex: none;
    height: auto;
    align-items: center;
    min-height:auto;
    max-height:54px;
  }

  .column {
    overflow: visible;
    flex: none;
    max-width:90%;
  }

  .column:first-child {
    max-width: 90%;
  }

  #colorDisplay {
    flex: none;
    height: auto;
    min-height: auto;
    max-height: none;
    overflow: visible;
  }

  .circle-wrapper {
   height:36px;
    max-width: 40px;
    max-height: 40px;
  }


  .poster-grid {
    grid-template-columns: 1fr;
  }
    }