/* Modern responsive design for website repository */
@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600&display=swap');

:root {
  --primary: #4361ee;
  --secondary: #3a0ca3;
  --accent: #4cc9f0;
  --light: #f8f9fa;
  --dark: #212529;
  --success: #4ade80;
  --danger: #ef4444;
  --warning: #fbbf24;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Prompt', sans-serif;
  background: url('Background.png') no-repeat center center fixed;
  background-size: cover;
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

header {
  text-align: center;
  margin-bottom: 30px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

header h1 {
  margin-bottom: 20px;
}

.header-buttons {
  width: 100%;
  display: flex;
  justify-content: center;
}

/* Technology grouping styles */
.tech-group {
  margin-bottom: 40px;
}

.tech-heading {
  color: var(--secondary);
  font-size: 1.8rem;
  margin: 30px 0 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--light);
  display: flex;
  align-items: center;
}

.tech-heading i {
  margin-right: 10px;
  color: var(--primary);
}

h1 {
  color: var(--secondary);
  font-size: 2.5rem;
  margin-bottom: 15px;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.btn {
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 500;
  display: inline-block;
  border: none;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow);
  margin: 10px 5px;
}

.btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.9rem;
}

.btn-success {
  background: var(--success);
}

.btn-danger {
  background: var(--danger);
}

.btn-secondary {
  background: var(--secondary);
}

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

.card {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.card-header {
  padding: 20px;
  background: url('uploads/Backgrounddev.jpg') no-repeat center center;
  background-size: cover;
  text-align: center;
  position: relative;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.6);
  z-index: 1;
}

.icon-circle {
  width: 90px;
  height: 90px;
  background-color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  border: 3px solid white;
}

.card img {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  object-fit: contain;
  position: relative;
  z-index: 3;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: background-color 0.2s ease;
}

.card-body:hover {
  background-color: rgba(67, 97, 238, 0.05);
}

.card-body:hover h2 {
  color: var(--primary);
}

.card-body:after {
  content: '\f06e';
  font-family: 'Font Awesome 5 Free';
  font-weight: 900;
  position: absolute;
  top: 10px;
  right: 10px;
  color: var(--primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.card-body:hover:after {
  opacity: 0.7;
}

.card h2 {
  color: var(--secondary);
  margin-bottom: 10px;
  font-size: 1.4rem;
  text-align: center;
}

.card p {
  color: #6c757d;
  margin-bottom: 15px;
  text-align: center;
}

.website-description {
  margin: 10px 0 15px;
  padding: 10px;
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
  width: 100%;
}

.website-description p {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 0;
  line-height: 1.5;
  text-align: left;
  max-height: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.actions {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 15px;
  border-top: 1px solid #f1f1f1;
}

.actions a {
  color: #6c757d;
  text-decoration: none;
  transition: var(--transition);
  font-size: 0.9rem;
  text-align: center;
}

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

/* Form styles */
.form-container {
  background: white;
  max-width: 600px;
  margin: 0 auto;
  padding: 30px;
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark);
}

.form-control {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: 'Prompt', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.3);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
  line-height: 1.5;
}

/* Dropdown styling */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23464646' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 1em;
  padding-right: 2.5rem;
  cursor: pointer;
}

select.form-control:focus {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234361ee' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
}

select.form-control option {
  padding: 10px;
  font-family: 'Prompt', sans-serif;
}

.file-input {
  background: var(--light);
  padding: 10px;
  border-radius: 8px;
}

.alert {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  text-align: center;
}

.alert-success {
  background-color: rgba(74, 222, 128, 0.2);
  color: #166534;
}

.alert-danger {
  background-color: rgba(239, 68, 68, 0.2);
  color: #991b1b;
}

.alert-info {
  background-color: rgba(76, 201, 240, 0.2);
  color: #0c4a6e;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .btn {
    padding: 10px 20px;
  }
  
  .right-controls {
    margin-left: 0;
    margin-top: 10px;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .grid {
    grid-template-columns: 1fr;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  .card {
    margin: 0 auto;
    max-width: 320px;
  }
  
  .btn {
    display: block;
    width: 100%;
    margin-bottom: 10px;
  }
  
  .admin-controls {
    flex-direction: column;
    width: 100%;
  }
  
  .right-controls {
    flex-direction: column;
    width: 100%;
  }
}

/* Filter styles */
.filter-container {
  margin: 20px 0 30px;
  background: white;
  border-radius: 16px;
  padding: 15px 20px;
  box-shadow: var(--shadow);
}

.filter-heading {
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--dark);
  display: flex;
  align-items: center;
}

.filter-heading i {
  margin-right: 8px;
  color: var(--primary);
}

.tech-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-filter {
  display: flex;
  align-items: center;
  background: white;
  padding: 8px 15px;
  border-radius: 30px;
  margin: 5px;
  text-decoration: none;
  color: var(--dark);
  font-weight: 500;
  transition: var(--transition);
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  font-size: 0.95rem;
}

.tech-filter i {
  margin-right: 5px;
  font-size: 1.1rem;
}

.tech-filter:hover {
  background: #e9ecef;
  transform: translateY(-2px);
}

.tech-filter.active {
  background: var(--primary);
  color: white;
}

.tech-count {
  font-size: 0.85rem;
  color: #666;
  margin-left: 8px;
  font-weight: normal;
  opacity: 0.8;
  transition: var(--transition);
}

.tech-filter:hover .tech-count {
  color: white;
  opacity: 1;
}

.tech-filter.active .tech-count {
  color: white;
  opacity: 1;
}

/* Admin controls */
.admin-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

.right-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: var(--light);
  padding: 8px 15px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--secondary);
}

.user-info i {
  color: var(--primary);
}

.btn-logout {
  background-color: #f8f9fa;
  color: #6c757d;
}

.btn-logout:hover {
  background-color: #e9ecef;
  color: #495057;
}

/* Modal styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: white;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: modalFadeIn 0.3s ease;
  overflow: hidden;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-header {
  padding: 15px 20px;
  border-bottom: 1px solid #f1f1f1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  font-size: 1.5rem;
  margin: 0;
  color: var(--secondary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-body {
  padding: 20px;
  max-height: 70vh;
  overflow-y: auto;
}

/* Add custom scrollbar for the modal body */
.modal-body::-webkit-scrollbar {
  width: 8px;
}

.modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--secondary);
}

.close {
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: var(--transition);
}

.close:hover {
  color: var(--primary);
}

/* Panel styles for user management */
.panel {
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 30px;
  overflow: hidden;
}

.panel-header {
  background: var(--light);
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
}

.panel-header h2 {
  color: var(--secondary);
  margin: 0;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-body {
  padding: 20px;
}

/* User list styles */
.users-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.user-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  background: var(--light);
  border-radius: 8px;
  transition: var(--transition);
}

.user-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.user-item .user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-item .user-info i {
  font-size: 1.5rem;
  color: var(--primary);
}

.user-item .username {
  font-weight: 500;
  font-size: 1.1rem;
}

.user-actions {
  display: flex;
  gap: 10px;
}

@media (max-width: 768px) {
  .user-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .user-actions {
    width: 100%;
  }
  
  .user-actions .btn {
    flex: 1;
  }
}

.tech-icon {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  vertical-align: middle;
  object-fit: contain;
}

.tech-icon-small {
  width: 16px;
  height: 16px;
  margin-right: 5px;
  vertical-align: middle;
  object-fit: contain;
}

.flaticon {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.card-header img.flaticon {
  border-radius: 0;
  box-shadow: none;
  border: none;
  width: 50px;
  height: 50px;
}

/* Search box styles */
.search-box {
  position: relative;
  margin-bottom: 20px;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 12px 20px;
  padding-right: 40px;
  border-radius: 50px;
  border: 1px solid #ddd;
  font-family: 'Prompt', sans-serif;
  font-size: 1rem;
  transition: var(--transition);
  box-shadow: var(--shadow);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.3);
}

.search-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #6c757d;
}

/* Hide/show cards based on search */
.card.hidden-search {
  display: none;
}

.tech-group.hidden-search {
  display: none;
}

.no-results {
  text-align: center;
  padding: 30px;
  background: white;
  border-radius: 16px;
  box-shadow: var(--shadow);
  margin: 20px 0;
}

/* Add a help text style */
.help-text {
  font-size: 0.85rem;
  color: #6c757d;
  margin-top: 5px;
}

/* Footer styles */
.site-footer {
  margin-top: 50px;
  padding: 20px;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  box-shadow: var(--shadow);
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.footer-content p {
  margin: 0;
  color: var(--dark);
}

.creator-info {
  font-size: 0.9rem;
}

.creator-name {
  font-weight: 600;
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: 15px;
  margin-top: 10px;
}

.social-links a {
  color: var(--dark);
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-links a:hover {
  color: var(--primary);
  transform: translateY(-3px);
}

@media (max-width: 768px) {
  .site-footer {
    margin-top: 30px;
  }
}

/* Website details modal styles */
.website-modal-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  text-align: center;
  padding-bottom: 15px;
  border-bottom: 1px solid #eee;
}

.website-modal-header h2 {
  margin: 0;
  color: var(--secondary);
  font-size: 1.8rem;
  text-align: center;
  word-break: break-word;
  width: 100%;
}

.modal-icon {
  width: 100px !important;
  height: 100px !important;
}

.modal-icon img {
  width: 80px !important;
  height: 80px !important;
}

.modal-icon i {
  font-size: 40px;
  color: var(--primary);
}

.website-modal-info {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.info-row {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.info-label {
  font-weight: 600;
  color: var(--secondary);
}

.info-label i {
  margin-right: 5px;
  color: var(--primary);
}

.info-value {
  line-height: 1.6;
  width: 100%;
  overflow-wrap: break-word;
}

.info-value a {
  color: var(--primary);
  text-decoration: none;
  word-break: break-all;
}

.info-value a:hover {
  text-decoration: underline;
}

.description-full {
  white-space: pre-line;
  max-height: none;
  overflow: visible;
  word-break: break-word;
  width: 100%;
}

.website-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  flex-wrap: wrap;
  align-items: center;
}

.loading-spinner {
  text-align: center;
  padding: 30px;
  color: var(--primary);
  font-size: 1.2rem;
}

.loading-spinner i {
  margin-right: 10px;
}

@media (min-width: 768px) {
  .info-row {
    flex-direction: row;
    gap: 15px;
  }
  
  .info-label {
    min-width: 120px;
  }
  
  .modal-content {
    max-width: 600px;
  }
}

.website-modal-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

/* Auth features styles */
.auth-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 15px 0;
  padding: 15px;
  background-color: rgba(67, 97, 238, 0.05);
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

.auth-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.auth-feature i {
  color: var(--primary);
  width: 20px;
  text-align: center;
}

/* Hidden website styles */
.hidden-website {
  position: relative;
  opacity: 0.7;
  border: 2px dashed #ccc;
}

.hidden-website::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  z-index: 10;
  pointer-events: none;
}

.hidden-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 5px;
  z-index: 5;
}

.hidden-indicator i {
  color: #fbbf24;
}

/* Checkbox container styles */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input[type="checkbox"] {
  margin-right: 5px;
}

.checkbox-container i {
  color: var(--primary);
}

/* Toggle Switch Styles */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  margin-right: 10px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--primary);
}

input:focus + .toggle-slider {
  box-shadow: 0 0 1px var(--primary);
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.toggle-wrapper {
  display: flex;
  align-items: center;
  margin-top: 10px;
}

.toggle-wrapper .toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.95rem;
  margin-left: 5px;
}

.toggle-wrapper .toggle-icon {
  margin-right: 5px;
}

/* Visibility badge styles */
.visibility-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-top: 5px;
  gap: 6px;
}

.visibility-badge.visible {
  background-color: rgba(74, 222, 128, 0.2);
  color: #166534;
}

.visibility-badge.visible i {
  color: var(--success);
}

.visibility-badge.hidden {
  background-color: rgba(239, 68, 68, 0.2);
  color: #991b1b;
}

.visibility-badge.hidden i {
  color: var(--danger);
}

/* Smaller toggle switch for cards */
.toggle-switch-sm {
  width: 40px;
  height: 20px;
  margin-right: 5px;
}

.toggle-switch-sm .toggle-slider:before {
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.toggle-switch-sm input:checked + .toggle-slider:before {
  transform: translateX(20px);
}

.visibility-toggle {
  display: flex;
  align-items: center;
  margin-left: auto;
  cursor: pointer;
}

.toggle-label-sm {
  font-size: 0.85rem;
  color: #6c757d;
}

.toggle-wrapper {
  margin-right: 5px;
}

.visibility-action-wrapper {
  display: flex;
  align-items: center;
  margin-left: 5px;
}

.modal-toggle {
  margin-top: 0;
  border: 1px solid #eee;
  padding: 5px 10px;
  border-radius: 30px;
  background-color: #f8f9fa;
}

.modal-toggle .toggle-label {
  margin-left: 10px;
  font-size: 0.9rem;
}

/* Adjust spacing in website modal actions */
.website-modal-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  padding-top: 15px;
  border-top: 1px solid #eee;
  flex-wrap: wrap;
  align-items: center;
}
