/* General body and layout styling */
body {
  font-family: 'Arial', sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 0;
  color: #333;
}

/* Header styling */
header {
  background: linear-gradient(135deg, #2c3e50, #3498db);
  color: white;
  padding: 1.5rem 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  text-align: center;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%),
              linear-gradient(-45deg, rgba(255, 255, 255, 0.1) 25%, transparent 25%);
  background-size: 60px 60px;
  opacity: 0.1;
}

header h1 {
  font-size: 2.8rem;
  margin: 0 auto;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: 1px;
  position: relative;
  display: inline-block;
  text-align: center;
}

header h1::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, #3498db, #2ecc71);
  border-radius: 2px;
}

nav {
  margin-top: 1.5rem;
  position: relative;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 2rem;
}

nav ul li {
  position: relative;
}

nav ul li a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

nav ul li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  transform: scale(0);
  transition: transform 0.3s ease;
  z-index: -1;
}

nav ul li a:hover {
  color: white;
  text-decoration: none;
}

nav ul li a:hover::before {
  transform: scale(1);
}

/* Main content styling */
main {
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
}

main section {
  background: linear-gradient(to bottom right, #ffffff, #f8f9fa);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  margin-bottom: 3rem;
}

main h2 {
  font-size: 2.5rem;
  color: #2c3e50;
  margin-bottom: 1.5rem;
  text-align: center;
  font-weight: 700;
  position: relative;
  padding-bottom: 1rem;
}

main h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 4px;
  background: linear-gradient(to right, #3498db, #2ecc71);
  border-radius: 2px;
}

main p {
  font-size: 1.2rem;
  line-height: 1.8;
  color: #34495e;
  text-align: center;
  margin-bottom: 3rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 1rem;
}

.card {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(52, 152, 219, 0.1), rgba(46, 204, 113, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  font-size: 1.5rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.card h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(to right, #3498db, #2ecc71);
  border-radius: 1.5px;
}

.card p {
  font-size: 1rem;
  line-height: 1.6;
  color: #7f8c8d;
  margin: 0;
  text-align: left;
}

/* Footer styling */
footer {
  background-color: #333;
  color: white;
  text-align: center;
  padding: 15px;
  position: fixed;
  bottom: 0;
  width: 100%;
}

footer p {
  font-size: 0.9rem;
  margin: 0;
}

/* Responsive layout */
@media (max-width: 768px) {
  main {
    padding: 1rem;
  }

  main section {
    padding: 1.5rem;
  }

  main h2 {
    font-size: 2rem;
  }

  main p {
    font-size: 1.1rem;
  }

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

  nav ul {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  nav ul li a {
    display: block;
    padding: 0.8rem 1.5rem;
    width: 200px;
    text-align: center;
  }

  button {
    width: 100%;
  }

  input[type="number"], input[type="text"] {
    width: 100%;
  }
}

/* ASCII 테이블 스타일 */
.ascii-table {
  margin: 2rem 0;
  overflow-x: auto;
  font-size: 0.9rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  table-layout: fixed;
}

.ascii-table th,
.ascii-table td {
  padding: 0.8rem;
  text-align: center;
  border: 1px solid #e0e0e0;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.ascii-table th {
  background: linear-gradient(145deg, #f8f9fa, #ffffff);
  color: #2c3e50;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid #3498db;
}

.ascii-table th:first-child {
  border-top-left-radius: 15px;
}

.ascii-table th:last-child {
  border-top-right-radius: 15px;
}

.ascii-table tr:nth-child(even) {
  background-color: #f8f9fa;
}

.ascii-table tr:hover {
  background-color: rgba(52, 152, 219, 0.05);
}

.ascii-table td:hover {
  background-color: rgba(52, 152, 219, 0.1);
  transform: scale(1.02);
}

.control-char {
  color: #666;
  font-style: italic;
  background-color: #f5f5f5;
}

.printable-char {
  color: #2c3e50;
  font-weight: 500;
}

.ascii-section {
  margin-bottom: 2rem;
  max-height: 400px;
  overflow-y: auto;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  background: white;
  padding: 0;
  position: relative;
}

.ascii-section h3 {
  margin: 0;
  padding: 1.2rem 1.5rem;
  color: #2c3e50;
  font-size: 1.3rem;
  position: sticky;
  top: 0;
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border-bottom: 2px solid #3498db;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.ascii-section h3::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.ascii-section:first-child h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233498db'%3E%3Cpath d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z'/%3E%3C/svg%3E");
}

.ascii-section:last-child h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232ecc71'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V6h16v12zM6 10h12v2H6v-2zm0-4h12v2H6V6z'/%3E%3C/svg%3E");
}

.section-desc {
  font-size: 1rem;
  color: #34495e;
  margin: 0;
  padding: 1.2rem 1.5rem;
  background: #f8f9fa;
  border-bottom: 1px solid rgba(52, 152, 219, 0.1);
}

.example-box {
  background: #e8f4f8;
  padding: 1.2rem 1.5rem;
  margin: 0;
  border-bottom: 1px solid rgba(52, 152, 219, 0.1);
}

.ascii-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: 'Consolas', monospace;
  margin-top: 0;
}

.ascii-table th {
  background: linear-gradient(145deg, #f8f9fa, #ffffff);
  color: #2c3e50;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 2px solid #3498db;
  padding: 1rem 1.5rem;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .ascii-section h3 {
    font-size: 1.1rem;
    padding: 1rem 1.2rem;
  }

  .section-desc {
    padding: 1rem 1.2rem;
  }

  .example-box {
    padding: 1rem 1.2rem;
  }

  .ascii-table th {
    padding: 0.8rem 1.2rem;
  }
}

.converter-box {
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  padding: 2.5rem;
  border-radius: 20px;
  margin: 2rem 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  box-sizing: border-box;
  width: 100%;
  position: relative;
  overflow: hidden;
}

.converter-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, #3498db, #2ecc71);
}

.converter-box h3 {
  color: #2c3e50;
  margin: 0 0 2rem 0;
  font-size: 1.6rem;
  position: relative;
  padding-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 700;
}

.converter-box h3::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 32px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233498db'%3E%3Cpath d='M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16H5V5h14v14zM7 10h2v7H7zm4-3h2v10h-2zm4 6h2v4h-2z'/%3E%3C/svg%3E");
}

.converter-box p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #34495e;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 15px;
  border: 1px solid rgba(52, 152, 219, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.converter-box p::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #3498db, #2ecc71);
  border-radius: 2px;
}

.converter-box input[type="text"] {
  width: 100%;
  padding: 1.2rem 1.8rem;
  font-size: 1.2rem;
  border: 2px solid #e0e0e0;
  border-radius: 15px;
  margin-bottom: 2rem;
  transition: all 0.3s ease;
  background: white;
  color: #2c3e50;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  box-sizing: border-box;
}

.converter-box input[type="text"]:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
  outline: none;
  transform: translateY(-2px);
}

.converter-box input[type="text"]::placeholder {
  color: #95a5a6;
  font-size: 1.1rem;
}

.converter-box button {
  width: 100%;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  color: white;
  border: none;
  padding: 1.2rem 2.5rem;
  border-radius: 15px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.2);
}

.converter-box button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.converter-box button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.converter-box button:hover::before {
  transform: translateX(100%);
}

.converter-box button:active {
  transform: translateY(-1px);
}

.result {
  margin-top: 2rem;
  padding: 2rem;
  background: white;
  border-radius: 15px;
  border: 1px solid rgba(52, 152, 219, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #2c3e50;
  text-align: center;
  line-height: 1.8;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.result::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, #3498db, #2ecc71);
}

.result:hover {
  border-color: rgba(52, 152, 219, 0.2);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .converter-box {
    padding: 1.8rem;
    margin: 1.5rem 0;
  }

  .converter-box h3 {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
  }

  .converter-box p {
    font-size: 1rem;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
  }

  .converter-box input[type="text"] {
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
  }

  .converter-box button {
    font-size: 1.1rem;
    padding: 1rem 2rem;
  }

  .result {
    padding: 1.5rem;
    font-size: 1.2rem;
    margin-top: 1.5rem;
  }
}

#asciiResult, #unicodeResult, #binaryResult {
  margin-top: 1.5rem;
  padding: 0;
  background: transparent;
  border-radius: 12px;
  font-size: 1.1rem;
  color: #2c3e50;
  transition: all 0.3s ease;
}

#asciiResult .card, #unicodeResult .card, #binaryResult .card {
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  padding: 1.8rem;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(52, 152, 219, 0.1);
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

#asciiResult .card::before, #unicodeResult .card::before, #binaryResult .card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, #3498db, #2ecc71);
}

#asciiResult h3, #unicodeResult h3, #binaryResult h3 {
  color: #2c3e50;
  margin: 0 0 1.2rem 0;
  font-size: 1.4rem;
  position: relative;
  padding-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

#asciiResult h3::before, #unicodeResult h3::before, #binaryResult h3::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

#asciiResult h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233498db'%3E%3Cpath d='M3 3h18v18H3V3zm16 16V5H5v14h14zM7 7h10v2H7V7zm0 4h10v2H7v-2zm0 4h7v2H7v-2z'/%3E%3C/svg%3E");
}

#unicodeResult h3::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232ecc71'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z'/%3E%3C/svg%3E");
}

#asciiResult ul, #unicodeResult ul, #binaryResult ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

#asciiResult li, #unicodeResult li, #binaryResult li {
  padding: 1rem;
  border-radius: 10px;
  background: white;
  border: 1px solid rgba(52, 152, 219, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
}

#asciiResult li:hover, #unicodeResult li:hover, #binaryResult li:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.1);
  border-color: rgba(52, 152, 219, 0.2);
}

#asciiResult strong, #unicodeResult strong, #binaryResult strong {
  color: #3498db;
  font-weight: 600;
  min-width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(52, 152, 219, 0.1);
  padding: 0.2rem 0.8rem;
  border-radius: 8px;
  font-size: 1.2rem;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .converter-box {
    padding: 1.5rem;
    margin: 1rem 0;
  }

  .converter-box input[type="text"] {
    width: 100%;
    font-size: 1rem;
    padding: 0.8rem 1.2rem;
  }

  .converter-box button {
    width: 100%;
    font-size: 1rem;
    padding: 0.8rem 1.5rem;
  }

  #asciiResult .card, #unicodeResult .card {
    padding: 1.2rem;
  }

  #asciiResult h3, #unicodeResult h3 {
    font-size: 1.2rem;
  }

  #asciiResult li, #unicodeResult li {
    padding: 0.8rem;
  }

  #asciiResult strong, #unicodeResult strong {
    min-width: 2rem;
    height: 2rem;
    font-size: 1rem;
  }
}

/* 비트 박스 스타일 개선 */
.bit-box {
  display: flex;
  gap: 8px;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.bit {
  width: 45px;
  height: 45px;
  background: linear-gradient(145deg, #e0f2f1, #b2dfdb);
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  font-size: 1.3rem;
  font-weight: bold;
  color: #00796b;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.bit::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.2), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.bit:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.bit:hover::before {
  opacity: 1;
}

.bit-label {
  font-size: 0.9rem;
  margin-top: 8px;
  text-align: center;
  color: #546e7a;
  font-weight: 500;
}

/* 이미지 페이지 스타일 */
#pixelCanvas {
  display: grid;
  grid-template-columns: repeat(10, 30px);
  grid-template-rows: repeat(10, 30px);
  gap: 1px;
  margin: 20px 0;
  border: 2px solid #ccc;
  background-color: #ddd;
}

.pixel {
  width: 30px;
  height: 30px;
  background-color: #ffffff;
  cursor: pointer;
  border: 1px solid #eee;
}

.color-picker {
  margin-bottom: 2rem;
  padding: 2rem;
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.color-picker h4 {
  color: #2c3e50;
  font-size: 1.8rem;
  margin: 0 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.color-controls {
  margin-bottom: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.input-group {
  margin-bottom: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.input-group label {
  display: block;
  font-size: 1.1rem;
  color: #2c3e50;
  margin-bottom: 0.3rem;
  font-weight: 500;
}

.input-wrapper {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.input-wrapper input[type="number"],
.input-wrapper select {
  flex: 0 0 120px;
  padding: 0.7rem 1rem;
  font-size: 1.1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  background: #f8f9fa;
  color: #2c3e50;
}

.input-wrapper button {
  padding: 0.7rem 1.5rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.input-guide {
  font-size: 0.95rem;
  color: #34495e;
  margin-top: 0.3rem;
  padding: 0.7rem 1rem;
  background: linear-gradient(145deg, #f8f9fa, #ffffff);
  border-radius: 8px;
  border: 1px solid #b3e0ff;
  line-height: 1.5;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.color-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.5rem 0 0 0;
  background: transparent;
}

@media (max-width: 768px) {
  .color-picker {
    padding: 1.2rem;
  }
  .color-controls {
    gap: 0.8rem;
  }
  .input-group label {
    font-size: 1rem;
  }
  .input-wrapper input[type="number"],
  .input-wrapper select {
    font-size: 1rem;
    padding: 0.5rem 0.8rem;
    flex: 1 1 80px;
  }
  .input-wrapper button {
    font-size: 1rem;
    padding: 0.5rem 1rem;
  }
  .input-guide {
    font-size: 0.9rem;
    padding: 0.5rem 0.7rem;
  }
}

.color-option {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.2rem;
  border-radius: 12px;
  background: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  cursor: pointer;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.color-option:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.color-option.selected {
  border: 2px solid #3498db;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

.color-preview {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin-bottom: 0.8rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.color-option:hover .color-preview {
  transform: scale(1.1);
}

.color-info {
  text-align: center;
}

.color-name {
  font-size: 1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.4rem;
}

.color-value {
  font-size: 0.9rem;
  color: #7f8c8d;
  font-family: monospace;
  background: #f8f9fa;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  display: inline-block;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .color-picker {
    padding: 1.5rem;
    margin: 1.5rem 0;
  }

  .color-picker h4 {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
  }

  .color-controls .input-wrapper {
    flex-direction: column;
    gap: 0.8rem;
  }

  .color-controls input[type="number"] {
    width: 100%;
    font-size: 1.1rem;
    padding: 0.8rem 1.2rem;
  }

  .color-controls button {
    width: 100%;
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
  }

  .color-options {
    padding: 1rem;
  }
}

/* 캔버스 스타일 */
.section {
  margin: 2rem 0;
  padding: 2rem;
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, #3498db, #2ecc71);
}

.section h2 {
  color: #2c3e50;
  font-size: 1.8rem;
  margin: 0 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.canvas-preview-wrapper {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.canvas-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1.2rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.canvas-controls label {
  font-size: 1.1rem;
  color: #2c3e50;
  font-weight: 500;
}

.canvas-controls input[type="number"] {
  width: 80px;
  padding: 0.8rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.canvas-controls input[type="number"]:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  outline: none;
}

.canvas-controls button {
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.canvas-controls button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.canvas-controls button:active {
  transform: translateY(0);
}

.canvas-grid {
  display: grid;
  gap: 1px;
  background: #e0e0e0;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #ccc;
}

.preview-grid {
  display: grid;
  gap: 0;
  background: white;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: none;
}

.pixel {
  width: 30px;
  height: 30px;
  background: white;
  border: 1px solid #ccc;
  transition: all 0.2s ease;
}

.preview-pixel {
  width: 30px;
  height: 30px;
  background: white;
  border: none;
  transition: all 0.2s ease;
}

.pixel:focus {
  outline: 2px solid #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.preview-section {
  flex: 1;
}

.preview-section h3 {
  font-size: 1.3rem;
  color: #2c3e50;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.1);
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .section {
    padding: 1.5rem;
    margin: 1.5rem 0;
  }

  .section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
  }

  .canvas-preview-wrapper {
    flex-direction: column;
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .canvas-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .canvas-controls input[type="number"] {
    width: 100%;
  }

  .canvas-controls button {
    width: 100%;
  }

  .preview-section h3 {
    font-size: 1.2rem;
  }
}

/* 소리 페이지 스타일 */
canvas {
  border: 2px solid #ccc;
  display: block;
  margin: 20px auto;
}

.controls {
  text-align: center;
  margin: 10px 0;
}

.controls input[type=range] {
  width: 200px;
}

.step, .file-upload-section, .audio-controls, .sampling-guide {
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  margin-top: 2.5rem;
  max-width: 900px;
  width: 100%;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 768px) {
  .step, .file-upload-section, .audio-controls, .sampling-guide {
    padding: 1.2rem;
    margin-bottom: 1.2rem;
    margin-top: 1.2rem;
    border-radius: 12px;
    margin-left: auto;
    margin-right: auto;
  }
}

.step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, #3498db, #2ecc71);
}

.step h2 {
  color: #2c3e50;
  font-size: 1.8rem;
  margin: 0 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.step p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #34495e;
  margin-bottom: 1.5rem;
}

.step strong {
  color: #e67e22;
  font-weight: 600;
}

.controls {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.controls label {
  display: block;
  font-size: 1.1rem;
  color: #2c3e50;
  margin-bottom: 1rem;
  font-weight: 500;
}

.controls input[type="range"] {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  background: #e0e0e0;
  border-radius: 4px;
  outline: none;
  transition: all 0.3s ease;
}

.controls input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 8px rgba(52, 152, 219, 0.2);
  transition: all 0.3s ease;
}

.controls input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 12px rgba(52, 152, 219, 0.3);
}

canvas {
  width: 100%;
  height: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  padding: 1rem;
}

.audio-controls {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.audio-controls input[type="file"] {
  flex: 1;
  padding: 0.8rem 1.2rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1.1rem;
  color: #2c3e50;
  background: #f8f9fa;
  transition: all 0.3s ease;
}

.audio-controls input[type="file"]:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  outline: none;
}

.audio-controls button {
  padding: 0.8rem 1.5rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.audio-controls button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.audio-controls button:active {
  transform: translateY(0);
}

.quality-indicator {
  flex: 1 1 100%;
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  border: 1px solid rgba(52, 152, 219, 0.1);
}

.quality-indicator h3 {
  color: #2c3e50;
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.1);
}

#qualityMetrics {
  font-size: 1.1rem;
  color: #34495e;
  line-height: 1.6;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .step {
    padding: 1.5rem;
    margin: 1.5rem 0;
  }

  .step h2 {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
  }

  .step p {
    font-size: 1rem;
  }

  .controls, .audio-controls {
    padding: 1.2rem;
  }

  .audio-controls {
    flex-direction: column;
  }

  .audio-controls input[type="file"],
  .audio-controls button {
    width: 100%;
  }

  .quality-indicator {
    margin-top: 1rem;
    padding: 1.2rem;
  }
}

/* 퀴즈 섹션 스타일 */
.quiz-section {
  text-align: center;
  margin: 2rem 0;
}

.quiz-start-btn {
  padding: 1rem 2.5rem;
  font-size: 1.2rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  color: white;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.quiz-start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.quiz-start-btn:active {
  transform: translateY(0);
}

/* 모달 스타일 */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  opacity: 1;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal.show .modal-content {
  transform: translateY(0);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.5rem;
}

.close-btn {
  font-size: 1.8rem;
  color: #666;
  cursor: pointer;
  transition: color 0.3s ease;
}

.close-btn:hover {
  color: #333;
}

.modal-body {
  padding: 2rem;
}

.quiz-question {
  font-size: 1.4rem;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 2rem;
  font-weight: 600;
}

.quiz-input {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.quiz-input input {
  flex: 1;
  padding: 0.8rem;
  font-size: 1.1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.quiz-input input:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  outline: none;
}

.quiz-input button {
  padding: 0.8rem 1.5rem;
  font-size: 1.1rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

.quiz-input button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.quiz-result {
  text-align: center;
  padding: 1rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 500;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quiz-result.correct {
  background-color: rgba(46, 204, 113, 0.1);
  color: #27ae60;
}

.quiz-result.incorrect {
  background-color: rgba(231, 76, 60, 0.1);
  color: #c0392b;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 1rem;
  }

  .quiz-input {
    flex-direction: column;
  }

  .quiz-input button {
    width: 100%;
  }
}

.binary-representation {
  margin-top: 1.5rem;
  padding: 1.2rem;
  background: white;
  border-radius: 10px;
  border: 1px solid rgba(52, 152, 219, 0.1);
}

.binary-representation h4 {
  color: #2c3e50;
  margin: 0 0 0.8rem 0;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.binary-representation h4::before {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233498db'%3E%3Cpath d='M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 14H4V6h16v12zM6 10h12v2H6v-2zm0-4h12v2H6V6z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.binary-representation p {
  font-family: 'Consolas', monospace;
  color: #34495e;
  margin: 0;
  word-break: break-all;
  line-height: 1.6;
  padding: 0.8rem;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid rgba(52, 152, 219, 0.1);
}

.warning {
  color: #e67e22;
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

.error {
  color: #e74c3c;
  background: rgba(231, 76, 60, 0.1);
  padding: 1rem;
  border-radius: 8px;
  margin: 1rem 0;
  line-height: 1.6;
}

.result-content {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  margin-top: 1rem;
}

.result-content p {
  margin: 0.5rem 0;
  line-height: 1.6;
}

.result-content strong {
  color: #3498db;
  font-weight: 600;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .binary-representation {
    padding: 0.8rem;
  }

  .binary-representation h4 {
    font-size: 1rem;
  }

  .result-content {
    padding: 1rem;
  }

  #asciiResult li, #unicodeResult li {
    font-size: 0.9rem;
  }
}

.input-guide {
  font-size: 0.95rem;
  color: #34495e;
  margin-bottom: 1.5rem;
  padding: 1rem 1.2rem;
  background: linear-gradient(145deg, #f8f9fa, #ffffff);
  border-radius: 12px;
  border: 1px solid rgba(52, 152, 219, 0.2);
  line-height: 1.6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.input-guide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #3498db, #2ecc71);
  border-radius: 2px;
}

.input-guide strong {
  color: #e67e22;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.input-guide br {
  margin-bottom: 0.3rem;
}

.input-guide ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.2rem;
}

.input-guide li {
  margin: 0.3rem 0;
  position: relative;
}

.input-guide li::before {
  content: '•';
  color: #3498db;
  font-weight: bold;
  position: absolute;
  left: -1rem;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .input-guide {
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
  }

  .input-guide strong {
    font-size: 1rem;
  }
}

/* 이진코드 변환기 스타일 */
.binary-converter {
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem;
}

.binary-converter .converter-box {
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  padding: 1.8rem;
  border-radius: 20px;
  margin: 1rem 0;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.binary-converter .converter-box h3 {
  color: #2c3e50;
  margin: 0 0 1.5rem 0;
  font-size: 1.6rem;
  position: relative;
  padding-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.binary-converter .input-group {
  margin-bottom: 1.5rem;
}

.binary-converter .input-group label {
  display: block;
  font-size: 1.1rem;
  color: #2c3e50;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.binary-converter .input-wrapper {
  display: flex;
  gap: 1rem;
  align-items: center;
  width: 100%;
}

.binary-converter .converter-box input[type="number"] {
  flex: 1;
  padding: 1rem 1.5rem;
  font-size: 1.2rem;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: white;
  color: #2c3e50;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  letter-spacing: 0.5px;
  min-width: 0;
}

.binary-converter .converter-box input[type="number"]::placeholder {
  color: #95a5a6;
  font-size: 1.1rem;
  padding: 0.2rem;
}

.binary-converter .converter-box button {
  flex: 1;
  padding: 1rem 1.5rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.2);
  white-space: nowrap;
  width: 50%;
}

.binary-converter .result {
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  border: 1px solid rgba(52, 152, 219, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #2c3e50;
  text-align: center;
  line-height: 1.6;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  letter-spacing: 0.5px;
}

.binary-converter .converter-box p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #34495e;
  margin-bottom: 1.5rem;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(52, 152, 219, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.binary-converter .input-guide {
  font-size: 0.95rem;
  color: #34495e;
  margin-bottom: 1.5rem;
  padding: 1rem 1.2rem;
  background: linear-gradient(145deg, #f8f9fa, #ffffff);
  border-radius: 12px;
  border: 1px solid rgba(52, 152, 219, 0.2);
  line-height: 1.6;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.binary-converter .input-guide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #3498db, #2ecc71);
  border-radius: 2px;
}

.binary-converter .input-guide strong {
  color: #e67e22;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.binary-converter .input-guide ul {
  margin: 0.5rem 0 0 0;
  padding-left: 1.2rem;
}

.binary-converter .input-guide li {
  margin: 0.3rem 0;
  position: relative;
}

.binary-converter .input-guide li::before {
  content: '•';
  color: #3498db;
  font-weight: bold;
  position: absolute;
  left: -1rem;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .binary-converter {
    padding: 0.8rem;
  }

  .binary-converter .converter-box {
    padding: 1.2rem;
    margin: 0.8rem 0;
  }

  .binary-converter .converter-box h3 {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
  }

  .binary-converter .input-group label {
    font-size: 1rem;
    margin-bottom: 0.6rem;
  }

  .binary-converter .input-wrapper {
    flex-direction: column;
    gap: 0.8rem;
  }

  .binary-converter .converter-box input[type="number"] {
    width: 100%;
    font-size: 1.1rem;
  }

  .binary-converter .converter-box button {
    width: 100%;
    font-size: 1.1rem;
  }

  .binary-converter .result {
    padding: 1.2rem;
    font-size: 1.2rem;
    margin-top: 1.2rem;
  }

  .binary-converter .converter-box p {
    font-size: 1rem;
    padding: 1rem;
    margin-bottom: 1.2rem;
    width: 100%;
  }

  .binary-converter .input-guide {
    font-size: 0.9rem;
    padding: 0.8rem 1rem;
  }

  .binary-converter .input-guide strong {
    font-size: 1rem;
  }
}

.color-palette-section {
  margin: 2rem 0;
  padding: 2rem;
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.color-palette-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(to right, #3498db, #2ecc71);
}

.color-palette-section h3 {
  color: #2c3e50;
  font-size: 1.8rem;
  margin: 0 0 1.5rem 0;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.color-palette-section h3::before {
  content: '';
  display: inline-block;
  width: 32px;
  height: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233498db'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm-1-13h2v6h-2zm0 8h2v2h-2z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.color-palette-section p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #34495e;
  margin-bottom: 1.5rem;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 12px;
  border: 1px solid rgba(52, 152, 219, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.color-palette-section p::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(to bottom, #3498db, #2ecc71);
  border-radius: 2px;
}

.color-palette-section strong {
  color: #e67e22;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.color-palette-section ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
}

.color-palette-section li {
  margin: 0.5rem 0;
  position: relative;
  color: #34495e;
  line-height: 1.6;
}

.color-palette-section li::before {
  content: '•';
  color: #3498db;
  font-weight: bold;
  position: absolute;
  left: -1.2rem;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .color-palette-section {
    padding: 1.5rem;
    margin: 1.5rem 0;
  }

  .color-palette-section h3 {
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
  }

  .color-palette-section p {
    font-size: 1rem;
    padding: 1rem;
    margin-bottom: 1.2rem;
  }

  .color-palette-section strong {
    font-size: 1.1rem;
  }
}

.color-controls {
  margin-bottom: 2rem;
}

.color-controls .input-group {
  margin-bottom: 1.5rem;
}

.color-controls .input-group label {
  display: block;
  font-size: 1.1rem;
  color: #2c3e50;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.color-controls .input-wrapper {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.color-controls input[type="number"],
.color-controls select {
  flex: 1;
  padding: 1rem 1.5rem;
  font-size: 1.2rem;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  transition: all 0.3s ease;
  background: white;
  color: #2c3e50;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  letter-spacing: 0.5px;
  min-width: 0;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232c3e50'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1.5rem;
  padding-right: 3rem;
}

.color-controls input[type="number"]:focus,
.color-controls select:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
  outline: none;
  transform: translateY(-2px);
}

.color-controls input[type="number"]::placeholder,
.color-controls select::placeholder {
  color: #95a5a6;
  font-size: 1.1rem;
}

.color-controls button {
  padding: 1rem 1.8rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.2);
  white-space: nowrap;
}

.color-controls button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.color-controls button:active {
  transform: translateY(-1px);
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .color-controls .input-wrapper {
    flex-direction: column;
    gap: 0.8rem;
  }

  .color-controls input[type="number"] {
    width: 100%;
    font-size: 1.1rem;
    padding: 0.8rem 1.2rem;
  }

  .color-controls button {
    width: 100%;
    font-size: 1.1rem;
    padding: 0.8rem 1.5rem;
  }
}

.color-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.color-row:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.color-row span {
  font-size: 1.1rem;
  color: #2c3e50;
  font-weight: 500;
  min-width: 80px;
}

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

.color-row input[type="text"] {
  flex: 1;
  padding: 0.8rem 1.2rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.color-row input[type="text"]:focus {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  outline: none;
}

.color-row input[type="text"]::placeholder {
  color: #95a5a6;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .color-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
  }

  .color-row span {
    min-width: auto;
  }

  .color-row input[type="text"] {
    width: 100%;
  }
}

.canvas-section {
  margin-top: 2rem;
  padding: 2rem;
  background: white;
  border-radius: 20px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.canvas-section h3 {
  font-size: 1.3rem;
  color: #2c3e50;
  margin-bottom: 1.5rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.1);
}

.canvas-grid-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1.5rem;
}

.canvas-grid, .preview-grid {
  display: grid;
  background: #e0e0e0;
  padding: 1rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.pixel, .preview-pixel {
  width: 30px;
  height: 30px;
  background: white;
  border: none;
  transition: all 0.2s ease;
}

.pixel:focus {
  outline: 2px solid #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .canvas-section {
    padding: 1.5rem;
  }

  .canvas-grid-wrapper {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .canvas-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1.2rem;
  }

  .canvas-grid, .preview-grid {
    padding: 0.8rem;
  }
}

/* 오디오 컨트롤 스타일 */
.audio-controls {
  margin: 20px 0;
  padding: 20px;
  background-color: #f5f5f5;
  border-radius: 8px;
}

.file-upload-section {
  margin-bottom: 20px;
}

.upload-progress {
  margin: 10px 0;
  height: 20px;
  background-color: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background-color: #4CAF50;
  transition: width 0.3s ease;
}

.progress-text {
  display: block;
  margin-top: 5px;
  font-size: 0.9em;
  color: #666;
}

.file-info {
  font-size: 0.8em;
  color: #666;
  margin-top: 5px;
}

.playback-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 20px 0;
}

.control-btn {
  padding: 8px 16px;
  background-color: #2196F3;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.control-btn:hover {
  background-color: #1976D2;
}

.control-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.volume-control {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.volume-control input[type="range"] {
  width: 150px;
}

.quality-indicator {
  margin-top: 20px;
  padding: 15px;
  background-color: #fff;
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.quality-indicator h3 {
  margin-top: 0;
  color: #333;
}

#qualityMetrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

#qualityMetrics p {
  margin: 5px 0;
  padding: 5px;
  background-color: #f0f0f0;
  border-radius: 4px;
}

/* Modern Footer 스타일 */
.modern-footer {
  background: linear-gradient(90deg, #2c3e50 0%, #3498db 100%);
  color: #fff;
  padding: 0;
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(44, 62, 80, 0.08);
}
.footer-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.8rem 2rem;
  font-size: 1.05rem;
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.footer-logo {
  font-size: 1.7rem;
  vertical-align: middle;
}
.footer-title {
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: 1px;
}
.footer-center {
  flex: 1;
  text-align: center;
  font-size: 1rem;
  color: #e0e0e0;
}
.footer-right {
  display: flex;
  align-items: center;
  gap: 1.2rem;
}
.footer-link {
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  transition: color 0.2s;
  border-radius: 8px;
  padding: 0.2rem 0.7rem;
}
.footer-link:hover {
  background: rgba(255,255,255,0.12);
  color: #2ecc71;
}
.footer-icon {
  width: 1.2rem;
  height: 1.2rem;
  vertical-align: middle;
  filter: brightness(0) invert(1);
  margin-right: 0.2rem;
}
@media (max-width: 768px) {
  .footer-content {
    flex-direction: column;
    gap: 0.7rem;
    padding: 1rem 0.5rem;
  }
  .footer-left, .footer-right {
    justify-content: center;
  }
  .footer-center {
    font-size: 0.95rem;
    margin: 0.2rem 0;
  }
}

/* 빙고 게임 스타일 */
.bingo-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.bingo-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.size-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.size-controls label {
  font-weight: 600;
  color: #2c3e50;
}

.size-controls input[type="number"] {
  width: 60px;
  padding: 0.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  text-align: center;
}

.size-controls button {
  padding: 0.5rem 1.5rem;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.size-controls button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.game-stats {
  display: flex;
  gap: 2rem;
  font-size: 1.1rem;
  color: #2c3e50;
}

.game-stats span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.bingo-board {
  display: grid;
  gap: 10px;
  margin: 2rem 0;
  justify-content: center;
}

.bingo-cell {
  width: 80px;
  height: 80px;
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.bingo-cell.empty {
  background: #f8f9fa;
}

.bingo-cell .char-input {
  width: 40px;
  height: 40px;
  border: 2px solid #e0e0e0;
  background: white;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.25rem;
  padding: 0;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.bingo-cell .char-input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
  transform: translateY(-2px);
}

.bingo-cell .char-input::placeholder {
  color: #95a5a6;
  font-size: 1.2rem;
  font-weight: normal;
}

.bingo-cell.empty .char-input {
  background: #f8f9fa;
  border-style: dashed;
}

.bingo-cell.empty .char-input:focus {
  background: white;
  border-style: solid;
}

.bingo-cell .ascii {
  font-size: 0.8rem;
  color: #666;
}

.bingo-cell.selected {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border-color: #2980b9;
}

.bingo-cell.selected .ascii {
  color: rgba(255, 255, 255, 0.8);
}

.bingo-cell.selected .char-input {
  color: white;
}

.bingo-cell:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.bingo-result {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.result-content {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.result-content h3 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 1rem;
}

.result-content p {
  font-size: 1.2rem;
  color: #34495e;
  margin-bottom: 2rem;
}

.result-content button {
  padding: 0.8rem 2rem;
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.result-content button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

@media (max-width: 768px) {
  .bingo-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .size-controls {
    justify-content: center;
  }

  .game-stats {
    justify-content: center;
  }

  .bingo-cell {
    width: 60px;
    height: 60px;
  }

  .bingo-cell .char {
    font-size: 1.2rem;
  }

  .bingo-cell .ascii {
    font-size: 0.7rem;
  }
}

/* 게임 규칙 스타일 */
.game-rules {
  background: linear-gradient(145deg, #ffffff, #f8f9fa);
  padding: 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(52, 152, 219, 0.1);
}

.game-rules h3 {
  color: #2c3e50;
  font-size: 1.4rem;
  margin: 0 0 1rem 0;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid rgba(52, 152, 219, 0.1);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.game-rules h3::before {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%233498db'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.game-rules ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.game-rules li {
  padding: 0.8rem 1rem;
  margin: 0.5rem 0;
  background: white;
  border-radius: 8px;
  color: #34495e;
  font-size: 1.1rem;
  line-height: 1.5;
  border: 1px solid rgba(52, 152, 219, 0.1);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: all 0.3s ease;
}

.game-rules li:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(52, 152, 219, 0.1);
  border-color: rgba(52, 152, 219, 0.2);
}

.game-rules li::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  border-radius: 50%;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .game-rules {
    padding: 1.2rem;
    margin-bottom: 1.5rem;
  }

  .game-rules h3 {
    font-size: 1.2rem;
  }

  .game-rules li {
    font-size: 1rem;
    padding: 0.6rem 0.8rem;
  }
}

/* 난이도 선택 스타일 */
.difficulty-selector {
  margin-bottom: 2rem;
  text-align: center;
}

.difficulty-selector h3 {
  color: #2c3e50;
  margin-bottom: 1rem;
  font-size: 1.3rem;
}

.difficulty-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.difficulty-btn {
  padding: 0.8rem 1.5rem;
  font-size: 1rem;
  background: #f8f9fa;
  color: #2c3e50;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.difficulty-btn:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.difficulty-btn.active {
  background: linear-gradient(135deg, #3498db, #2ecc71);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

/* 퀴즈 정보 스타일 */
.quiz-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 0.8rem;
  background: #f8f9fa;
  border-radius: 8px;
  font-size: 1.1rem;
  color: #2c3e50;
}

.quiz-info span {
  font-weight: 500;
}

#currentDifficulty {
  color: #3498db;
}

#quizScore {
  color: #2ecc71;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
  .difficulty-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .difficulty-btn {
    width: 100%;
  }

  .quiz-info {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

.sampling-controls {
  margin-bottom: 2rem;
  text-align: center;
}
.sampling-controls label {
  font-size: 1.2rem;
  color: #2c3e50;
  margin-right: 1.2rem;
}
#samplingRateSlider {
  width: 300px;
  max-width: 90vw;
  margin-top: 0.5rem;
}
.sampling-guide {
  margin-top: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  font-size: 1.05rem;
  color: #34495e;
  box-shadow: 0 2px 8px rgba(52,152,219,0.05);
}
.sampling-guide ul {
  margin: 0;
  padding-left: 1.2rem;
}
.sampling-guide li {
  margin: 0.5rem 0;
  line-height: 1.6;
}
#samplingCanvas {
  display: block;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(52,152,219,0.08);
  border: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
  #samplingRateSlider {
    width: 100%;
    max-width: 100vw;
  }
  #samplingCanvas {
    width: 100% !important;
    height: 200px !important;
  }
  .sampling-controls label {
    font-size: 1rem;
  }
  .sampling-guide {
    font-size: 0.95rem;
    padding: 1rem;
  }
}

/* 동영상 프레임 애니메이션 스타일 */
.video-frame-controls {
  margin-bottom: 1.5rem;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 2px 8px rgba(52,152,219,0.05);
}
.frame-thumbnails {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px;
  min-height: 100px;
  background: #f8f9fa;
  border-radius: 8px;
  margin: 10px 0;
}

.frame-thumbnail {
  display: inline-block;
  margin: 5px;
  position: relative;
  cursor: move;
  transition: transform 0.2s;
}

.frame-thumbnail img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  border: 2px solid #ddd;
}

.frame-thumbnail span {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #1976D2;
  color: white;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
}

.frame-thumbnail.dragging {
  opacity: 0.5;
  transform: scale(1.1);
  z-index: 1000;
}

.frame-player-controls {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-top: 0.5rem;
}
.frame-player-controls button {
  padding: 0.6rem 1.5rem;
  background: linear-gradient(135deg, #3498db, #2ecc71);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}
.frame-player-controls button:disabled {
  background: #b2bec3;
  cursor: not-allowed;
}
.frame-player-controls label {
  font-size: 1.05rem;
  color: #2c3e50;
}
#frameSpeed {
  width: 120px;
  margin-left: 0.5rem;
}
.frame-canvas-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 1.5rem 0;
}
#frameCanvas {
  background: #f8f9fa;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(52,152,219,0.08);
  border: 1px solid #e0e0e0;
}
@media (max-width: 768px) {
  .frame-thumbnails img {
    width: 40px;
    height: 40px;
  }
  .frame-canvas-container {
    margin: 1rem 0;
  }
  #frameCanvas {
    width: 100% !important;
    height: 200px !important;
  }
}

/* 픽셀 복원 챌린지 스타일 */
.pixel-restoration-challenge {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 1rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.challenge-controls {
  margin-bottom: 2rem;
}

.challenge-controls .input-group {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

.challenge-area {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.image-container {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.original-image,
.blurred-image,
.restored-image {
  text-align: center;
}

.original-image canvas,
.blurred-image canvas,
.restored-image canvas {
  width: 100%;
  max-width: 300px;
  height: auto;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #f8f9fa;
}

.restoration-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.color-picker {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.tool-buttons,
.action-buttons {
  display: flex;
  gap: 1rem;
}

.tool-buttons button,
.action-buttons button {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  background: #3498db;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}

.tool-buttons button:hover,
.action-buttons button:hover {
  background: #2980b9;
}

.tool-buttons button.active {
  background: #2c3e50;
}

.challenge-stats {
  display: flex;
  justify-content: space-around;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.stat-item span:first-child {
  font-weight: bold;
  color: #666;
}

.stat-item span:last-child {
  font-size: 1.2rem;
  color: #2c3e50;
}

/* 픽셀 복원 챌린지 스타일 */
.pixel-challenge-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.challenge-description {
  color: #666;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  text-align: center;
}

.pixel-restoration-challenge {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.control-panel {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.input-group {
  margin-bottom: 1.5rem;
}

.input-group:last-child {
  margin-bottom: 0;
}

.input-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #333;
}

.input-wrapper {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.input-wrapper input[type="text"],
.input-wrapper select {
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  min-width: 200px;
  flex: 1;
}

.file-input {
  display: none;
}

.file-input-label {
  padding: 0.75rem 1.5rem;
  background: #e9ecef;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.file-input-label:hover {
  background: #dee2e6;
}

.button-group {
  display: flex;
  gap: 0.5rem;
}

.primary-button,
.secondary-button {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.primary-button {
  background: #007bff;
  color: white;
}

.primary-button:hover {
  background: #0056b3;
}

.secondary-button {
  background: #6c757d;
  color: white;
}

.secondary-button:hover {
  background: #545b62;
}

.canvas-container {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow: auto;
  max-width: 100%;
}

#pixelCanvas {
  max-width: 100%;
  height: auto;
  border: 2px solid #dee2e6;
  border-radius: 4px;
}

@media (max-width: 768px) {
  .pixel-challenge-section {
    padding: 1rem;
  }

  .input-wrapper {
    flex-direction: column;
    align-items: stretch;
  }

  .input-wrapper input[type="text"],
  .input-wrapper select {
    width: 100%;
  }

  .button-group {
    flex-direction: column;
  }

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}

/* Swiper 슬라이드 가시성 및 겹침 문제 해결 */
.swiper-container {
  width: 100vw !important;
  max-width: 100vw !important;
  left: 50%;
  transform: translateX(-50%);
  position: relative;
  background: transparent;
  margin: 0 !important;
  padding: 0 !important;
}
.swiper-wrapper {
  display: flex;
  /* width: auto; Swiper가 자동으로 관리하므로 명시적으로 지정하지 않음 */
}
.swiper-slide {
  width: 100vw !important;
  max-width: 100vw !important;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(52,152,219,0.08);
  padding: 2rem;
  min-height: 350px;
  transition: opacity 0.3s, visibility 0.3s;
  opacity: 0;
  visibility: hidden;
  z-index: 1;
  flex-shrink: 0;
  min-width: 0;
  max-width: 100%;
}
.swiper-slide-active,
.swiper-slide-next,
.swiper-slide-prev {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}
.swiper-slide:not(.swiper-slide-active):not(.swiper-slide-next):not(.swiper-slide-prev) {
  pointer-events: none;
}
.swiper-button-next,
.swiper-button-prev {
  color: #1976D2;
  z-index: 10000;
  position: fixed !important;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(52,152,219,0.08);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  transition: background 0.2s;
}
.swiper-button-prev {
  left: 24px;
}
.swiper-button-next {
  right: 24px;
}
.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: #e3f0fa;
}
@media (max-width: 600px) {
  .swiper-button-next,
  .swiper-button-prev {
    width: 38px;
    height: 38px;
    font-size: 1.5rem;
  }
  .swiper-button-prev {
    left: 6px;
  }
  .swiper-button-next {
    right: 6px;
  }
}
.swiper-pagination-bullet {
  background: #1976D2;
  opacity: 0.5;
}
.swiper-pagination-bullet-active {
  opacity: 1;
}
@media (max-width: 600px) {
  .swiper-slide {
    padding: 1rem;
    min-height: 250px;
  }
  .swiper-container {
    padding: 1rem 0;
  }
}

/* 슬라이드 내부 section/main 스타일 겹침 방지 */
.swiper-slide section {
  background: none !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  border-radius: 0 !important;
}
