/* Advanced Section Specific Styles */

.advanced-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* CAPTCHA Tools Section */
.captcha-tools-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-top: 12px;
  margin-bottom: 20px;
}

.captcha-tools-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.captcha-tools-header .header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.captcha-tools-header .header-icon {
  font-size: 24px;
}

.captcha-tools-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.help-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: scale(1.1);
}

.section-description {
  margin: 0 0 20px 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.available-detections-section {
  margin-bottom: 16px;
}

.section-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.custom-select-wrapper {
  position: relative;
}

.detection-selector-custom {
  position: relative;
  width: 100%;
}

.selector-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.selector-display:hover {
  border-color: var(--text-muted);
  background: var(--bg-secondary);
}

.detection-selector-custom.open .selector-display {
  border-color: var(--text-muted);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.placeholder-text {
  color: var(--text-muted);
}

.selected-name {
  color: var(--text-primary);
  font-weight: 500;
}

.selector-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
}

.selector-dropdown::-webkit-scrollbar {
  width: 6px;
}

.selector-dropdown::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.selector-dropdown::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.detection-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.detection-option:hover {
  background: var(--bg-tertiary);
}

.detection-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
}

.detection-icon-placeholder {
  font-size: 18px;
}

.detection-name {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
}

.detection-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.action-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn .btn-icon {
  font-size: 16px;
}

.primary-action {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.primary-action:hover:not(:disabled) {
  background: var(--bg-secondary);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.primary-action:active:not(:disabled) {
  transform: translateY(0);
}

.primary-action:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.secondary-action {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.secondary-action:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
  transform: translateY(-1px);
}

.secondary-action:active {
  transform: translateY(0);
}

.detection-tools-panel {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

/* ReCaptcha Tools Grid */
.recaptcha-tools-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.recaptcha-tools-grid .recaptcha-tool-btn:nth-child(4) {
  grid-column: span 1;
}

.recaptcha-tools-grid .recaptcha-tool-btn:nth-child(5) {
  grid-column: span 2;
}

.recaptcha-tool-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 80px;
}

.recaptcha-tool-btn:hover {
  background: var(--bg-tertiary);
  border-color: var(--border);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.recaptcha-tool-btn:active {
  transform: translateY(0);
}

.recaptcha-tool-btn.capturing {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
  animation: pulse 2s infinite;
}

.recaptcha-tool-btn.capturing .tool-btn-label {
  color: white;
}

.tool-btn-icon {
  font-size: 28px;
}

.tool-btn-label {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  line-height: 1.3;
}

@media (max-width: 400px) {
  .recaptcha-tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Advanced Header */
.advanced-header {
  padding: 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.advanced-header .header-info h3 {
  margin: 0 0 4px 0;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
}

.advanced-header .header-info p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

/* Advanced Tools Grid */
.advanced-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tool-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  transition: all 0.2s ease;
}

.tool-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tool-icon {
  font-size: 24px;
  margin-bottom: 8px;
}

.tool-info h4 {
  margin: 0 0 4px 0;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.tool-info p {
  margin: 0 0 12px 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.tool-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
}

.tool-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--text-muted);
}

.tool-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Analysis Results */
.analysis-results {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
}

.results-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.clear-results-btn {
  padding: 4px 8px;
  background: var(--danger);
  border: none;
  border-radius: 4px;
  color: white;
  cursor: pointer;
  font-size: 11px;
  transition: background 0.2s;
}

.clear-results-btn:hover {
  background: #dc2626;
}

.results-content {
  padding: 16px;
}

/* Analysis Summary */
.analysis-summary {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 20px;
}

.summary-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
}

.stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-value.score-high {
  color: var(--danger);
}

.stat-value.score-medium {
  color: var(--warning);
}

.stat-value.score-low {
  color: var(--success);
}

.stat-value.risk-high {
  color: var(--danger);
}

.stat-value.risk-medium {
  color: var(--warning);
}

.stat-value.risk-low {
  color: var(--success);
}

.stat-value.risk-minimal {
  color: var(--text-secondary);
}

/* Detected Systems */
.detected-systems {
  margin-bottom: 20px;
}

.detected-systems h5 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.systems-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.system-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  font-size: 12px;
}

.system-name {
  font-weight: 500;
  color: var(--text-primary);
}

.system-type {
  color: var(--text-secondary);
  font-size: 11px;
}

.system-confidence {
  color: var(--accent);
  font-weight: 500;
}

/* Recommendations */
.recommendations h5 {
  margin: 0 0 8px 0;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}

.recommendations-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.4;
}

.recommendations-list li {
  margin-bottom: 4px;
}

/* Export Modal */
.export-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.export-modal-content {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  width: 280px;
  max-width: 90%;
}

.export-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.export-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
}

.close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.close-btn:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.export-options {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.export-option {
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  text-align: left;
}

.export-option:hover {
  background: var(--bg-tertiary);
  border-color: var(--accent);
}

/* Error Message */
.error-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-tertiary);
  border-left: 4px solid var(--danger);
  border-radius: 6px;
}

.error-icon {
  font-size: 20px;
  color: var(--danger);
}

.error-text {
  color: var(--text-primary);
  font-size: 13px;
}

/* Available Detections Section */
.available-detections {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.detections-header h3 {
  margin: 0 0 4px 0;
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
}

.detections-header p {
  margin: 0 0 16px 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.detection-tools-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Detection Tool Card */
.detection-tool-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  transition: all 0.2s;
}

.detection-tool-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.detection-tool-card.recaptcha-tool {
  border-left: 4px solid #4285F4;
}

.tool-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tool-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tool-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
}

.tool-badge {
  padding: 4px 10px;
  background: var(--success);
  color: white;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tool-description {
  margin: 0 0 12px 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
}

.tool-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.tool-action-btn {
  padding: 8px 10px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tool-action-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-1px);
}

.tool-action-btn:active {
  transform: translateY(0);
}

.tool-action-btn.capturing {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Tool Results */
.tool-results {
  margin-top: 12px;
  max-height: 300px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tool-results::-webkit-scrollbar {
  width: 6px;
}

.tool-results::-webkit-scrollbar-track {
  background: var(--bg-primary);
  border-radius: 3px;
}

.tool-results::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.tool-result {
  padding: 10px 12px;
  border-radius: 6px;
  border-left: 3px solid;
  font-size: 12px;
}

.tool-result.result-success {
  background: rgba(34, 197, 94, 0.1);
  border-left-color: var(--success);
}

.tool-result.result-error {
  background: rgba(239, 68, 68, 0.1);
  border-left-color: var(--danger);
}

.tool-result.result-info {
  background: rgba(59, 130, 246, 0.1);
  border-left-color: var(--accent);
}

.result-title {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.result-content {
  color: var(--text-secondary);
  line-height: 1.4;
  white-space: pre-wrap;
}

.result-timestamp {
  margin-top: 4px;
  font-size: 10px;
  color: var(--text-muted);
}

/* SiteKey Modal */
.sitekey-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.2s;
}

.sitekey-modal.show {
  opacity: 1;
}

.sitekey-modal-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.sitekey-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.sitekey-header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 600;
}

.sitekey-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 24px;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s;
}

.sitekey-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.sitekey-body {
  padding: 20px;
}

.sitekey-value {
  padding: 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 12px;
}

.sitekey-value code {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 12px;
  color: var(--accent);
  word-break: break-all;
}

.sitekey-copy-btn {
  width: 100%;
  padding: 10px;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.sitekey-copy-btn:hover {
  background: #2563eb;
}

/* Version Info Modal */
.version-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.info-label {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 13px;
}

.info-value {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 13px;
}

/* Callback List Modal */
.callbacks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 300px;
  overflow-y: auto;
}

.callbacks-list::-webkit-scrollbar {
  width: 6px;
}

.callbacks-list::-webkit-scrollbar-track {
  background: var(--bg-tertiary);
  border-radius: 3px;
}

.callbacks-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.callback-item {
  padding: 10px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.callback-item code {
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
  color: var(--accent);
}

/* Responsive adjustments */
@media (max-width: 400px) {
  .advanced-tools-grid {
    grid-template-columns: 1fr;
  }

  .analysis-summary {
    grid-template-columns: 1fr;
  }

  .tool-actions {
    grid-template-columns: 1fr 1fr;
  }
}

/* ========================================
   Capture History Section
   ======================================== */

.capture-history-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin-top: 20px;
}

.capture-history-section .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.capture-history-section .header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.capture-history-section .header-icon {
  font-size: 24px;
}

.capture-history-section h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
}

.capture-history-section .header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.history-count {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 12px;
  background: var(--bg-tertiary);
  border-radius: 12px;
  font-weight: 500;
}

.clear-history-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.clear-history-btn:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
  transform: scale(1.05);
}

/* Empty State */
.empty-history-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-history-state p {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
}

.empty-hint {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* History List */
.capture-history-section .history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Capture Card - New Design */
.capture-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.capture-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Card Top Section */
.capture-card-top {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}

.capture-favicon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 2px;
}

.capture-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.capture-type-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.capture-type-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.capture-type-value {
  font-weight: 600;
  font-size: 11px;
  color: var(--text-primary);
  line-height: 1.3;
}

.capture-hostname-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
}

.capture-hostname {
  font-weight: 600;
  font-size: 12px;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.capture-time {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  flex-shrink: 0;
}

.capture-expand {
  width: 24px;
  height: 24px;
  border: none;
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 16px;
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 2px;
}

.capture-expand:hover {
  background: var(--accent);
  color: white;
  transform: rotate(90deg);
}

.capture-card.expanded .capture-expand {
  transform: rotate(90deg);
  background: var(--accent);
  color: white;
}

/* Site Key Container */
.capture-sitekey-container {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  overflow: hidden;
}

.capture-sitekey-code {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* History Item Details */
.capture-history-section .history-item-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  animation: slideDown 0.3s ease-out;
}

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

.capture-history-section .details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.capture-history-section .detail-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.capture-history-section .detail-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.capture-history-section .detail-value {
  font-size: 13px;
  color: var(--text-primary);
  word-break: break-word;
}

.capture-history-section .detail-code {
  font-family: 'Courier New', monospace;
  background: var(--bg-secondary);
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 11px;
  word-break: break-all;
  max-height: 80px;
  overflow-y: auto;
  line-height: 1.4;
}

.capture-history-section .details-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.capture-history-section .detail-action-btn {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.capture-history-section .detail-action-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.capture-history-section .detail-action-btn:active {
  transform: translateY(0);
}

/* Responsive Design - Details section */
@media (max-width: 500px) {
  .capture-history-section .details-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .capture-history-section .detail-label {
    font-size: 10px;
  }

  .capture-history-section .detail-value {
    font-size: 12px;
  }

  .capture-history-section .detail-code {
    font-size: 10px;
    max-height: 60px;
  }

  .capture-history-section .details-actions {
    flex-direction: column;
  }

  .capture-history-section .detail-action-btn {
    font-size: 11px;
    padding: 8px 12px;
  }

  .capture-card {
    padding: 10px;
  }

  .capture-favicon {
    width: 18px;
    height: 18px;
  }

  .capture-hostname {
    font-size: 11px;
  }

  .capture-type-label {
    font-size: 10px;
  }

  .capture-type-value {
    font-size: 10px;
  }

  .capture-sitekey-code {
    font-size: 10px;
  }
}