/* PDF metadata viewer — golden luxury */

.tool-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.pdf-metadata-tool {
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.97), rgba(248, 238, 222, 0.97));
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 14px 36px -24px rgba(94, 65, 30, 0.35);
  border: 1px solid rgba(145, 103, 48, 0.15);
}

.upload-section {
  margin-bottom: 25px;
}

.upload-area {
  width: 100%;
  min-height: 200px;
  padding: 40px;
  background: #fffaf2;
  border: 2px dashed rgba(145, 103, 48, 0.35);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upload-area:hover {
  border-color: #ab7c34;
  background: rgba(182, 138, 58, 0.06);
}

.upload-area.dragover {
  border-color: #ab7c34;
  background: rgba(182, 138, 58, 0.12);
}

.upload-area i {
  font-size: 3rem;
  color: #b98b3b;
}

.upload-area p {
  color: rgba(88, 64, 38, 0.72);
  font-size: 1rem;
  margin: 0;
}

.selected-file-info {
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.28);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 25px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.file-info-content {
  display: flex;
  align-items: center;
  gap: 15px;
}

.file-info-content i {
  font-size: 2.5rem;
  color: #b98b3b;
}

.file-info-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.file-name {
  color: #5e4329;
  font-size: 1.1rem;
  font-weight: 600;
  word-break: break-all;
}

.file-size {
  color: rgba(88, 64, 38, 0.65);
  font-size: 0.9rem;
}

.btn-remove {
  background: transparent;
  border: 1px solid rgba(255, 107, 107, 0.35);
  color: #c94a3a;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove:hover {
  background: rgba(255, 107, 107, 0.1);
  border-color: #ff6b6b;
  transform: scale(1.05);
}

.result-header {
  margin-bottom: 25px;
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  border: 1px solid rgba(145, 103, 48, 0.22);
  padding: 0 30px;
  border-radius: 12px;
  background: rgba(182, 138, 58, 0.08);
}

.result-header h3 {
  color: #5e4329;
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions {
  display: flex;
  gap: 15px;
  align-items: center;
  margin-top: 15px;
  margin-bottom: 25px;
}

.btn-icon {
  padding: 12px 24px;
  background: linear-gradient(135deg, rgba(182, 138, 58, 0.18), rgba(182, 138, 58, 0.06));
  border: 1px solid rgba(145, 103, 48, 0.35);
  border-radius: 10px;
  color: #7a572c;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(94, 65, 30, 0.08);
}

.btn-icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: left 0.5s ease;
}

.btn-icon:hover::before {
  left: 100%;
}

.btn-icon:hover {
  background: linear-gradient(135deg, rgba(182, 138, 58, 0.28), rgba(182, 138, 58, 0.14));
  border-color: #ab7c34;
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(94, 65, 30, 0.15);
}

.btn-icon:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(94, 65, 30, 0.12);
}

.btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-icon.success {
  background: linear-gradient(135deg, rgba(0, 255, 0, 0.2), rgba(0, 255, 0, 0.1));
  border-color: #00ff00;
  color: #00ff00;
  box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
  animation: successPulse 0.5s ease;
}

@keyframes successPulse {
  0%,
  100% {
    box-shadow: 0 4px 15px rgba(0, 255, 0, 0.3);
  }
  50% {
    box-shadow: 0 4px 25px rgba(0, 255, 0, 0.5), 0 0 30px rgba(0, 255, 0, 0.3);
  }
}

.btn-icon i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.btn-icon:hover i:not(.fa-spinner):not(.fa-check) {
  transform: scale(1.1);
}

.btn-icon .fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.btn-copy {
  min-width: 110px;
  justify-content: center;
}

.btn-copy:hover {
  background: linear-gradient(135deg, rgba(182, 138, 58, 0.32), rgba(182, 138, 58, 0.18));
}

.export-dropdown {
  position: relative;
}

.btn-export {
  min-width: 130px;
  justify-content: center;
  padding-right: 20px;
}

.btn-export:hover {
  background: linear-gradient(135deg, rgba(182, 138, 58, 0.32), rgba(182, 138, 58, 0.18));
}

.btn-export .fa-chevron-down {
  font-size: 0.7rem;
  margin-left: 6px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: absolute;
  right: 12px;
}

.export-dropdown.active .btn-export {
  background: linear-gradient(135deg, rgba(182, 138, 58, 0.26), rgba(182, 138, 58, 0.14));
  border-color: #ab7c34;
  box-shadow: 0 4px 14px rgba(94, 65, 30, 0.14);
}

.export-dropdown.active .btn-export .fa-chevron-down {
  transform: rotate(180deg);
}

.export-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: linear-gradient(180deg, rgba(255, 252, 246, 0.98), rgba(248, 238, 222, 0.96));
  border: 1px solid rgba(145, 103, 48, 0.28);
  border-radius: 12px;
  min-width: 220px;
  box-shadow: 0 16px 40px rgba(94, 65, 30, 0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-15px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.export-menu::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #ab7c34, transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0%,
  100% {
    transform: translateX(-100%);
  }
  50% {
    transform: translateX(100%);
  }
}

.export-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.export-option {
  width: 100%;
  padding: 14px 18px;
  background: transparent;
  border: none;
  color: #4a351f;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border-bottom: 1px solid rgba(145, 103, 48, 0.1);
  position: relative;
  overflow: hidden;
}

.export-option::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0;
  background: linear-gradient(90deg, rgba(182, 138, 58, 0.12), transparent);
  transition: width 0.3s ease;
}

.export-option:hover::before {
  width: 100%;
}

.export-option:last-child {
  border-bottom: none;
}

.export-option:hover {
  background: linear-gradient(90deg, rgba(182, 138, 58, 0.14), transparent);
  color: #5e4329;
  padding-left: 22px;
  transform: translateX(4px);
}

.export-option:active {
  transform: translateX(2px);
}

.export-option i {
  width: 20px;
  color: #b98b3b;
  font-size: 1rem;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.export-option:hover i {
  transform: scale(1.15);
  color: #7a5526;
}

.export-option span {
  position: relative;
  z-index: 1;
}

.metadata-container {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 10px;
}

.metadata-section {
  background: rgba(255, 252, 246, 0.65);
  border-radius: 12px;
  padding: 25px;
  border: 1px solid rgba(145, 103, 48, 0.12);
}

.section-header {
  color: #5e4329;
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 15px;
  border-bottom: 2px solid rgba(145, 103, 48, 0.15);
}

.section-header i {
  font-size: 1.2rem;
  color: #b98b3b;
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 15px;
}

.metadata-item {
  display: flex;
  flex-direction: column;
  padding: 15px;
  background: rgba(255, 252, 246, 0.9);
  border-radius: 6px;
  border: 1px solid rgba(145, 103, 48, 0.12);
  transition: all 0.3s ease;
}

.metadata-item:hover {
  background: rgba(182, 138, 58, 0.06);
  border-color: rgba(145, 103, 48, 0.25);
}

.metadata-item.highlight-warning {
  border-color: rgba(255, 140, 0, 0.5);
  background: rgba(255, 140, 0, 0.06);
}

.metadata-item.highlight-warning .metadata-value {
  color: #c48000;
}

.metadata-label {
  color: rgba(88, 64, 38, 0.72);
  font-size: 0.85rem;
  margin-bottom: 5px;
  font-weight: 500;
}

.metadata-value {
  color: #7a5526;
  font-size: 1rem;
  font-weight: 600;
  word-break: break-word;
}

.category-tab {
  padding: 10px 20px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 12px;
  color: rgba(88, 64, 38, 0.72);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.category-tab:hover {
  border-color: rgba(171, 124, 52, 0.45);
  color: #4a351f;
}

.category-tab.active {
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
  border-color: transparent;
  color: #fff8ef;
}

.converter-form {
  margin-bottom: 25px;
}

.conversion-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.input-group {
  flex: 1;
  display: flex;
  gap: 10px;
}

.input-group .form-input {
  flex: 1;
}

.unit-select {
  padding: 12px 15px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 8px;
  color: #4a351f;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
}

.unit-select:focus {
  outline: none;
  border-color: #ab7c34;
  box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.14);
}

.swap-btn {
  padding: 12px;
  background: rgba(182, 138, 58, 0.12);
  border: 1px solid rgba(145, 103, 48, 0.28);
  border-radius: 12px;
  color: #7a572c;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swap-btn:hover {
  background: rgba(182, 138, 58, 0.22);
  border-color: #ab7c34;
  transform: rotate(180deg);
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  color: #5e4329;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 15px;
  background: #fffaf2;
  border: 1px solid rgba(145, 103, 48, 0.22);
  border-radius: 8px;
  color: #4a351f;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: #ab7c34;
  box-shadow: 0 0 0 3px rgba(171, 124, 52, 0.14);
}

.form-input::placeholder {
  color: #8c7558;
}

.action-buttons {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary {
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
  color: #fff8ef;
}

.btn-primary:hover {
  background: linear-gradient(180deg, #c89a4a 0%, #aa7d34 100%);
  transform: scale(1.05);
}

.btn-secondary {
  background: transparent;
  color: #7a572c;
  border: 2px solid rgba(145, 103, 48, 0.4);
}

.btn-secondary:hover {
  background: rgba(182, 138, 58, 0.12);
  color: #5e4329;
  transform: scale(1.05);
}

.result-card {
  background: rgba(182, 138, 58, 0.06);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid rgba(145, 103, 48, 0.15);
}

.result-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid rgba(145, 103, 48, 0.1);
}

.result-item:last-child {
  border-bottom: none;
}

.result-label {
  color: rgba(88, 64, 38, 0.72);
  font-size: 1rem;
  font-weight: 500;
}

.result-value {
  color: #7a5526;
  font-size: 1.2rem;
  font-weight: 700;
  font-family: 'Courier New', monospace;
}

.hash-type-icon {
  font-size: 2.5rem;
  color: #b98b3b;
}

.hash-type-info h4 {
  color: #4a351f;
  font-size: 1.5rem;
  margin: 0 0 5px 0;
}

.hash-type-info p {
  color: rgba(88, 64, 38, 0.65);
  margin: 0;
  font-size: 0.95rem;
}

.hash-details {
  display: grid;
  gap: 15px;
}

.detail-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: rgba(255, 252, 246, 0.85);
  border-radius: 6px;
}

.detail-label {
  color: rgba(88, 64, 38, 0.72);
  font-weight: 500;
}

.detail-value {
  color: #7a5526;
  font-weight: 600;
  font-family: 'Courier New', monospace;
}

.error-message {
  background: rgba(173, 82, 47, 0.12);
  border: 1px solid rgba(154, 63, 43, 0.26);
  color: #9a3f2b;
  padding: 15px;
  border-radius: 12px;
  margin-top: 20px;
}

.toast-message {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
  color: #fff8ef;
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 500;
  z-index: 10000;
  box-shadow: 0 6px 18px rgba(145, 103, 48, 0.28);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  animation: toastSlideIn 0.3s ease;
}

.toast-message.toast-success {
  background: linear-gradient(180deg, #bc8e3d 0%, #9f742f 100%);
}

.toast-message.toast-error {
  background: #c94a3a;
  color: #fff;
}

.toast-message.show {
  opacity: 1;
  transform: translateX(0);
}

@keyframes toastSlideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.tool-page-shell .disclaimer-content::before {
  animation: none !important;
  background: linear-gradient(90deg, #ff8c00, #ffa500, #ff7f00, #ff8c00);
  background-size: 100% 100%;
  background-position: 0 0;
}

@media (max-width: 768px) {
  .toast-message {
    top: auto;
    bottom: 100px;
    left: 20px;
    right: 20px;
  }

  .result-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .result-header h3 {
    margin-top: 15px;
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
    gap: 10px;
  }

  .btn-icon {
    width: 100%;
    justify-content: center;
  }

  .export-dropdown {
    width: 100%;
  }

  .btn-export {
    width: 100%;
  }

  .export-menu {
    right: 0;
    left: 0;
    min-width: auto;
    width: 100%;
  }

  .file-info-content {
    flex-wrap: wrap;
  }

  .btn-copy.copied {
    background: rgba(182, 138, 58, 0.22);
    border-color: #ab7c34;
  }

  .btn-copy.copied svg {
    display: inline-block !important;
    vertical-align: middle;
    width: 14px;
    height: 14px;
  }

  .tool-container {
    padding: 0 15px;
  }

  .pdf-metadata-tool {
    padding: 20px;
  }

  .action-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hash-type-card {
    flex-direction: column;
    text-align: center;
  }

  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
}
