/* K&P Service-Tools Platform Landing Page Styles - Dark Mode */
:root {
  --primary-color: #2196F3;
  --secondary-color: #4CAF50;
  --accent-color: #FF9800;
  --text-primary: #E0E0E0;
  --text-secondary: #B0B0B0;
  --background-dark: #0a0a0a;
  --background-darker: #121212;
  --background-card: #1e1e1e;
  --background-light: #1a1a1a;
  --background-white: #252525;
  --border-color: #2a2a2a;
  --shadow: 0 2px 10px rgba(0,0,0,0.5);
  --shadow-hover: 0 8px 25px rgba(0,0,0,0.7);
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --gradient-card: linear-gradient(145deg, #1e1e1e, #2a2a2a);
  --transition: all 0.3s ease;
}

/* Base Styles Override for Landing Page */
body.animated-background {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--background-darker);
  overflow-x: hidden;
}

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

/* Header Styles */
.main-header {
  background: rgba(37, 37, 37, 0.95);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  margin-bottom: 0;
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-section h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.version {
  background: var(--accent-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(255, 152, 0, 0.3);
}

.main-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 1rem;
  border-radius: 6px;
  position: relative;
}

.nav-link:hover {
  color: var(--primary-color);
  background: rgba(33, 150, 243, 0.1);
}

.nav-link.admin-link {
  background: var(--primary-color);
  color: white;
}

.nav-link.admin-link:hover {
  background: #1976D2;
}

.nav-link.github-link {
  font-size: 1.2rem;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(-45deg, #2196F3, #4CAF50, #1976D2, #2E7D32);
  background-size: 400% 400%;
  animation: gradientShift 60s ease infinite;
  color: white;
  padding: 1rem 0 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h2 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  font-weight: 300;
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 3rem;
  opacity: 0.95;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  max-width: 600px;
  margin: 0 auto 3rem;
  padding: 2rem 0;
}

.stat {
  text-align: center;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Hero CTA */
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Button Styles */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(33, 150, 243, 0.3);
}

.btn-primary:hover {
  background: #1976D2;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(33, 150, 243, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.btn-large {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

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

.btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Tools Section */
.tools-section {
  padding: 4rem 0;
  background: var(--background-dark);
  margin-top: 0;
}

.tools-section h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 300;
}

.section-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
  margin-top: 0rem;
}

/* Tool Cards */
.tool-card {
  background: var(--background-card);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.tool-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.tool-card:hover::before {
  transform: scaleX(1);
}

.tool-card.featured {
  border: 2px solid var(--primary-color);
  position: relative;
}

.tool-card.featured::after {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  bottom: -1px;
  background: var(--gradient-primary);
  border-radius: 16px;
  z-index: -1;
  opacity: 0.1;
}

.tool-card.new {
  position: relative;
}

.tool-card.new::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  border-style: solid;
  border-width: 0 60px 60px 0;
  border-color: transparent var(--accent-color) transparent transparent;
}

.tool-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(33, 150, 243, 0.3);
}

.new-badge {
  position: absolute;
  top: 12px;
  right: 8px;
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  transform: rotate(45deg);
  z-index: 1;
}

.tool-icon {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: white;
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.tool-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--text-primary);
  font-weight: 600;
}

.tool-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  text-align: center;
}

.tool-features {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  justify-content: center;
}

.feature {
  background: var(--background-darker);
  color: var(--text-secondary);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.feature:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.tool-stats {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  justify-content: center;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.tool-stats .stat {
  text-align: center;
  background: none;
  padding: 0;
  border-radius: 0;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  border: none;
}

.tool-stats .stat-value {
  display: block;
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.tool-stats .stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tool-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Quick Start Section */
.quick-start {
  padding: 6rem 0;
  background: var(--background-darker);
}

.quick-start h2 {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 300;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
}

.step {
  text-align: center;
  padding: 2rem;
  border-radius: 12px;
  transition: var(--transition);
  position: relative;
}

.step:hover {
  transform: translateY(-5px);
}

.step-number {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: bold;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
  position: relative;
}

.step-number::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--gradient-primary);
  opacity: 0.3;
  transform: scale(1.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1.2); opacity: 0.3; }
  50% { transform: scale(1.4); opacity: 0.1; }
  100% { transform: scale(1.2); opacity: 0.3; }
}

.step h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.step p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.step-links {
  margin-top: 1rem;
}

.step-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid var(--primary-color);
  border-radius: 6px;
  transition: var(--transition);
}

.step-link:hover {
  background: var(--primary-color);
  color: white;
}

/* About Section */
.about-section {
  padding: 3rem 0;
  background: var(--background-dark);
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: start;
}

.about-text h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--text-primary);
  font-weight: 300;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.features-list {
  display: grid;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.feature-item {
  display: flex;
  gap: 1rem;
  align-items: start;
}

.feature-item i {
  color: var(--secondary-color);
  font-size: 1.5rem;
  margin-top: 0.25rem;
}

.feature-item h4 {
  margin: 0 0 0.5rem 0;
  color: var(--text-primary);
  font-weight: 600;
}

.feature-item p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}

.version-info {
  background: var(--background-card);
  padding: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.version-info p {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.version-info p:last-child {
  margin-bottom: 0;
}

.about-stats {
  display: grid;
  gap: 2rem;
}

.stat-card {
  background: var(--background-card);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.stat-card .stat-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.5rem;
}

.stat-card h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.stat-card .stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  display: block;
  margin-bottom: 0.5rem;
}

.stat-card .stat-description {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.modal:not(.hidden) {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--background-card);
  border-radius: 12px;
  max-width: 600px;
  max-height: 80vh;
  width: 90%;
  overflow-y: auto;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.modal:not(.hidden) .modal-content {
  transform: scale(1);
}

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

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 2rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--background-darker);
  color: var(--text-primary);
}

.modal-body {
  padding: 2rem;
}

/* Footer */
.main-footer {
  background: var(--background-darker);
  color: white;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color);
}

.footer-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-content p {
  margin: 0;
  font-size: 0.85rem;
  color: #B0B0B0;
}

.footer-content a {
  color: #B0B0B0;
  text-decoration: none;
  transition: var(--transition);
}

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

.footer-copyright {
  font-size: 0.8rem !important;
  opacity: 0.8;
}

/* NoScript Message */
.noscript-message {
  background: var(--background-card);
  padding: 4rem 2rem;
  text-align: center;
  border: 2px solid var(--accent-color);
  margin: 2rem;
  border-radius: 12px;
}

.noscript-message h2 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.noscript-message ul {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0;
}

.noscript-message li {
  margin-bottom: 0.5rem;
}

.noscript-message a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.noscript-message a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
  .main-header .container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .main-nav {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .hero h2 {
    font-size: 2.5rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .tools-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
  }
  
  .tool-actions {
    flex-direction: column;
  }
  
  .hero-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .steps-grid {
    grid-template-columns: 1fr;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about-stats {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .container {
    padding: 0 1rem;
  }
  
  .modal-content {
    margin: 1rem;
    width: calc(100% - 2rem);
  }
  
  .modal-header,
  .modal-body {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 4rem 0 3rem;
  }
  
  .hero h2 {
    font-size: 2rem;
  }
  
  .tools-section,
  .quick-start,
  .about-section {
    padding: 4rem 0;
  }
  
  .tools-section h2,
  .quick-start h2,
  .about-text h2 {
    font-size: 2rem;
  }
  
  .tool-card {
    padding: 2rem 1.5rem;
  }
  
  .step {
    padding: 1.5rem;
  }
  
  .main-footer {
    padding: 3rem 0 1.5rem;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --text-secondary: #000000;
    --border-color: #666666;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .step-number::before {
    animation: none;
  }
}