/* ====================================================================
   RSVP Reader - Tool Specific Styles
   速読リーダー固有のスタイル
   ==================================================================== */

/* File Upload Area Overrides
   ========================================================================== */
.file-upload-area {
  border-width: 3px;
  border-color: var(--tool-primary);
  background: #ffffff;
  padding: 40px;
  margin-bottom: 16px;
}

.file-upload-area:hover {
  background: #f0f4ff;
  border-color: var(--tool-primary-dark);
}

.file-upload-area.dragover {
  background: #e3f2fd;
  border-color: var(--tool-primary-dark);
  transform: scale(1.02);
}

.file-upload-label {
  cursor: pointer;
  display: block;
}

.upload-icon {
  font-size: 48px;
  display: block;
  margin-bottom: 16px;
}

.file-name {
  margin-top: 16px;
  font-size: 0.9rem;
  color: #666;
  min-height: 20px;
}

.file-name.success {
  color: #2e7d32;
  font-weight: 600;
}

.file-name.error {
  color: #c62828;
  font-weight: 600;
}

/* RSVP Display Area
   ========================================================================== */
#rsvp-display {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #f8f9ff;
  border-radius: 12px;
  padding: 40px;
  font-size: 42px;
  font-weight: 600;
  text-align: center;
  position: relative;
  border: 2px solid #e0e7ff;
  margin-bottom: 16px;
}

#rsvp-display.reading {
  background: linear-gradient(135deg, #ffeef8 0%, #f3e7ff 100%);
  border-color: var(--tool-primary);
  animation: rsvp-pulse 2s ease-in-out infinite;
}

@keyframes rsvp-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--tool-primary-rgb), 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(var(--tool-primary-rgb), 0); }
}

#main-text {
  line-height: 1.4;
  color: #1a1a1a;
  margin-bottom: 20px;
}

.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--tool-primary) 0%, #00bcd4 100%) !important;
  transition: width 0.3s;
  border-radius: 0 0 0 12px;
}

/* Control Buttons
   ========================================================================== */
.control-buttons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

/* Stats Section
   ========================================================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  text-align: center;
}

/* Override common stat-item for RSVP card-style stats */
.stats .stat-item {
  padding: 16px;
  background: linear-gradient(135deg, var(--tool-primary) 0%, var(--tool-primary-dark) 100%);
  color: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: block;
}

.stats .stat-label {
  display: block;
  font-size: 0.875rem;
  opacity: 0.9;
  margin-bottom: 8px;
  color: white;
}

.stats .stat-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

/* EPUB Info Section
   ========================================================================== */
.epub-info-section {
  margin-top: 48px;
  margin-bottom: 48px;
}

.highlight-card {
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  border: 2px solid var(--tool-primary);
  box-shadow: 0 4px 12px rgba(var(--tool-primary-rgb), 0.15);
  position: relative;
  overflow: hidden;
}

.highlight-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--tool-primary) 0%, #00bcd4 100%);
}

.kindle-announcement {
  padding-top: 12px;
}

.badge-new {
  display: inline-block;
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 700;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(238, 90, 111, 0.3);
  animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Use Case List Override (inside .card, remove common card styling)
   ========================================================================== */
.card .use-case-list {
  background: none;
  padding: 0;
  box-shadow: none;
  border-left: none;
  border-radius: 0;
}

/* Steps Override (inside .card, remove common card styling)
   ========================================================================== */
.card .steps {
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: none;
  padding: 0;
  box-shadow: none;
  border-left: none;
  border-radius: 0;
}

.step-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.step-number {
  width: 40px;
  height: 40px;
  font-size: 1.2rem;
  box-shadow: none;
}

.step-content {
  flex: 1;
}

.step-title {
  font-size: 1rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 8px;
}

/* Responsive
   ========================================================================== */
@media (max-width: 768px) {
  #rsvp-display {
    font-size: 28px;
    padding: 20px;
    min-height: 180px;
  }

  .control-buttons {
    grid-template-columns: repeat(2, 1fr);
  }

  .file-upload-area {
    padding: 20px;
  }

  .upload-icon {
    font-size: 32px;
  }

  .epub-info-section {
    margin-top: 32px;
    margin-bottom: 32px;
  }

  .badge-new {
    font-size: 0.8rem;
    padding: 5px 12px;
  }
}
