/* Main CSS for Kingslayer Dark Theme */
:root {
  --background-color: #121212;
  --surface-color: #1e1e1e;
  --primary-color: #bb86fc;
  --secondary-color: #03dac6;
  --error-color: #cf6679;
  --text-color: #ffffff;
  --text-secondary-color: #b0b0b0;
  --hover-color: #cf6679;
  --card-background: rgba(30, 30, 30, 0.95);
  --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

html, body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  scroll-behavior: smooth;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

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

.site-header {
  padding: 20px 0;
  text-align: center;
  background-color: var(--surface-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  position: relative;
}

.site-logo {
  max-width: 200px;
  height: auto;
}

.site-title {
  margin: 10px 0;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.site-description {
  font-size: 1rem;
  color: var(--text-secondary-color);
  max-width: 700px;
  margin: 0 auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Hero section */
.hero {
  position: relative;
  height: 60vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--surface-color);
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px;
  background-color: rgba(18, 18, 18, 0.9);
  border-radius: 15px;
  max-width: 900px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(187, 134, 252, 0.2);
}

.hero-logo {
  width: 120px;
  height: auto;
  margin-bottom: 20px;
  filter: drop-shadow(0 0 10px rgba(187, 134, 252, 0.5));
}

.hero-title {
  font-size: 3.5rem;
  margin-bottom: 15px;
  color: var(--primary-color);
  text-shadow: 0 0 20px rgba(187, 134, 252, 0.5);
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 30px;
  color: var(--text-secondary-color);
}

.hero-stats {
  display: flex;
  justify-content: space-around;
  gap: 30px;
  margin-top: 30px;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--secondary-color);
  text-shadow: 0 0 10px rgba(3, 218, 198, 0.5);
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: var(--text-secondary-color);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 5px;
}

/* Search Section */
.search-section {
  padding: 40px 0;
  background-color: var(--surface-color);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.search-bar {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 15px 50px 15px 20px;
  background-color: var(--background-color);
  border: 2px solid rgba(187, 134, 252, 0.3);
  border-radius: 25px;
  color: var(--text-color);
  font-size: 1.1rem;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 20px rgba(187, 134, 252, 0.3);
}

.search-input::placeholder {
  color: var(--text-secondary-color);
}

.search-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  color: var(--text-secondary-color);
}

/* Services Grid */
.services {
  padding: 80px 0;
}

.wan-services {
  background-color: var(--background-color);
}

.lan-services {
  background-color: var(--surface-color);
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.5rem;
  color: var(--primary-color);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
}

.title-icon {
  font-size: 2rem;
}

.service-count {
  font-size: 1rem;
  color: var(--text-secondary-color);
  font-weight: normal;
}

.section-title:after {
  content: '';
  display: block;
  width: 100px;
  height: 4px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  margin: 15px auto;
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.service-card {
  background-color: var(--card-background);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: all 0.3s ease;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  border-color: var(--primary-color);
}

.service-card.current-site {
  border-color: var(--secondary-color);
  box-shadow: 0 0 20px rgba(3, 218, 198, 0.3);
}

.service-status-indicator {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #666;
  z-index: 2;
  border: 2px solid rgba(255, 255, 255, 0.2);
}

.service-status-indicator.online {
  background-color: #00ff88;
  box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
  animation: pulse 2s infinite;
}

.service-status-indicator.offline {
  background-color: #ff4757;
  box-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 255, 136, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 255, 136, 0);
  }
}

.service-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.service-card-content {
  padding: 25px;
}

.service-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
  flex-wrap: wrap;
}

.service-card-title {
  font-size: 1.4rem;
  margin: 0;
  color: var(--primary-color);
  flex: 1;
}

.service-tag {
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.service-tag.wan {
  background-color: rgba(187, 134, 252, 0.2);
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
}

.service-tag.lan {
  background-color: rgba(3, 218, 198, 0.2);
  color: var(--secondary-color);
  border: 1px solid var(--secondary-color);
}

.service-tag.current {
  background-color: rgba(207, 102, 121, 0.2);
  color: var(--hover-color);
  border: 1px solid var(--hover-color);
  animation: glow 2s infinite;
}

.service-card-description {
  color: var(--text-secondary-color);
  margin-bottom: 20px;
  line-height: 1.6;
  font-size: 0.95rem;
}

.service-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.service-card-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background-color: var(--primary-color);
  color: var(--background-color);
  border-radius: 8px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  text-decoration: none;
}

.service-card-link:hover {
  background-color: var(--hover-color);
  color: var(--background-color);
  transform: scale(1.05);
}

.service-card-link.disabled {
  background-color: #666;
  cursor: not-allowed;
}

.external-icon {
  font-size: 1rem;
}

/* Service Image Container with Rotation */
.service-card-screenshot {
  position: relative;
  height: 200px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(135deg, #2d2d2d, #1a1a1a);
}

.service-placeholder {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.service-placeholder-icon {
  max-width: 80px !important;
  max-height: 80px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Image rotation for services with multiple icons */
.service-card[data-service] .service-placeholder {
  position: relative;
}

.service-card[data-service] .service-placeholder-icon {
  position: absolute;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.service-card[data-service] .service-placeholder-icon.active {
  opacity: 1;
}

/* Service icon in header */
.service-icon {
  width: 24px !important;
  height: 24px !important;
  object-fit: contain;
  margin-right: 8px;
}

/* Fix for oversized images */
.service-card img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

/* GitHub Links Section */
.github-section {
  background: #1a1a1a;
  padding: 3rem 0;
  border-top: 1px solid #333;
}

.github-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.github-link {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  background: #2d2d2d;
  border-radius: 12px;
  text-decoration: none;
  color: #e0e0e0;
  transition: all 0.3s ease;
  border: 1px solid #444;
}

.github-link:hover {
  background: #333;
  border-color: #4a9eff;
  transform: translateY(-2px);
  color: #4a9eff;
}

.github-icon {
  width: 32px;
  height: 32px;
  margin-right: 12px;
  filter: invert(1);
  transition: filter 0.3s ease;
}

.github-link:hover .github-icon {
  filter: invert(0.4) sepia(1) saturate(5) hue-rotate(200deg);
}

.github-info h3 {
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.github-info p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* Stats Section */
.stats-section {
  padding: 60px 0;
  background-color: var(--surface-color);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.stat-card {
  background-color: var(--card-background);
  padding: 30px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.stat-card h3 {
  color: var(--primary-color);
  margin-bottom: 20px;
  font-size: 1.4rem;
  text-align: center;
}

.stat-details p {
  margin-bottom: 10px;
  color: var(--text-secondary-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-details strong {
  color: var(--text-color);
}

.quick-action {
  display: inline-block;
  padding: 8px 16px;
  background-color: var(--primary-color);
  color: var(--background-color);
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  margin: 5px 5px 5px 0;
  transition: all 0.3s ease;
}

.quick-action:hover {
  background-color: var(--hover-color);
  color: var(--background-color);
  transform: scale(1.05);
}

/* Footer */
.site-footer {
  background-color: var(--surface-color);
  padding: 40px 0;
  margin-top: 80px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-logo {
  max-width: 120px;
}

.footer-nav {
  display: flex;
  list-style: none;
  padding: 0;
}

.footer-nav li {
  margin-left: 20px;
}

.footer-nav a {
  color: var(--text-secondary-color);
}

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

.copyright {
  width: 100%;
  text-align: center;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-secondary-color);
}

/* Hidden class for search functionality */
.hidden {
  display: none !important;
}

/* Responsive design */
@media (max-width: 768px) {
  .site-title {
    font-size: 2rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 15px;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .section-title {
    font-size: 2rem;
    flex-direction: column;
    gap: 10px;
  }
  
  .service-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    flex-direction: column;
  }
  
  .footer-nav {
    margin-top: 20px;
  }
  
  .footer-nav li:first-child {
    margin-left: 0;
  }
}

/* Button hover effects */
.btn {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--hover-color);
  z-index: -2;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.btn:hover:after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Glowing effect */
@keyframes glow {
  0% {
    box-shadow: 0 0 5px var(--primary-color);
  }
  50% {
    box-shadow: 0 0 20px var(--primary-color), 0 0 30px var(--secondary-color);
  }
  100% {
    box-shadow: 0 0 5px var(--primary-color);
  }
}

.glow-effect {
  animation: glow 2s infinite;
}

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

.loading {
  animation: spin 1s linear infinite;
}

/* Dark theme toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background-color: var(--primary-color);
  color: var(--background-color);
  border: none;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  z-index: 1000;
}

.theme-toggle:hover {
  background-color: var(--hover-color);
  transform: scale(1.1);
}

/* Koenig Editor Required Classes */
.kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: auto calc(50% - 50vw);
  transform: translateX(calc(50vw - 50%));
}

.kg-width-full {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

/* Additional Koenig Editor Support */
.kg-card {
  margin: 1.5em 0;
}

.kg-embed-card {
  margin: 1.5em 0;
}

.kg-image {
  max-width: 100%;
  height: auto;
}

.kg-image-card {
  margin: 1.5em 0;
  text-align: center;
}

.kg-image-card .kg-image {
  border-radius: 8px;
}

.kg-image-card figcaption {
  margin-top: 10px;
  color: var(--text-secondary-color);
  font-size: 0.9rem;
  text-align: center;
}

.kg-gallery-card {
  margin: 1.5em 0;
}

.kg-gallery-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kg-gallery-row {
  display: flex;
  gap: 8px;
}

.kg-gallery-image {
  flex: 1;
  border-radius: 8px;
}

.kg-bookmark-card {
  margin: 1.5em 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--card-background);
}

.kg-bookmark-container {
  display: flex;
  color: var(--text-color);
  text-decoration: none;
}

.kg-bookmark-content {
  padding: 20px;
  flex: 1;
}

.kg-bookmark-title {
  color: var(--primary-color);
  font-weight: bold;
  margin-bottom: 8px;
}

.kg-bookmark-description {
  color: var(--text-secondary-color);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 8px;
}

.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary-color);
}

.kg-bookmark-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

.kg-bookmark-thumbnail {
  width: 120px;
  height: 120px;
  object-fit: cover;
}

.kg-code-card {
  margin: 1.5em 0;
  background-color: var(--surface-color);
  border-radius: 8px;
  overflow: hidden;
}

.kg-code-card pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  color: var(--text-color);
  background-color: transparent;
}

.kg-code-card code {
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Post content styling */
.post-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.post-header {
  margin-bottom: 40px;
  text-align: center;
}

.post-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.post-meta {
  color: var(--text-secondary-color);
  font-size: 0.9rem;
}

.post-tags a {
  color: var(--secondary-color);
  text-decoration: none;
  margin-right: 10px;
}

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

.post-feature-image {
  margin: 2em 0;
  border-radius: 12px;
  overflow: hidden;
}

.post-feature-image img {
  width: 100%;
  height: auto;
  display: block;
}

.post-body {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-color);
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
  color: var(--primary-color);
  margin-top: 2em;
  margin-bottom: 1em;
}

.post-body p {
  margin-bottom: 1.5em;
}

.post-body a {
  color: var(--secondary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.post-body a:hover {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.post-body blockquote {
  margin: 2em 0;
  padding: 1em 2em;
  border-left: 4px solid var(--primary-color);
  background-color: var(--surface-color);
  border-radius: 0 8px 8px 0;
  font-style: italic;
}

.post-body ul,
.post-body ol {
  margin-bottom: 1.5em;
  padding-left: 2em;
}

.post-body li {
  margin-bottom: 0.5em;
}

.post-footer {
  margin-top: 3em;
  padding-top: 2em;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.post-share {
  text-align: center;
  margin-bottom: 2em;
}

.post-share span {
  color: var(--text-secondary-color);
  margin-right: 1em;
}

.post-share a {
  color: var(--primary-color);
  text-decoration: none;
  margin: 0 10px;
  padding: 8px 16px;
  border: 1px solid var(--primary-color);
  border-radius: 6px;
  transition: all 0.3s ease;
}

.post-share a:hover {
  background-color: var(--primary-color);
  color: var(--background-color);
}

.comments-section {
  margin-top: 2em;
  padding: 2em;
  background-color: var(--surface-color);
  border-radius: 8px;
  text-align: center;
}

.comments-placeholder {
  color: var(--text-secondary-color);
  font-style: italic;
}

/* Page content styling */
.page-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.page-header {
  margin-bottom: 40px;
  text-align: center;
}

.page-title {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  line-height: 1.2;
}

.page-feature-image {
  margin: 2em 0;
  border-radius: 12px;
  overflow: hidden;
}

.page-feature-image img {
  width: 100%;
  height: auto;
  display: block;
}

.page-body {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-color);
}

.page-body h1,
.page-body h2,
.page-body h3,
.page-body h4,
.page-body h5,
.page-body h6 {
  color: var(--primary-color);
  margin-top: 2em;
  margin-bottom: 1em;
}

.page-body p {
  margin-bottom: 1.5em;
}

.page-body a {
  color: var(--secondary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}

.page-body a:hover {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}
