.card-container {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  gap: 1rem;
  margin-top: 1rem;
  width: 100%;
  max-width: 900px;
  min-height: auto;
}


.card-box,
.gate-list-box {
  background: rgba(10, 10, 10, 0.05); 
  border: 1px solid #a855f7;
  border-radius: 12px;
  padding: 0.6rem;
  font-family: 'Fira Code', monospace;
  color: #e5e5e5;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  clip-path: polygon(
    2% 0, 98% 0, 100% 10%, 100% 90%, 98% 100%, 
    2% 100%, 0 90%, 0 10%
  );
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}


.card-box h3,
.gate-list-box h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 5px;
}


.card-box textarea {
  width: 100%;
  background: transparent;
  border: 1px solid #a855f7;
  border-radius: 6px;
  color: inherit;
  padding: 0.5rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.8rem;
  resize: none;
  outline: none;
  margin-top: 0.3rem;
  box-shadow: 0 0 6px rgba(168, 85, 247, 0.4);
}


.gate-list-box label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  cursor: pointer;
}


body.light-mode .card-box,
body.light-mode .gate-list-box {
  background-color: rgba(255, 255, 255, 0.08);
  color: #0a0a0a;
}

body.light-mode .card-box textarea {
  border-color: #0a0a0a;
  color: #0a0a0a;
}

body.light-mode .gate-list-box label {
  color: #0a0a0a;
}


textarea {
  width: 100%;
  height: 280px;
  background-color: rgba(5, 5, 5, 0.9);
  border: 2px solid #a855f7;
  padding: 0.6rem;
  border-radius: 8px;
  color: #facc15;
  font-family: 'Fira Code', monospace;
  font-size: 0.9rem;
  outline: none;
  resize: none;
  clip-path: inherit;
  transition: all 0.3s ease;
  overflow-y: auto !important;
}

textarea:focus {
    box-shadow: 0 0 10px #a855f7;
}


.gate-list-box label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.gate-list-box input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.gate-list-box .checkbox-box {
  width: 1.5em;
  height: 1.5em;
  border: 2px solid #a855f7;
  clip-path: polygon(15% 0, 85% 0, 100% 15%, 100% 85%, 85% 100%, 15% 100%, 0 85%, 0 15%);
  position: relative;
  transition: all 0.3s ease;
}

.gate-list-box .checkbox-mark {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 60%;
  height: 60%;
  background-color: #facc15;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  clip-path: inherit;
}

.gate-list-box input:checked + .checkbox-box .checkbox-mark {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  animation: glitch-anim-checkbox 0.3s both;
}

.gate-list-box .checkbox-label {
  color: #e5e5e5;
  font-weight: 500;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}


.gate-list-box label:hover .checkbox-label::before,
.gate-list-box label:hover .checkbox-label::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.gate-list-box label:hover .checkbox-label::before {
  color: #a855f7;
  animation: glitch-anim-text 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.gate-list-box label:hover .checkbox-label::after {
  color: #facc15;
  animation: glitch-anim-text 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both;
}

.gate-list-box input:checked ~ .checkbox-label {
  color: #facc15;
  text-shadow: 0 0 8px rgba(250, 204, 21, 0.8);
}

.gate-list-box:hover .checkbox-box {
  box-shadow: 0 0 10px #a855f7;
}


@keyframes glitch-anim-checkbox {
  0%   { transform: translate(-50%, -50%); clip-path: inset(0 0 0 0); }
  20%  { transform: translate(-53%, -48%); clip-path: inset(50% 0 20% 0); }
  40%  { transform: translate(-48%, -52%); clip-path: inset(20% 0 60% 0); }
  60%  { transform: translate(-52%, -49%); clip-path: inset(80% 0 5% 0); }
  80%  { transform: translate(-47%, -51%); clip-path: inset(30% 0 45% 0); }
  100% { transform: translate(-50%, -50%); clip-path: inset(0 0 0 0); }
}

@keyframes glitch-anim-text {
  0%   { transform: translate(0); clip-path: inset(0 0 0 0); }
  20%  { transform: translate(-3px, 2px); clip-path: inset(50% 0 20% 0); }
  40%  { transform: translate(2px, -1px); clip-path: inset(20% 0 60% 0); }
  60%  { transform: translate(-2px, 1px); clip-path: inset(80% 0 5% 0); }
  80%  { transform: translate(2px, -2px); clip-path: inset(30% 0 45% 0); }
  100% { transform: translate(0); clip-path: inset(0 0 0 0); }
}


body.light-mode .card-box,
body.light-mode .gate-list-box,
body.light-mode .card-box textarea,
body.light-mode .checkbox-label {
  color: #00796b !important;
}

body.light-mode textarea::placeholder {
  color: #00796b !important;
}

.glitch-checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px; 
}

.card-box {
  display: flex;
  flex-direction: column;
}

.btn-container {
  margin-top: 10px;
  display: flex;
  gap: 0.6rem;
}

.cookie-box {
  margin-top: 10px;
  display: block; 
}


.card-box {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: transparent;
  border: 1px solid #a855f7;
  border-radius: 8px;
  font-family: 'Fira Code', monospace;
}

.btn-container {
  margin-top: 10px;
  display: flex;
  gap: 0.6rem;
}

.cookie-box {
  margin-top: 12px;
}

.cookie-box label {
  display: block;
  color: #facc15;
  font-size: 0.85rem;
  font-family: 'Fira Code', monospace;
  margin-bottom: 4px;
}

#cookie-input {
  width: 100%;
  padding: 6px 10px;
  background-color: #0a0a0a;
  border: 1px solid #a855f7;
  border-radius: 4px;
  color: #facc15;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  outline: none;
  transition: 0.2s ease-in-out;
}

#cookie-input:focus {
  box-shadow: 0 0 5px #a855f7;
  background-color: #111;
}

.card-container {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.card-box {
  width: 50%; 
  display: flex;
  flex-direction: column;
}

.gate-list-box {
  width: 50%;
}


@media (max-width: 768px) {
    .card-container {
        flex-direction: column; 
        align-items: stretch;
    }

    .card-box,
    .gate-list-box {
        width: 100% !important; 
    }

    .btn-container {
        flex-wrap: wrap; 
    }
}

@media (max-width: 480px) {
    .btn-container {
        flex-direction: column;
        gap: 0.5rem;
    }
}