/* OptiCraft Heritage - Pak Tool Styles */
@font-face {
  font-family: Minecraft;
  src: url("../fonts/Minecraft-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #111;
  color: #fff;
  font-family: Minecraft, Arial, Helvetica, sans-serif;
  image-rendering: pixelated;
  min-height: 100vh;
}

button,
a,
input,
select {
  font: inherit;
  font-family: Minecraft, Arial, Helvetica, sans-serif;
}

/* Background Panorama */
.screen {
  min-height: 100vh;
  position: relative;
  background: #111;
  padding-bottom: 60px;
}

.panorama {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  background: #111;
}

.panorama-track {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 200%;
  display: flex;
  animation: tu12-panorama 35s linear infinite;
}

.panorama-track img {
  display: block;
  flex: 0 0 50%;
  width: 50%;
  height: 100%;
  min-width: 100vw;
  object-fit: cover;
  object-position: center;
}

.panorama-track img:nth-child(2) {
  transform: scaleX(-1);
}

@keyframes tu12-panorama {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

.panorama-shade {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(rgba(0, 0, 0, .25), rgba(0, 0, 0, .6)),
    linear-gradient(90deg, rgba(0, 0, 0, .2), transparent 35%, transparent 65%, rgba(0, 0, 0, .2));
}

/* Header Bar */
.top-nav {
  position: relative;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.nav-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  background: #555;
  border: 2px solid #1b1b1b;
  box-shadow: inset 2px 2px #aaa, inset -2px -2px #222, 2px 2px rgba(0, 0, 0, .6);
  padding: 8px 14px;
  font-size: 13px;
  text-shadow: 2px 2px #222;
  transition: background .15s ease, transform .05s ease;
}

.nav-back-btn:hover {
  background: #777;
}

.nav-back-btn:active {
  transform: translate(1px, 1px);
}

.lang-switcher {
  display: flex;
  gap: 8px;
}

.lang-btn {
  background: #4a4a4a;
  color: #fff;
  border: 2px solid #1b1b1b;
  box-shadow: inset 2px 2px #888, inset -2px -2px #222, 2px 2px rgba(0, 0, 0, .6);
  padding: 4px 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: background .15s ease, transform .05s ease;
}

.lang-btn:hover {
  background: #666;
}

.lang-btn.active {
  background: #777;
  outline: 2px solid rgba(255, 255, 255, .8);
  box-shadow: inset 2px 2px #222, inset -2px -2px #aaa;
}

.lang-btn:active {
  transform: translate(1px, 1px);
}

.lang-flag {
  display: block;
  width: 28px;
  height: 28px;
  object-fit: contain;
}

/* Main Container */
.tool-container {
  position: relative;
  z-index: 2;
  width: min(960px, 94vw);
  margin: 10px auto 40px;
}

.tool-header {
  text-align: center;
  margin-bottom: 20px;
}

.tool-title {
  font-size: clamp(20px, 4vw, 28px);
  margin: 0 0 8px;
  text-shadow: 3px 3px #111;
  color: #fff;
  letter-spacing: 0.5px;
}

.tool-subtitle {
  font-size: clamp(12px, 2.5vw, 15px);
  color: #ccc;
  text-shadow: 2px 2px #222;
  margin: 0;
  line-height: 1.4;
}

/* Panel Box */
.legacy-panel {
  background: rgba(38, 38, 38, .96);
  border: 3px solid #111;
  box-shadow: inset 2px 2px #666, inset -2px -2px #171717, 7px 7px rgba(0, 0, 0, .5);
  padding: 24px;
}

/* Tabs */
.tabs-nav {
  display: flex;
  gap: 8px;
  border-bottom: 2px solid #1b1b1b;
  padding-bottom: 14px;
  margin-bottom: 20px;
}

.tab-btn {
  flex: 1;
  padding: 12px 14px;
  background: #555;
  color: #ccc;
  border: 2px solid #1b1b1b;
  box-shadow: inset 2px 2px #888, inset -2px -2px #222, 2px 2px rgba(0, 0, 0, .6);
  cursor: pointer;
  text-shadow: 2px 2px #222;
  font-size: clamp(12px, 2.5vw, 15px);
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all .15s ease;
}

.tab-btn:hover {
  background: #6e6e6e;
  color: #fff;
}

.tab-btn.active {
  background: #858585;
  color: #fff;
  outline: 2px solid rgba(255, 255, 255, .6);
  box-shadow: inset 2px 2px #333, inset -2px -2px #aaa;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* Info Box */
.info-card {
  background: rgba(20, 20, 20, 0.6);
  border: 2px solid #222;
  box-shadow: inset 1px 1px #444, inset -1px -1px #111;
  padding: 14px 18px;
  margin-bottom: 18px;
  font-size: 13px;
  line-height: 1.5;
  color: #ddd;
  text-shadow: 1px 1px #111;
}

.info-card p {
  margin: 0 0 6px;
}

.info-card p:last-child {
  margin: 0;
}

.info-card strong {
  color: #fff;
}

/* Dropzone & Picker */
.dropzone {
  border: 2px dashed #666;
  background: rgba(25, 25, 25, 0.7);
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s ease;
  margin-bottom: 18px;
  border-radius: 2px;
}

.dropzone:hover,
.dropzone.dragover {
  border-color: #55aaff;
  background: rgba(35, 45, 60, 0.8);
}

.dropzone-icon {
  font-size: 38px;
  color: #88aacc;
  margin-bottom: 12px;
}

.dropzone-text {
  font-size: 14px;
  color: #eee;
  margin-bottom: 14px;
  line-height: 1.4;
}

.dropzone-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* Legacy Button */
.legacy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  font-weight: 900;
  text-align: center;
  text-shadow: 2px 2px #333;
  background: #777;
  border: 2px solid #1b1b1b;
  box-shadow: inset 2px 2px #aaa, inset -2px -2px #444, 3px 3px rgba(0, 0, 0, .65);
  padding: 11px 18px;
  font-size: 13px;
  user-select: none;
  transition: background .15s ease, transform .05s ease;
}

.legacy-btn:hover {
  background: #8d8d8d;
  outline: 2px solid rgba(255, 255, 255, .2);
}

.legacy-btn:active {
  box-shadow: inset 2px 2px #444, inset -2px -2px #aaa, 1px 1px #111;
  transform: translate(2px, 2px);
}

.legacy-btn.primary {
  background: #2b5b84;
  box-shadow: inset 2px 2px #508bc0, inset -2px -2px #15324d, 3px 3px rgba(0, 0, 0, .65);
}

.legacy-btn.primary:hover {
  background: #3b74a4;
}

.legacy-btn.success {
  background: #2b8444;
  box-shadow: inset 2px 2px #4fc473, inset -2px -2px #144924, 3px 3px rgba(0, 0, 0, .65);
}

.legacy-btn.success:hover {
  background: #38a557;
}

.legacy-btn:disabled,
.legacy-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* Form Groups */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
  color: #ddd;
}

.form-input {
  width: 100%;
  background: #222;
  border: 2px solid #111;
  color: #fff;
  padding: 9px 12px;
  font-size: 14px;
  box-shadow: inset 1px 1px #444;
  outline: none;
}

.form-input:focus {
  border-color: #55aaff;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 12px;
  color: #ccc;
  user-select: none;
}

/* File Badge & Summary */
.summary-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(20, 20, 20, 0.8);
  border: 2px solid #111;
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  flex-wrap: wrap;
  gap: 8px;
}

.summary-badge {
  background: #444;
  border: 1px solid #666;
  padding: 3px 8px;
  font-size: 12px;
  color: #88ff88;
}

/* File Table */
.file-list-container {
  max-height: 280px;
  overflow-y: auto;
  border: 2px solid #111;
  background: #181818;
  margin-bottom: 16px;
}

.file-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.file-table th {
  background: #282828;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 2px solid #111;
  position: sticky;
  top: 0;
  z-index: 2;
  color: #aaa;
}

.file-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #242424;
  word-break: break-all;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
}

.file-table tr:hover td {
  background: rgba(255, 255, 255, 0.05);
}

.download-single-btn {
  background: #444;
  border: 1px solid #111;
  color: #fff;
  padding: 3px 7px;
  font-size: 11px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-family: Minecraft, Arial, sans-serif;
}

.download-single-btn:hover {
  background: #666;
}

/* Progress & Status */
.progress-container {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 2px solid #111;
}

.progress-bar {
  height: 18px;
  background: #222;
  border: 2px solid #111;
  box-shadow: inset 1px 1px #444, inset -1px -1px #111;
  overflow: hidden;
  margin-bottom: 8px;
  position: relative;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #32843b, #48bb55);
  box-shadow: inset 1px 1px #65e073;
  transition: width 0.1s linear;
}

.status-text {
  font-size: 12px;
  color: #ccc;
  margin-bottom: 10px;
  min-height: 16px;
}

/* Console Log Box */
.log-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #aaa;
  margin-bottom: 4px;
}

.log-actions {
  display: flex;
  gap: 8px;
}

.log-mini-btn {
  background: transparent;
  border: 1px solid #444;
  color: #aaa;
  font-size: 10px;
  padding: 2px 6px;
  cursor: pointer;
}

.log-mini-btn:hover {
  color: #fff;
  border-color: #777;
}

.log-terminal {
  width: 100%;
  height: 120px;
  background: #141414;
  border: 2px solid #111;
  color: #66e077;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  line-height: 1.4;
  padding: 8px 10px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
  box-shadow: inset 2px 2px #0a0a0a;
}

/* Responsive adjustments */
@media (max-width: 780px) {
  .legacy-panel {
    padding: 16px;
  }

  .dropzone {
    padding: 20px 12px;
  }

  .dropzone-actions {
    flex-direction: column;
  }

  .dropzone-actions .legacy-btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .top-nav {
    padding: 12px 14px;
  }

  .nav-back-btn {
    font-size: 11px;
    padding: 6px 10px;
  }

  .lang-flag {
    width: 22px;
    height: 22px;
  }

  .tool-title {
    font-size: 18px;
  }

  .tab-btn {
    font-size: 11px;
    padding: 10px 8px;
  }

  .legacy-panel {
    padding: 12px;
  }

  .legacy-btn {
    font-size: 12px;
    padding: 9px 14px;
  }
}