/* Enhanced Repository Styles - Modern GitHub-like Design */

/* Repository Header Improvements */
.repository .header-wrapper {
  background: linear-gradient(to bottom, #ffffff 0%, #fafbfc 100%);
  border-bottom: 2px solid #fd5f1c;
  box-shadow: 0 2px 6px rgba(253, 95, 28, 0.1);
  margin-top: -15px;
  padding-top: 15px;
  padding-bottom: 0;
}

.repository .head .ui.huge.breadcrumb {
  font-weight: 600;
  font-size: 1.7rem;
  color: #24292e;
}

.repository .head .mega-octicon {
  width: 30px;
  font-size: 30px;
  color: #586069;
  transition: color 0.2s ease;
}

.repository .head .mega-octicon:hover {
  color: #0366d6;
}

/* Repository Navigation Tabs */
.repository .header-wrapper .ui.tabular.menu {
  border: none;
  background: transparent;
}

.repository .header-wrapper .ui.tabular.menu .item {
  border: none;
  border-radius: 6px;
  padding: 12px 16px;
  margin-right: 8px;
  color: #586069;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.repository .header-wrapper .ui.tabular.menu .item:hover {
  background: #f1f3f5;
  color: #24292e;
}

.repository .header-wrapper .ui.tabular.menu .item.active {
  background: #f1f3f5;
  color: #24292e;
  font-weight: 600;
}

.repository .header-wrapper .ui.tabular.menu .item.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #fd5f1c;
  border-radius: 2px 2px 0 0;
}

.repository .header-wrapper .ui.tabular.menu .item .octicon {
  margin-right: 6px;
  font-size: 16px;
}

.repository .header-wrapper .ui.tabular.menu .item .label {
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  background: #e1e4e8;
  color: #586069;
}

/* Repository File List */
.repository .file-list .item {
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  background: #fff;
}

.repository .file-list .item:hover {
  background: #f6f8fa;
  border-color: #fd5f1c;
  box-shadow: 0 2px 8px rgba(253, 95, 28, 0.15);
}

.repository .file-list .item .octicon {
  color: #586069;
  margin-right: 8px;
}

.repository .file-list .item .octicon.octicon-file-directory {
  color: #fd5f1c;
}

.repository .file-list .item .octicon.octicon-file {
  color: #586069;
}

/* Repository README */
.repository .readme {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 32px;
  margin-top: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.repository .readme .header {
  background: #f6f8fa;
  border-bottom: 1px solid #e1e4e8;
  padding: 12px 16px;
  margin: -32px -32px 24px -32px;
  border-radius: 6px 6px 0 0;
  font-weight: 600;
  color: #24292e;
}

.repository .readme .markdown-body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #24292e;
}

.repository .readme .markdown-body h1,
.repository .readme .markdown-body h2 {
  border-bottom: 1px solid #eaecef;
  padding-bottom: 0.3em;
  font-weight: 600;
}

.repository .readme .markdown-body code {
  background: #f6f8fa;
  border-radius: 6px;
  padding: 0.2em 0.4em;
  font-size: 14px;
}

.repository .readme .markdown-body pre {
  background: #f6f8fa;
  border-radius: 6px;
  padding: 16px;
  overflow: auto;
}

.repository .readme .markdown-body pre code {
  background: transparent;
  padding: 0;
}

/* Repository Clone URL Box */
.repository .clone-url {
  background: #f6f8fa;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 16px;
  margin: 16px 0;
}

.repository .clone-url .ui.input input {
  background: #fff;
  border: 1px solid #d1d5da;
  border-radius: 6px;
  padding: 8px 12px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
}

.repository .clone-url .ui.input input:focus {
  border-color: #fd5f1c;
  box-shadow: 0 0 0 3px rgba(253, 95, 28, 0.1);
}

/* Repository Buttons */
.repository .ui.primary.button {
  background: linear-gradient(135deg, #fd5f1c 0%, #ff8c42 100%);
  border: none;
  border-radius: 6px;
  padding: 10px 20px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.repository .ui.primary.button:hover {
  background: linear-gradient(135deg, #e8550f 0%, #fd5f1c 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(253, 95, 28, 0.25);
}

.repository .ui.primary.button:active {
  transform: translateY(0);
}

/* Repository Commits */
.repository .commits .commit-item {
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  transition: all 0.2s ease;
}

.repository .commits .commit-item:hover {
  background: #f6f8fa;
  border-color: #fd5f1c;
  box-shadow: 0 2px 8px rgba(253, 95, 28, 0.15);
}

.repository .commits .commit-item .commit-sha {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
  color: #fd5f1c;
  font-weight: 600;
}

.repository .commits .commit-item .commit-message {
  font-size: 16px;
  font-weight: 600;
  color: #24292e;
  margin: 8px 0;
}

.repository .commits .commit-item .commit-meta {
  font-size: 14px;
  color: #586069;
}

/* Repository Issues */
.repository .issues .issue-item {
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 12px;
}

.repository .issues .issue-item:hover {
  background: #f6f8fa;
  border-color: #fd5f1c;
  box-shadow: 0 2px 8px rgba(253, 95, 28, 0.15);
}

.repository .issues .issue-item .issue-icon {
  font-size: 20px;
  color: #28a745;
}

.repository .issues .issue-item .issue-icon.closed {
  color: #cb2431;
}

.repository .issues .issue-item .issue-title {
  font-size: 16px;
  font-weight: 600;
  color: #24292e;
  flex: 1;
}

.repository .issues .issue-item .issue-number {
  font-size: 14px;
  color: #586069;
}

/* Repository Branches */
.repository .branches .branch-item {
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 12px;
  background: #fff;
  transition: all 0.2s ease;
}

.repository .branches .branch-item:hover {
  background: #f6f8fa;
  border-color: #fd5f1c;
  box-shadow: 0 2px 8px rgba(253, 95, 28, 0.15);
}

.repository .branches .branch-item .branch-name {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 14px;
  color: #0366d6;
  font-weight: 600;
}

/* Repository Releases */
.repository .releases .release-item {
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 20px;
  margin-bottom: 16px;
  background: #fff;
  transition: all 0.2s ease;
}

.repository .releases .release-item:hover {
  background: #f6f8fa;
  border-color: #0366d6;
  box-shadow: 0 2px 8px rgba(3, 102, 214, 0.1);
}

.repository .releases .release-item .release-tag {
  display: inline-block;
  background: linear-gradient(135deg, #fd5f1c 0%, #ff8c42 100%);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Repository Wiki */
.repository .wiki .wiki-content {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 32px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Repository Settings */
.repository .settings .settings-section {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.repository .settings .settings-section h3 {
  font-size: 1.25em;
  font-weight: 600;
  color: #24292e;
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #e1e4e8;
}

/* Repository Cards (for explore page) */
.repo-card {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 20px;
  transition: all 0.2s ease;
  margin-bottom: 16px;
}

.repo-card:hover {
  border-color: #fd5f1c;
  box-shadow: 0 4px 12px rgba(253, 95, 28, 0.2);
  transform: translateY(-2px);
}

.repo-card .repo-name {
  font-size: 1.2em;
  font-weight: 600;
  color: #fd5f1c;
  margin: 0 0 8px 0;
}

.repo-card .repo-description {
  color: #586069;
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 12px 0;
}

.repo-card .repo-meta {
  display: flex;
  gap: 16px;
  font-size: 14px;
  color: #586069;
}

.repo-card .repo-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.repo-card .repo-meta .meta-item .octicon {
  font-size: 16px;
}

.repo-card .repo-meta .meta-item .language-color {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

/* Dashboard Improvements */
.dashboard .dashboard-card {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 24px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.dashboard .dashboard-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dashboard .dashboard-card h3 {
  font-size: 1.25em;
  font-weight: 600;
  color: #24292e;
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #e1e4e8;
}

/* Activity Feed */
.dashboard .activity-feed .feed-item {
  border-left: 2px solid #e1e4e8;
  padding: 16px 16px 16px 24px;
  margin-bottom: 12px;
  position: relative;
  transition: all 0.2s ease;
}

.dashboard .activity-feed .feed-item:hover {
  border-left-color: #0366d6;
  background: #f6f8fa;
  border-radius: 6px;
}

.dashboard .activity-feed .feed-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 20px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e1e4e8;
  border: 2px solid #fff;
}

.dashboard .activity-feed .feed-item:hover::before {
  background: #0366d6;
}

/* User Profile */
.user-profile .profile-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 6px;
  padding: 32px;
  color: #fff;
  margin-bottom: 24px;
}

.user-profile .profile-header .avatar {
  border: 4px solid #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.user-profile .profile-header .user-info h1 {
  font-size: 2em;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.user-profile .profile-header .user-info p {
  font-size: 1.1em;
  opacity: 0.9;
  margin: 0;
}

/* Explore Page */
.explore-page .explore-card {
  background: #fff;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 20px;
  transition: all 0.3s ease;
  height: 100%;
}

.explore-page .explore-card:hover {
  border-color: #0366d6;
  box-shadow: 0 4px 12px rgba(3, 102, 214, 0.15);
  transform: translateY(-4px);
}

.explore-page .explore-card .card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.explore-page .explore-card .card-icon .octicon {
  font-size: 28px;
  color: #fff;
}

/* Notifications and Badges */
.notification-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: #cb2431;
  color: #fff;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}

/* Loading States */
.loading-skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  background: #f6f8fa;
  border: 1px dashed #d1d5da;
  border-radius: 6px;
}

.empty-state .octicon {
  font-size: 64px;
  color: #959da5;
  margin-bottom: 16px;
}

.empty-state h3 {
  font-size: 1.5em;
  font-weight: 600;
  color: #24292e;
  margin: 0 0 8px 0;
}

.empty-state p {
  color: #586069;
  font-size: 16px;
  margin: 0 0 24px 0;
}

/* Tooltip Improvements */
.tooltip {
  position: relative;
}

.tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #24292e;
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.tooltip:hover::after {
  opacity: 1;
}

/* Responsive Improvements */
@media (max-width: 768px) {
  .repository .header-wrapper .ui.tabular.menu .item {
    padding: 10px 12px;
    margin-right: 4px;
    font-size: 14px;
  }
  
  .repo-card {
    padding: 16px;
  }
  
  .repo-card .repo-meta {
    flex-wrap: wrap;
    gap: 12px;
  }
}

/* Dark Mode Support (Optional) */
@media (prefers-color-scheme: dark) {
  /* Can be expanded for dark mode support in the future */
}

/* RTL Support for Persian/Farsi */
[dir="rtl"] .repository .header-wrapper .ui.tabular.menu .item {
  margin-right: 0;
  margin-left: 8px;
}

[dir="rtl"] .repo-card .repo-meta {
  direction: rtl;
}

[dir="rtl"] .dashboard .activity-feed .feed-item {
  border-left: none;
  border-right: 2px solid #e1e4e8;
  padding: 16px 24px 16px 16px;
}

[dir="rtl"] .dashboard .activity-feed .feed-item:hover {
  border-right-color: #0366d6;
}
