/* browser-pdf.com */

:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --success-color: #16a34a;
  --warning-color: #ea580c;
  --error-color: #dc2626;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --bg-color: #ffffff;
  --bg-secondary: #f3f4f6;
  --border-color: #e5e7eb;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.header {
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  padding: 12px 0;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-color);
}

.logo:hover {
  text-decoration: none;
}

.nav {
  display: flex;
  gap: 20px;
}

.nav a {
  color: var(--text-light);
  font-size: 14px;
}

.nav a:hover {
  color: var(--primary-color);
}

/* Main Content */
main {
  padding: 32px 0;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 16px;
}

h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 32px 0 16px;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 12px;
}

p {
  margin-bottom: 16px;
}

/* Security Notice */
.security-notice {
  background-color: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #065f46;
}

.security-notice::before {
  content: "";
  width: 20px;
  height: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23065f46'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M12 15v2m-6 4h12a2 2 0 002-2v-6a2 2 0 00-2-2H6a2 2 0 00-2 2v6a2 2 0 002 2zm10-10V7a4 4 0 00-8 0v4h8z'/%3E%3C/svg%3E");
  background-size: contain;
  flex-shrink: 0;
}

/* Drop Zone */
.drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
  margin-bottom: 24px;
}

.drop-zone:hover,
.drop-zone.dragover {
  border-color: var(--primary-color);
  background-color: #eff6ff;
}

.drop-zone-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
}

.drop-zone-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.drop-zone-text {
  font-size: 16px;
  color: var(--text-light);
  margin-bottom: 8px;
}

.drop-zone-hint {
  font-size: 13px;
  color: var(--text-light);
}

/* File Input */
.file-input {
  display: none;
}

/* Button */
.btn {
  display: inline-block;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  text-decoration: none;
}

.btn-primary:disabled {
  background-color: var(--text-light);
  cursor: not-allowed;
}

.btn-secondary {
  background-color: var(--bg-secondary);
  color: var(--text-color);
}

.btn-secondary:hover {
  background-color: var(--border-color);
}

/* Preview Area */
.preview-area {
  margin-bottom: 24px;
}

.preview-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  margin-bottom: 8px;
}

.preview-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 4px;
}

.preview-info {
  flex: 1;
}

.preview-name {
  font-size: 14px;
  font-weight: 500;
  word-break: break-all;
}

.preview-size {
  font-size: 12px;
  color: var(--text-light);
}

.preview-remove {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px 8px;
}

.preview-remove:hover {
  color: var(--error-color);
}

/* Progress */
.progress-container {
  margin-bottom: 24px;
  display: none;
}

.progress-container.active {
  display: block;
}

.progress-bar {
  height: 8px;
  background-color: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background-color: var(--primary-color);
  width: 0%;
  transition: width 0.3s;
}

.progress-text {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 8px;
  text-align: center;
}

/* Result */
.result-area {
  text-align: center;
  padding: 24px;
  background-color: #ecfdf5;
  border-radius: 12px;
  margin-bottom: 24px;
  display: none;
}

.result-area.active {
  display: block;
}

.result-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23065f46'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: contain;
}

.result-message {
  font-size: 18px;
  font-weight: 600;
  color: #065f46;
  margin-bottom: 16px;
}

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

/* Content Sections */
.content-section {
  margin: 48px 0;
}

.content-section h2 {
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  padding: 8px 0;
  padding-left: 28px;
  position: relative;
}

.feature-list li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--success-color);
  font-weight: bold;
}

/* FAQ */
.faq-item {
  margin-bottom: 24px;
}

.faq-question {
  font-weight: 600;
  margin-bottom: 8px;
}

.faq-answer {
  color: var(--text-light);
}

/* Tools Grid (for Top Page) */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.tool-card {
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.tool-card:hover {
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.tool-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 12px;
}

.tool-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tool-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-color);
  margin-bottom: 8px;
}

.tool-desc {
  font-size: 13px;
  color: var(--text-light);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border-color);
  padding: 24px 0;
  margin-top: 48px;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-light);
}

.footer-copyright {
  font-size: 13px;
  color: var(--text-light);
}

/* Legal Pages */
.legal-content {
  max-width: 700px;
}

.legal-content h1 {
  margin-bottom: 24px;
}

.legal-content h2 {
  font-size: 18px;
  margin-top: 32px;
}

.legal-content p,
.legal-content li {
  font-size: 15px;
  line-height: 1.8;
}

.legal-content ul {
  margin-left: 24px;
  margin-bottom: 16px;
}

.legal-content li {
  margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 600px) {
  .header-inner {
    flex-direction: column;
    gap: 12px;
  }

  .nav {
    gap: 16px;
  }

  h1 {
    font-size: 24px;
  }

  .drop-zone {
    padding: 32px 16px;
  }

  .drop-zone-icon {
    font-size: 36px;
  }

  .actions {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

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

/* Error Message */
.error-message {
  background-color: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--error-color);
  margin-bottom: 16px;
  display: none;
}

.error-message.active {
  display: block;
}
