/*
 * ============================================================================
 * ScholarSync - Academic Paper Management Extension
 * Copyright © 2025 Scholar Sync LTD. All Rights Reserved.
 * Company Number: 16685861
 * 
 * This software is proprietary and confidential. Unauthorized copying,
 * modification, distribution, or use of this software, via any medium,
 * is strictly prohibited without explicit written permission from
 * Scholar Sync LTD.
 * 
 * For licensing inquiries, please contact: info@scholar-sync.com
 * ============================================================================
 */

body,html {margin:0;padding:0;height:100%;font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;}
.dashboard {display:flex;height:100vh;background:#fafafa;color:#333;}
.sidebar {width:240px;background:#fff;border-right:1px solid #e8e8e8;padding:24px;box-sizing:border-box;height:100vh;display:flex;flex-direction:column;}
.app-title {font-size:24px;font-weight:700;color:#6366f1;margin-bottom:20px;text-align:center;letter-spacing:-0.5px;}
.sidebar h2 {font-size:16px;margin-top:0;margin-bottom:16px;font-weight:600;}
.sidebar ul {list-style:none;padding:0;margin:0;}
.sidebar li {padding:10px 12px;border-radius:8px;cursor:pointer;margin-bottom:4px;}
.sidebar li:hover {background:#f5f5f5;}
.sidebar li.active {background:#6366f1;color:#fff;}
.main {flex:1;display:flex;flex-direction:column;padding:32px;overflow:auto;max-width:none;}
.topbar {margin-bottom:32px;}

/* Top bar layout with verification status */
.topbar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.search-and-status {
  display: flex;
  align-items: center;
  gap: 20px;
}

.search-and-status input {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid #e1e5e9;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-and-status input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.export-and-status {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-shrink: 0;
}

.export-buttons {
  display: flex;
  gap: 12px;
}

.export-btn {
  padding: 8px 16px;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-weight: 500;
}

.export-btn:hover {
  background: #6366f1;
  color: white;
  border-color: #6366f1;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

#verificationStatus {
  background: #f0f9f0;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid #d4edda;
  font-size: 13px;
  color: #22aa22 !important;
  font-weight: 500;
}

/* Sorting tabs styles */
.sort-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 8px;
}
.sort-tab {
  padding: 8px 14px;
  border: 1px solid #e1e5e9;
  border-radius: 8px;
  background: #fff;
  color: #333;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
}
.sort-tab:hover {
  background: #f5f5f5;
  transform: translateY(-1px);
}
.sort-tab.active {
  background: #6366f1;
  color: #fff;
  border-color: #6366f1;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

/* Filter tabs styles */
.filter-tabs {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.filter-tab {
  padding: 10px 16px;
  border: 1px solid #e1e5e9;
  border-radius: 10px;
  background: #fff;
  color: #333;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
  font-weight: 500;
}
.filter-tab:hover {
  background: #f5f5f5;
  transform: translateY(-1px);
}
.filter-tab.active {
  background: #28a745;
  color: #fff;
  border-color: #28a745;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.papers-grid {display:grid;grid-template-columns:repeat(auto-fill,minmax(380px,1fr));gap:24px;margin-top:8px;}
.card {
  background:#fff;
  border-radius:16px;
  padding:28px;
  box-shadow:0 2px 8px rgba(0,0,0,0.04);
  display:flex;
  flex-direction:column;
  gap:12px;
  transition:all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  min-height:300px;
  overflow:hidden;
  position:relative;
  border: 1px solid #f0f0f0;
}
.card:hover {box-shadow:0 8px 24px rgba(0,0,0,0.08); transform:translateY(-2px); border-color: #e1e5e9;}
.card.expanded {
  min-height:auto;
  max-height:none;
}

/* Card title styling - allow wrapping for long titles */
.card h3 {
  margin:0;
  font-size:18px;
  font-weight:600;
  line-height:1.4;
  color:#1a1a1a;
  word-wrap:break-word;
  overflow-wrap:break-word;
  hyphens:auto;
}

/* Card header with title, read status, and star */
.card-header {
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  margin-bottom:12px;
}

.card-title-section {
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
}

.card-actions-section {
  display:flex;
  align-items:center;
  gap:12px;
  flex-shrink:0;
}

/* Reading list badge styling - always on its own line */
.reading-list-name {
  display:block;
  background:#f0f4ff;
  color:#4f46e5;
  padding:6px 12px;
  border-radius:12px;
  font-size:12px;
  font-weight:500;
  margin-top:8px;
  border:1px solid #e0e7ff;
  width:fit-content;
  align-self:flex-start;
}

/* Paper metadata styling */
.card-metadata {
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-bottom:12px;
}

.metadata-item {
  display:flex;
  align-items:center;
  font-size:13px;
  color:#6b7280;
  line-height:1.4;
}

.metadata-label {
  font-weight:500;
  color:#374151;
  margin-right:8px;
  min-width:100px;
}

.metadata-value {
  color:#6b7280;
}

.card h2 {margin:0;font-size:18px;font-weight:600;}
.card p {margin:2px 0;font-size:14px;}
.card > div {margin:2px 0;font-size:14px;line-height:1.4;}
button.seeMoreBtn {
  background:rgba(99, 102, 241, 0.08);
  border:1px solid rgba(99, 102, 241, 0.2);
  color:#6366f1;
  cursor:pointer;
  font-size:13px;
  font-weight:500;
  margin-top:12px;
  padding:10px 16px;
  border-radius:10px;
  transition:all 0.2s ease;
  align-self:flex-start;
}
button.seeMoreBtn:hover {
  background:rgba(99, 102, 241, 0.12);
  border-color:rgba(99, 102, 241, 0.3);
  transform:translateY(-1px);
  box-shadow:0 2px 8px rgba(99, 102, 241, 0.15);
}
.details {
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid #f0f0f0;
  opacity:1;
  max-height:1000px;
  transition:all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
  overflow:hidden;
}
.details.hidden {
  opacity:0;
  max-height:0;
  margin-top:0;
  padding-top:0;
  border-top:none;
}

/* Collapsible Abstract Styles */
.abstract-container {
  position: relative;
}

.abstract-content {
  font-style: italic;
  line-height: 1.7;
  color: #374151;
  transition: all 0.3s ease;
  overflow: hidden;
}

.abstract-content.collapsed {
  max-height: 9em; /* Approximately 10 lines */
  position: relative;
}

.abstract-content.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2em;
  background: linear-gradient(transparent, #f8fafc);
  pointer-events: none;
}

.abstract-toggle {
  background: none;
  border: none;
  color: #667eea;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  padding: 8px 0 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.abstract-toggle:hover {
  color: #5a67d8;
  transform: translateX(2px);
}

.abstract-toggle .arrow {
  transition: transform 0.2s ease;
  font-size: 12px;
}

.abstract-toggle.expanded .arrow {
  transform: rotate(180deg);
}
.details > div {
  margin:10px 0;
  line-height:1.5;
}
.paper-actions {
  background:rgba(248,249,250,0.8);
  border:1px solid #e9ecef;
  border-radius:10px;
  padding:12px;
  margin-top:12px !important;
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.paper-actions label {
  font-weight:500;
  color:#495057;
  font-size:13px;
}
.paper-actions select {
  padding:6px 10px;
  border-radius:6px;
  border:1px solid #ced4da;
  background:white;
  font-size:13px;
  transition:all 0.2s ease;
}
.paper-actions select:focus {
  outline:none;
  border-color:#6366f1;
  box-shadow:0 0 0 2px rgba(99, 102, 241, 0.2);
}
.paper-actions button {
  font-size:12px;
  font-weight:500;
  padding:6px 12px;
  border-radius:6px;
  border:none;
  cursor:pointer;
  transition:all 0.2s ease;
  display:flex;
  align-items:center;
  gap:4px;
}
.paper-actions button:hover {
  transform:translateY(-1px);
  box-shadow:0 4px 8px rgba(0,0,0,0.15);
}
/* Enhanced ratings section */
.ratings-section {
  background:linear-gradient(135deg, #f8fafe, #ffffff);
  border:1px solid #e8ecf7;
  padding:14px 16px;
  border-radius:12px;
  margin:12px 0;
  font-size:13px;
  box-shadow:0 1px 3px rgba(0,0,0,0.04);
}
.ratings-section div {margin:6px 0;}
.ratings-section .stars {margin-left:8px;font-size:15px;}

/* Enhanced star styling */
.stars {color:#f59e0b;font-size:15px;font-weight:500;}

/* Read/Unread checkbox styling in cards */
.paper-read-status {
  display: flex;
  align-items: center;
  gap: 6px;
}

.read-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #10b981;
  cursor: pointer;
}

.read-label {
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  font-weight: 500;
}

/* Star rating in card header */
.card-star {
  font-size: 18px;
  color: #f59e0b;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.card-star:hover {
  transform: scale(1.1);
}

/* Followed User Container Styles */
.followed-user-container {
  background: linear-gradient(135deg, #ffffff, #f8f9fa);
  border: 1px solid #e3e8ed;
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.2s ease;
}

.followed-user-container:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

.followed-user-dropdown {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 8px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 32px;
}

.followed-user-dropdown:hover {
  border-color: #6366f1;
  background-color: #fafbfc;
}

.followed-user-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.followed-user-bottom-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #f0f0f0;
}

/* Styles for navigation section */
.nav-section {
  margin-bottom: 24px;
}
.nav-button {
  display: block;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 6px;
  border: none;
  border-radius: 10px;
  background: #f5f5f5;
  color: #333;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 500;
}
.nav-button:hover {
  background: #e8e8e8;
  transform: translateY(-1px);
}
.nav-button.active {
  background: #6366f1;
  color: #fff;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.create-shared-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: #6366f1;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s ease;
}

.create-shared-btn:hover {
    background: #4f46e5;
}

.join-shared-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    margin-bottom: 15px;
    background: #FF9800;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s ease;
}

.join-shared-btn:hover {
    background: #F57C00;
}

.shared-list-controls {
    margin-bottom: 15px;
}

.shared-list-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.shared-list-item:hover {
    border-color: #2196F3;
    box-shadow: 0 2px 4px rgba(33, 150, 243, 0.1);
}

.shared-list-item.active {
    border-color: #2196F3;
    background: #f3f8ff;
}

.shared-list-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.shared-list-info {
    font-size: 12px;
    color: #666;
}

.shared-list-participants {
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

.share-input-group {
    margin-bottom: 15px;
}

.share-input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.share-input-group input {
    width: 70%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
}

.copy-btn, .share-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.copy-btn {
    background: #4CAF50;
    color: white;
}

.copy-btn:hover {
    background: #45a049;
}

.share-btn {
    background: #2196F3;
    color: white;
}

.share-btn:hover {
    background: #1976D2;
}

.collaborator-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    background: #f5f5f5;
    border-radius: 4px;
}

.remove-collaborator {
    background: #ff4444;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.remove-collaborator:hover {
    background: #cc0000;
}

.share-input-group {
    margin-bottom: 15px;
}

.share-input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.share-input-group input {
    width: calc(100% - 80px);
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: inline-block;
}

.copy-btn, .share-btn {
    width: 70px;
    padding: 8px;
    margin-left: 8px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.copy-btn:hover, .share-btn:hover {
    background: #45a049;
}

#collaboratorsContainer {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    min-height: 50px;
}

.collaborator-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-collaborator {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
}

.remove-collaborator:hover {
    background: #cc0000;
}

/* Styles for reading list and follow items in sidebar */
#readingListSidebar, #sharedListSidebar, #followSidebar {
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding: 4px;
}

#readingListSidebar::-webkit-scrollbar, #sharedListSidebar::-webkit-scrollbar, #followSidebar::-webkit-scrollbar {
  width: 6px;
}

#readingListSidebar::-webkit-scrollbar-track, #sharedListSidebar::-webkit-scrollbar-track, #followSidebar::-webkit-scrollbar-track {
  background: #f8f8f8;
  border-radius: 3px;
}

#readingListSidebar::-webkit-scrollbar-thumb, #sharedListSidebar::-webkit-scrollbar-thumb, #followSidebar::-webkit-scrollbar-thumb {
  background: #c8c8c8;
  border-radius: 3px;
}

#readingListSidebar::-webkit-scrollbar-thumb:hover, #sharedListSidebar::-webkit-scrollbar-thumb:hover, #followSidebar::-webkit-scrollbar-thumb:hover {
  background: #a0a0a0;
}

.reading-list-item, .follow-item {
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  margin-bottom: 4px;
  transition: all 0.2s ease;
  font-size: 13px;
}
.reading-list-item:hover, .follow-item:hover {
  background: #f5f5f5;
  transform: translateY(-1px);
}
.reading-list-item.active {
  background: #6366f1;
  color: #fff;
  box-shadow: 0 2px 6px rgba(99, 102, 241, 0.3);
}

/* Styles for paper actions (move to list, remove) */
.paper-actions {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.move-list-select {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.move-list-select:hover {
  border-color: #6366f1;
}

.move-list-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.remove-btn {
  background: #f44336 !important;
  color: white !important;
  padding: 6px 12px !important;
  border: none !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  font-size: 13px !important;
  transition: background-color 0.2s !important;
}

.remove-btn:hover {
  background: #d32f2f !important;
}

/* Success message animation */
@keyframes slideIn {
  from { 
    transform: translateX(100%); 
    opacity: 0; 
  }
  to { 
    transform: translateX(0); 
    opacity: 1; 
  }
}

/* Info button styles */
.info-btn {
  padding: 6px 10px;
  border: 1px solid #007aff;
  border-radius: 6px;
  background: #007aff;
  color: white;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-right: 8px;
}

.info-btn:hover {
  background: #005fcc;
  border-color: #005fcc;
  transform: scale(1.05);
}

/* Sidebar info button styles */
.info-section-top {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.info-btn-sidebar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid #e9e3f5;
  border-radius: 10px;
  background: #f8f7fc;
  color: #6366f1;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  box-sizing: border-box;
}

.info-btn-sidebar:hover {
  background: #6366f1;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  border-color: #6366f1;
}

.guided-tour-btn {
  border-color: #3730a3;
  background: #3730a3;
  color: white;
}

.guided-tour-btn:hover {
  background: #312e81;
  color: white;
  box-shadow: 0 2px 8px rgba(55, 48, 163, 0.3);
}

.info-icon {
  font-size: 16px;
}

.info-label {
  font-weight: 600;
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 30px;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #333;
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 25px;
  color: #333;
  font-size: 24px;
  font-weight: 600;
}

.info-section {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.info-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.info-section h3 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #007aff;
  font-size: 18px;
  font-weight: 600;
}

.info-section ul, .info-section ol {
  margin: 0;
  padding-left: 20px;
}

.info-section li {
  margin-bottom: 8px;
  line-height: 1.5;
  color: #555;
}

.info-section li strong {
  color: #333;
  font-weight: 600;
}

/* Guide steps styling */
.guide-steps {
  margin: 15px 0;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px;
  background: #f8f9ff;
  border-radius: 8px;
  border-left: 4px solid #6366f1;
}

.step-number {
  background: #6366f1;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  flex-shrink: 0;
  margin-top: 2px;
}

.step-content {
  line-height: 1.5;
  color: #555;
}

.step-content strong {
  color: #6366f1;
  font-weight: 600;
}

/* Responsive modal */
@media (max-width: 768px) {
  .modal-content {
    max-width: 95%;
    padding: 20px;
    margin: 10px;
  }
  
  .modal-content h2 {
    font-size: 20px;
  }
  
  .info-section h3 {
    font-size: 16px;
  }
}

/* Troubleshooting modal specific styles */
.troubleshoot-section {
  background: #f8f9fa;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  border-left: 4px solid #2196F3;
}

.troubleshoot-section h4 {
  margin: 0 0 10px 0;
  color: #333;
  font-size: 14px;
}

.troubleshoot-section ul {
  margin: 0;
  padding-left: 20px;
}

.troubleshoot-section li {
  margin-bottom: 8px;
  font-size: 13px;
  line-height: 1.4;
}

.troubleshoot-section strong {
  color: #6366f1;
  font-weight: 600;
}

.info-icon-btn:hover {
  background: #bbdefb !important;
  transform: scale(1.1);
  transition: all 0.2s ease;
}

.close-troubleshoot-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  font-weight: bold;
  color: #aaa;
  cursor: pointer;
  border: none;
  background: none;
}

.close-troubleshoot-modal:hover {
  color: #000;
}

/* Guided Tour Styles */
#guidedTourOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9000;
  pointer-events: none;
}

.tour-highlight {
  position: absolute;
  border: 3px solid #6366f1;
  border-radius: 8px;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.3), 0 0 20px rgba(99, 102, 241, 0.5);
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
  transition: all 0.3s ease;
  animation: tourPulse 2s infinite;
  z-index: 9100;
}

/* Ensure highlighted elements remain interactive */
.tour-active {
  position: relative;
  z-index: 9200 !important;
  pointer-events: all !important;
}

/* Ensure buttons within highlighted elements work */
.tour-active button,
.tour-active select,
.tour-active input,
.tour-active a,
.tour-active .seeMoreBtn,
.tour-active .remove-btn,
.tour-active .add-to-shared-btn,
.tour-active .move-list-select {
  position: relative;
  z-index: 9300 !important;
  pointer-events: all !important;
}

/* Ensure paper card details are interactive during tour */
.tour-active .details,
.tour-active .paper-actions {
  position: relative;
  z-index: 9250 !important;
  pointer-events: all !important;
}

/* Make sure all interactive elements in cards work */
.tour-active .card * {
  pointer-events: all !important;
}

@keyframes tourPulse {
  0% { box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.3), 0 0 20px rgba(0, 122, 255, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(0, 122, 255, 0.2), 0 0 30px rgba(0, 122, 255, 0.7); }
  100% { box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.3), 0 0 20px rgba(0, 122, 255, 0.5); }
}

.tour-tooltip {
  position: absolute;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 400px;
  min-width: 320px;
  pointer-events: all;
  z-index: 9500;
  overflow: visible;
}

/* High priority tooltip for paper cards step */
.tour-tooltip.high-priority {
  z-index: 99999 !important;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
  position: fixed !important;
  max-width: 450px !important;
  min-width: 380px !important;
  width: auto !important;
  overflow: visible !important;
  border: 3px solid #6366f1 !important;
  top: 20px !important;
}

.tour-tooltip.high-priority .tour-content {
  padding: 25px !important;
}

/* Hide highlight for paper cards step to prevent interference */
.tour-highlight.papers-step {
  opacity: 0.3;
  pointer-events: none !important;
}

/* Ensure tour controls are always on top */
.tour-content,
.tour-progress,
.tour-buttons,
#tourNextBtn,
#tourPrevBtn,
#tourSkipBtn {
  position: relative !important;
  z-index: 99999 !important;
  pointer-events: all !important;
}

/* Specific fix for Next button visibility */
#tourNextBtn {
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-width: 60px !important;
}

/* Ensure proper spacing in high priority tooltips */
.tour-tooltip.high-priority .tour-progress {
  margin: 15px 0 !important;
}

.tour-tooltip.high-priority .tour-buttons {
  margin-top: 20px !important;
  padding-top: 15px !important;
  border-top: 1px solid #eee !important;
}

/* Step 6 Popup Window Styles */
.step6-popup {
  position: fixed;
  top: 50px;
  right: 50px;
  width: 350px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  z-index: 100000;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  border: 2px solid #6366f1;
}

.step6-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: #6366f1;
  color: white;
  border-radius: 10px 10px 0 0;
  cursor: move;
  user-select: none;
}

.step6-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
}

.step6-icon {
  font-size: 16px;
}

.step6-controls {
  display: flex;
  gap: 5px;
}

.step6-control-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.step6-control-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.step6-content {
  padding: 20px;
}

.step6-content h4 {
  margin: 0 0 10px 0;
  color: #6366f1;
  font-size: 18px;
  font-weight: 600;
}

.step6-content p {
  margin: 0 0 15px 0;
  color: #333;
  line-height: 1.5;
  font-size: 14px;
}

.step6-progress {
  margin: 15px 0;
}

.step6-progress span {
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
  display: block;
}

.step6-progress-bar {
  width: 100%;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
}

.step6-progress-fill {
  height: 100%;
  background: #6366f1;
  transition: width 0.3s ease;
  border-radius: 2px;
}

.step6-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #eee;
}

.step6-popup.minimized .step6-content {
  display: none;
}

.step6-popup.minimized {
  width: 200px;
}

.step6-popup.minimized .step6-header {
  border-radius: 10px;
}

/* Import Reading List Button */
.import-btn {
  background: #28a745;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.import-btn:hover {
  background: #218838;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(40, 167, 69, 0.3);
}

/* Read/Unread Filter Controls */
.read-filter-controls {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
}

.read-filter-controls label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #495057;
  cursor: pointer;
}

.read-filter-controls input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #6366f1;
}

/* Reading List Badge */
.reading-list-badge {
  display: inline-block;
  background: #e3f2fd;
  color: #1976d2;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  margin-left: 8px;
}

/* Read/Unread Status */
.paper-read-status {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.read-checkbox {
  width: 16px;
  height: 16px;
  accent-color: #28a745;
}

.read-label {
  font-size: 13px;
  color: #495057;
  cursor: pointer;
}

.tour-content {
  padding: 20px;
}

.tour-tooltip h4 {
  margin: 0 0 10px 0;
  color: #6366f1;
  font-size: 18px;
  font-weight: 600;
}

.tour-tooltip p {
  margin: 0 0 15px 0;
  color: #333;
  line-height: 1.5;
  font-size: 14px;
}

.tour-progress {
  margin-bottom: 20px;
}

.tour-progress span {
  display: block;
  font-size: 12px;
  color: #666;
  margin-bottom: 8px;
}

.tour-progress-bar {
  width: 100%;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
}

.tour-progress-fill {
  height: 100%;
  background: #6366f1;
  transition: width 0.3s ease;
  border-radius: 2px;
}

.tour-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  position: relative;
  z-index: 99999 !important;
  flex-wrap: nowrap;
  align-items: center;
  min-height: 40px;
}

.tour-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  z-index: 99999 !important;
  white-space: nowrap;
  min-width: auto;
  display: inline-block;
  visibility: visible !important;
}

.tour-btn-primary {
  background: #6366f1;
  color: white;
}

.tour-btn-primary:hover {
  background: #4f46e5;
  transform: translateY(-1px);
}

.tour-btn-secondary {
  background: #f0f0f0;
  color: #333;
}

.tour-btn-secondary:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}
