* {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

input,
select,
textarea {
  user-select: text;
}

body {
  font-family: "Rubik", sans-serif;
}

.nintendo-red {
  background-color: #e60012;
}
.nintendo-blue {
  background-color: #0084ff;
}
.nintendo-yellow {
  background-color: #ffde00;
}
.nintendo-green {
  background-color: #00a652;
}

.rounded-nintendo {
  border-radius: 28px;
}

.rounded-nintendo-sm {
  border-radius: 16px;
}

.shadow-nintendo {
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.25);
}

.btn-3d {
  box-shadow: 0 6px 0 #c20000;
  transition: all 0.1s;
}

.btn-3d:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #c20000;
}

.btn-3d-green {
  box-shadow: 0 6px 0 #007a3d;
  transition: all 0.1s;
}

.btn-3d-green:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #007a3d;
}

.btn-3d-purple {
  box-shadow: 0 6px 0 #5a00a3;
  transition: all 0.1s;
}

.btn-3d-purple:active {
  transform: translateY(4px);
  box-shadow: 0 2px 0 #5a00a3;
}

.star-pattern {
  background-image: radial-gradient(
      circle at 20% 20%,
      #ffde00 0%,
      transparent 2%
    ),
    radial-gradient(circle at 80% 80%, #00a652 0%, transparent 2%),
    radial-gradient(circle at 40% 80%, #0084ff 0%, transparent 2%),
    radial-gradient(circle at 80% 20%, #e60012 0%, transparent 2%);
  background-size: 100px 100px;
  background-position: 0 0, 50px 50px, 50px 0, 0 50px;
}

.character-bounce {
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.page-curl {
  position: relative;
  background: linear-gradient(135deg, #f0f0f0 0%, #ffffff 50%);
}

.page-curl::after {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 30px;
  height: 30px;
  background: linear-gradient(315deg, #e0e0e0 50%, transparent 50%);
  box-shadow: -2px 2px 3px rgba(0, 0, 0, 0.1);
}

.kanji-center {
  display: grid;
  place-items: center;
  line-height: 1;
}

.slide-container {
  transition: all 0.9s cubic-bezier(0.23, 1, 0.32, 1);
  transform-origin: center;
}

.slide-container.center-mode {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: calc(100vh - 200px);
  padding-top: 3rem;
}

.slide-container.center-mode .control-panel-wrapper {
  max-width: 600px;
  width: 100%;
  transform: scale(1.03);
  animation: gentle-float 4s ease-in-out infinite;
}

.slide-container.split-mode {
  display: flex;
  flex-direction: row;
  gap: 1.5rem;
  align-items: flex-start;
}

.slide-container.split-mode .control-panel-wrapper {
  width: 384px;
  flex-shrink: 0;
  transform: scale(1) translateX(0);
  animation: none;
  transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

.slide-container.split-mode .pdf-viewer-wrapper {
  flex: 1;
  opacity: 0;
  transform: translateX(60px) scale(0.95);
  animation: slide-in-smooth 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.2s forwards;
}

@keyframes gentle-float {
  0%,
  100% {
    transform: scale(1.03) translateY(0);
  }
  50% {
    transform: scale(1.03) translateY(-3px);
  }
}

@keyframes slide-in-smooth {
  0% {
    opacity: 0;
    transform: translateX(60px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.power-up {
  animation: clean-power-up 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes clean-power-up {
  0% {
    transform: scale(1);
    box-shadow: 0 6px 0 #c20000;
  }
  50% {
    transform: scale(1.03) translateY(-1px);
    box-shadow: 0 8px 0 #c20000, 0 0 15px rgba(230, 0, 18, 0.3);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 6px 0 #c20000;
  }
}

.upload-area {
  transition: all 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.upload-area:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 132, 255, 0.1);
}

.upload-area.drag-over {
  transform: scale(1.01) translateY(-1px);
  border-color: #0084ff !important;
  background: linear-gradient(135deg, #f8faff 0%, #f0f7ff 100%);
  box-shadow: 0 4px 12px rgba(0, 132, 255, 0.15);
}

.pdf-viewer-wrapper {
  display: none;
}

.slide-container.split-mode .pdf-viewer-wrapper {
  display: block;
}

.pdf-loading-shimmer {
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  transition: opacity 0.2s ease;
}

.pdf-loading-shimmer.active {
  opacity: 1;
  animation: subtle-shimmer 1.2s ease-in-out;
}

.shimmer-line {
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 132, 255, 0.05) 25%,
    rgba(0, 132, 255, 0.1) 50%,
    rgba(0, 132, 255, 0.05) 75%,
    transparent 100%
  );
  animation: gentle-sweep 1.5s ease-in-out;
}

@keyframes subtle-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

@keyframes gentle-sweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.ocr-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: #f8f8f8;
  border-radius: 16px;
  border: 4px solid #e0e0e0;
  transition: all 0.2s ease;
  box-shadow: 0 3px 0 rgba(0, 0, 0, 0.1);
}

.ocr-toggle.active {
  background: #e6f7ff;
  border-color: #0084ff;
  box-shadow: 0 3px 0 rgba(0, 132, 255, 0.2);
}

.toggle-switch {
  position: relative;
  width: 60px;
  height: 32px;
  background: #d0d0d0;
  border-radius: 32px;
  transition: all 0.3s ease;
  cursor: pointer;
  border: 4px solid #a0a0a0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 2px 0 rgba(0, 0, 0, 0.2);
}

.toggle-switch.active {
  background: #0084ff;
  border-color: #0066cc;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 2px 0 rgba(0, 102, 204, 0.3);
}

.toggle-switch::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  background: white;
  border-radius: 50%;
  top: 0;
  left: 0;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3), inset 0 -2px 0 rgba(0, 0, 0, 0.1);
  border: 2px solid #f0f0f0;
}

.toggle-switch.active::after {
  transform: translateX(28px);
  border-color: #e0e0e0;
}

.toggle-switch:hover {
  transform: scale(1.05);
}

.toggle-switch:active {
  transform: scale(0.95);
}

.ocr-progress {
  margin-top: 1rem;
  padding: 1rem;
  background: #f0f7ff;
  border-radius: 16px;
  border: 4px solid #0084ff;
  box-shadow: 0 3px 0 rgba(0, 132, 255, 0.2);
}

.ocr-progress-bar {
  width: 100%;
  height: 12px;
  background: #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #c0c0c0;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ocr-progress-fill {
  height: 100%;
  background: linear-gradient(to right, #0084ff, #00a6ff);
  transition: width 0.3s ease;
  box-shadow: 0 0 10px rgba(0, 132, 255, 0.5);
}

.notification-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.notification {
  min-width: 300px;
  padding: 16px 20px;
  border-radius: 16px;
  border: 4px solid;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(400px);
  opacity: 0;
  animation: slideIn 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  pointer-events: all;
  transition: all 0.3s ease;
}

.notification.hiding {
  animation: slideOut 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

@keyframes slideIn {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

.notification.info {
  background: #e6f7ff;
  border-color: #0084ff;
  color: #0066cc;
  box-shadow: 0 4px 0 rgba(0, 132, 255, 0.2);
}

.notification.success {
  background: #f0fff4;
  border-color: #00a652;
  color: #007a3d;
  box-shadow: 0 4px 0 rgba(0, 166, 82, 0.2);
}

.notification.error {
  background: #fff2f0;
  border-color: #e60012;
  color: #c20000;
  box-shadow: 0 4px 0 rgba(230, 0, 18, 0.2);
}

.notification-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.notification-message {
  flex: 1;
  font-size: 14px;
  line-height: 1.3;
}

.notification:hover {
  transform: scale(1.02);
  cursor: pointer;
}

/* Mobile responsive styles */
@media (max-width: 480px) {
  .github-text {
    font-size: 0.75rem;
  }

  .github-button {
    margin: 0 auto;
  }

  .github-button svg {
    width: 1rem;
    height: 1rem;
  }
}

@media (max-width: 1024px) {
  .slide-container.split-mode {
    flex-direction: column;
  }

  .slide-container.split-mode .control-panel-wrapper {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
  }

  .slide-container.split-mode .pdf-viewer-wrapper {
    width: 100%;
    animation: slide-in-bottom 0.7s cubic-bezier(0.23, 1, 0.32, 1) 0.2s forwards;
  }

  .slide-container.center-mode .control-panel-wrapper {
    transform: scale(1.01);
    padding: 0 1rem;
  }

  .notification-container {
    top: 70px;
    right: 10px;
    left: 10px;
  }

  .notification {
    min-width: auto;
    width: 100%;
  }
}

@keyframes slide-in-bottom {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
