/* KOLLERSI STYLE */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #000;
  color: #fff;
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 20px;
}

/* NAVIGATION */
.nav {
  margin-bottom: 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-link {
  color: #ccc;
  text-decoration: none;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
  font-size: 18px;
}

.admin-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-item {
  color: #fff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  padding-bottom: 8px;
  transition: border-color 0.2s ease;
}

.nav-item.active,
.nav-item:hover {
  border-bottom-color: #fff;
}

/* THEME TOGGLE */
.theme-toggle {
  background: transparent;
  border: 1px solid #333;
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
  transition: all 0.2s ease;
}

.theme-toggle:hover {
  background: #1a1a1a;
  border-color: #555;
}

/* SEARCH */
.search-box {
  margin-bottom: 40px;
  display: flex;
  justify-content: center;
  position: relative;
}

.search-container {
  position: relative;
  width: 100%;
  max-width: 600px;
}

#search {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: #fff;
  font-size: 16px;
  padding: 18px 24px;
  outline: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(20px);
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  text-align: center;
}

#search:focus {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.6);
  box-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 0 0 4px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

#search::placeholder {
  color: #aaa;
  font-weight: 400;
  transition: opacity 0.3s ease;
}

#search:focus::placeholder {
  opacity: 0.7;
}

/* Search loading animation */
.search-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: 16px;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.1), 
    transparent
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

#search:focus ~ .search-container::after {
  opacity: 1;
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* SOFTWARE GRID */
.software-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 32px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .search-container {
    max-width: 90%;
  }
  
  #search {
    font-size: 16px;
    padding: 16px 20px;
  }
  
  .software-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 24px;
  }
}

@media (max-width: 480px) {
  .search-container {
    max-width: 100%;
  }
  
  #search {
    font-size: 16px;
    padding: 14px 18px;
    border-radius: 12px;
  }
  
  .software-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.software-item {
  background: #111;
  border: 1px solid #222;
  padding: 24px;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

.software-item:hover {
  background: #1a1a1a;
  border-color: #555;
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.software-item-icon {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  margin-bottom: 16px;
  object-fit: cover;
  border: 1px solid #333;
  transition: transform 0.3s ease;
}

.software-item:hover .software-item-icon {
  transform: scale(1.1);
}

.software-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
  line-height: 1.3;
}

.software-category {
  background: linear-gradient(135deg, #333 0%, #222 100%);
  color: #ccc;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
  border: 1px solid #444;
}

/* EMPTY STATE */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #666;
}

.empty-icon {
  font-size: 64px;
  margin-bottom: 24px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 24px;
  margin-bottom: 16px;
  color: #888;
}

.empty-state p {
  font-size: 16px;
  opacity: 0.7;
}



/* LIGHT THEME */
body.light-theme {
  background: #fff;
  color: #333;
}

body.light-theme .nav-item {
  color: #333;
}

body.light-theme .nav-item.active,
body.light-theme .nav-item:hover {
  border-bottom-color: #333;
}

body.light-theme .theme-toggle {
  border-color: #ddd;
  color: #333;
}

body.light-theme .theme-toggle:hover {
  background: #f5f5f5;
  border-color: #bbb;
}

body.light-theme #search {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(0, 0, 0, 0.1);
  color: #333;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.08),
    0 1px 3px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.light-theme #search:focus {
  border-color: rgba(0, 123, 255, 0.3);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 0 0 4px rgba(0, 123, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 1);
}

body.light-theme #search::placeholder {
  color: #999;
}

body.light-theme .software-item {
  background: #f9f9f9;
  border-color: #eee;
  color: #333;
}

body.light-theme .software-item:hover {
  background: #f0f0f0;
  border-color: #bbb;
  transform: translateY(-2px);
}

body.light-theme .software-item-icon {
  border-color: #ddd;
}

body.light-theme .software-name {
  color: #333;
}



body.light-theme .software-category {
  background: #eee;
  color: #666;
}

/* LIGHT THEME - EMPTY STATE */
body.light-theme .empty-state {
  color: #999;
}

body.light-theme .empty-state h3 {
  color: #666;
}

body.light-theme .empty-state p {
  color: #777;
}



/* MODAL STYLES */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.modal-content {
  background: #1e1e1e;
  margin: 5% auto;
  padding: 0;
  border: 1px solid #404040;
  width: 90%;
  max-width: 800px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid #404040;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #252525;
}

.modal-header h2 {
  margin: 0;
  color: #f5f5f5;
  font-size: 24px;
}

.close-btn {
  background: none;
  border: none;
  color: #bbb;
  font-size: 28px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.close-btn:hover {
  color: #fff;
}

.modal-body {
  padding: 24px;
  background: #1e1e1e;
  color: #e0e0e0;
}

/* POWERSHELL COMMAND WRAPPER */
.powershell-wrapper {
  width: 100%;
  margin-top: 12px;
}

.powershell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 10px;
  color: #bbb;
}

.powershell-os {
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.powershell-icon {
  font-size: 12px;
}

.powershell-section {
  padding: 8px;
  background: #2a2a2a;
  border: 1px solid #555;
  border-radius: 3px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.command-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

.command-line code {
  flex: 1;
  color: #4fc3f7;
  font-size: 11px;
  font-weight: bold;
  background: none;
  user-select: all;
}

.copy-btn {
  background: transparent;
  border: 1px solid #777;
  color: #ddd;
  padding: 3px 6px;
  border-radius: 2px;
  cursor: pointer;
  font-size: 10px;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn svg {
  fill: currentColor;
  transition: all 0.2s ease;
  width: 14px;
  height: 14px;
}

.copy-btn:hover {
  background: #555;
  color: #fff;
  border-color: #999;
}

.copy-btn:hover svg {
  fill: #fff;
}

.copy-btn.copied {
  background: #28a745;
  border-color: #28a745;
  color: #fff;
}

.copy-btn.copied svg {
  fill: #fff;
}

.software-info {
  display: flex;
  gap: 24px;
  margin-bottom: 32px;
}

.software-icon {
  width: 80px;
  height: 80px;
  border-radius: 8px;
  object-fit: cover;
}

.software-details-full {
  flex: 1;
}

.software-details-full p {
  color: #d0d0d0;
  margin-bottom: 16px;
  line-height: 1.6;
}

.software-meta {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.meta-item {
  color: #b0b0b0;
  font-size: 14px;
}

.meta-item strong {
  color: #e0e0e0;
}

.meta-item {
  color: #999;
  font-size: 14px;
}

.meta-item strong {
  color: #fff;
}



.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #404040;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  background: #252525;
}

.download-btn-modal {
  background: #f5f5f5;
  color: #1a1a1a;
  border: none;
  padding: 12px 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.download-btn-modal:hover {
  background: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

.website-link {
  color: #9bb5ff;
  text-decoration: none;
  font-size: 14px;
  transition: color 0.2s ease;
  font-weight: 500;
}

.website-link:hover {
  color: #bfcfff;
  text-decoration: underline;
}

/* LIGHT THEME MODAL - Improved brightness and contrast */
body.light-theme .modal-content {
  background: #ffffff;
  border: 1px solid #dee2e6;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.06);
  border-radius: 12px;
}

body.light-theme .modal-header {
  border-bottom: 1px solid #e9ecef;
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 12px 12px 0 0;
  padding: 20px 24px;
}

body.light-theme .modal-body {
  background: #ffffff;
  color: #212529;
  padding: 24px;
}

body.light-theme .modal-header h2 {
  color: #212529;
  font-weight: 600;
  font-size: 1.25rem;
}

body.light-theme .modal-footer {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-top: 1px solid #e9ecef;
  border-radius: 0 0 12px 12px;
  padding: 20px 24px;
}

body.light-theme .download-btn-modal {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: #ffffff;
  border: 1px solid #007bff;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
  transition: all 0.3s ease;
}

body.light-theme .download-btn-modal:hover {
  background: linear-gradient(135deg, #0056b3 0%, #004085 100%);
  border-color: #0056b3;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 123, 255, 0.4);
}

body.light-theme .website-link {
  color: #007bff;
  font-weight: 500;
}

body.light-theme .website-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

body.light-theme .close-btn {
  color: #6c757d;
  font-size: 24px;
  transition: all 0.2s ease;
}

body.light-theme .close-btn:hover {
  color: #dc3545;
  transform: scale(1.1);
}

/* Light theme code section */
body.light-theme .modal-body .code {
  background: linear-gradient(135deg, #f1f3f4 0%, #ffffff 100%);
  color: #1565c0;
  border: 1px solid #e1e5e9;
  padding: 20px;
  border-radius: 8px;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.6;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
  margin: 16px 0;
}

body.light-theme .software-details-full p {
  color: #555;
}

body.light-theme .meta-item {
  color: #666;
}

body.light-theme .meta-item strong {
  color: #1a1a1a;
}

body.light-theme .modal-footer {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border-top: 1px solid #e9ecef;
  border-radius: 0 0 12px 12px;
  padding: 20px 24px;
}

body.light-theme .download-btn-modal {
  background: #007bff;
  color: #fff;
  box-shadow: 0 2px 4px rgba(0, 123, 255, 0.3);
}

body.light-theme .download-btn-modal:hover {
  background: #0056b3;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.4);
}

body.light-theme .website-link {
  color: #007bff;
}

body.light-theme .website-link:hover {
  color: #0056b3;
  text-decoration: underline;
}

body.light-theme .admin-link {
  color: #666;
}

body.light-theme .admin-link:hover {
  color: #333;
  background: rgba(0, 0, 0, 0.1);
}

/* LIGHT THEME - POWERSHELL WRAPPER */
body.light-theme .powershell-header {
  color: #6c757d;
}

body.light-theme .powershell-section {
  background: #f8f9fa;
  border-color: #dee2e6;
}

body.light-theme .command-line code {
  color: #0d47a1;
  font-weight: bold;
}

body.light-theme .copy-btn {
  border-color: #ced4da;
  color: #495057;
  background: #ffffff;
}

body.light-theme .copy-btn svg {
  fill: #495057;
}

body.light-theme .copy-btn:hover {
  background: #e9ecef;
  color: #007bff;
  border-color: #007bff;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.25);
}

body.light-theme .copy-btn:hover svg {
  fill: #007bff;
}

/* SOFTWARE TABLE */
.software-list {
  margin-bottom: 30px;
}

table {
  width: 100%;
  border: 1px solid var(--border);
}

th, td {
  padding: 8px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

th {
  background: #f0f0f0;
  font-weight: bold;
}

tr:nth-child(odd) {
  background: var(--table-odd);
}

tr:hover {
  background: #e8f4f8;
}

.download-link {
  background: var(--button);
  color: white;
  padding: 4px 8px;
  text-decoration: none;
  font-size: 12px;
  border-radius: 2px;
}

.download-link:hover {
  background: var(--button-hover);
  color: white;
}

.category-tag {
  background: #eee;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 11px;
  text-transform: uppercase;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 20px;
  border-top: 1px solid var(--border);
  margin-top: 30px;
  font-size: 12px;
  color: #666;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  main {
    padding: 10px;
  }
  
  #search {
    width: 200px;
  }
  
  .cat-link {
    display: block;
    margin: 2px 0;
  }
  
  table {
    font-size: 12px;
  }
  
  th, td {
    padding: 4px;
  }
}