/* General Components */

/* Cards */
.card-3d {
  position: relative;
  transform-style: preserve-3d;
  transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-3d:hover {
  transform: rotateY(15deg) rotateX(10deg);
}

.card-3d::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--primary-color), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
}

.card-3d:hover::before {
  opacity: 0.2;
}

/* Custom scrollbar for elements */
.custom-scrollbar {
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) var(--darker-bg);
}

.custom-scrollbar::-webkit-scrollbar {
  width: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
  background: var(--darker-bg);
}

.custom-scrollbar::-webkit-scrollbar-thumb {
  background-color: var(--primary-color);
  border-radius: 6px;
}

/* Glowing border */
.glow-border {
  border: 1px solid rgba(105, 45, 243, 0.2);
  box-shadow: 0 0 15px rgba(105, 45, 243, 0.3);
  transition: all 0.3s ease;
}

.glow-border:hover {
  border-color: rgba(105, 45, 243, 0.5);
  box-shadow: 0 0 20px rgba(105, 45, 243, 0.5);
}

/* Text gradient */
.text-gradient {
  background: linear-gradient(to right, var(--primary-color), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Blinking cursor */
.cursor {
  display: inline-block;
  width: 10px;
  height: 1em;
  background-color: var(--secondary-color);
  margin-left: 5px;
  animation: blink 1s step-end infinite;
}

/* Badge */
.badge {
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 0.75em;
  font-weight: 700;
  border-radius: 10px;
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  color: var(--light-text);
  margin-left: 0.5rem;
  vertical-align: middle;
  position: relative;
  top: -2px;
}

/* Glowing text */
.glow-text {
  color: var(--light-text);
  text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--secondary-color);
}

/* Futuristic progress bar */
.progress-container {
  width: 100%;
  height: 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
  margin: 1rem 0;
}

.progress-bar {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-secondary));
  position: relative;
  transition: width 0.4s ease;
}

.progress-bar:after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-image: linear-gradient(
    -45deg, 
    rgba(255, 255, 255, 0.2) 25%, 
    transparent 25%, 
    transparent 50%, 
    rgba(255, 255, 255, 0.2) 50%, 
    rgba(255, 255, 255, 0.2) 75%, 
    transparent 75%, 
    transparent
  );
  background-size: 50px 50px;
  animation: move 2s linear infinite;
  border-radius: 4px;
}

@keyframes move {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 50px 50px;
  }
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  background-color: rgba(5, 5, 8, 0.95);
  color: var(--light-text);
  text-align: center;
  padding: 8px 12px;
  border-radius: 6px;
  position: absolute;
  z-index: 10;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.9rem;
  white-space: nowrap;
  border: 1px solid rgba(105, 45, 243, 0.3);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: rgba(5, 5, 8, 0.95) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
  margin: 0 10px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.1);
  transition: 0.4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: var(--light-text);
  transition: 0.4s;
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
}

input:checked + .slider:before {
  transform: translateX(30px);
}

/* Custom form controls */
.form-group {
  margin-bottom: 1.5rem;
  position: relative;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--light-text);
  border-radius: 4px;
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(105, 45, 243, 0.25);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-family: var(--font-primary);
  font-size: 0.9rem;
  letter-spacing: 0.5px;
}

/* Form with glowing border */
.input-glow {
  position: relative;
}

.input-glow:after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.input-glow:focus-within:after {
  transform: scaleX(1);
}

/* Custom checkbox */
.checkbox-container {
  display: block;
  position: relative;
  padding-left: 35px;
  margin-bottom: 12px;
  cursor: pointer;
  user-select: none;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: rgba(255, 255, 255, 0.1);
}

.checkbox-container input:checked ~ .checkmark {
  background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
  border-color: transparent;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid var(--light-text);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Tags */
.tag {
  display: inline-block;
  padding: 0.3em 0.8em;
  margin: 0.2em;
  background-color: rgba(105, 45, 243, 0.2);
  color: var(--light-text);
  border-radius: 20px;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.tag:hover {
  background-color: var(--primary-color);
  transform: translateY(-3px);
  box-shadow: 0 3px 10px rgba(105, 45, 243, 0.4);
}

/* Accordion */
.accordion {
  margin-bottom: 2rem;
}

.accordion-item {
  margin-bottom: 1rem;
  background: rgba(10, 10, 20, 0.5);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.accordion-header {
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.accordion-header h3 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 500;
}

.accordion-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(105, 45, 243, 0.2);
  border-radius: 50%;
  transition: all 0.3s ease;
}

.accordion-icon i {
  font-size: 0.85rem;
  transition: all 0.3s ease;
  color: var(--secondary-color);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 1.25rem;
}

.accordion-item.active .accordion-content {
  max-height: 300px;
  padding-bottom: 1.25rem;
}

.accordion-item.active .accordion-icon {
  background: rgba(105, 45, 243, 0.4);
}

.accordion-item.active .accordion-icon i {
  transform: rotate(135deg);
}

.accordion-item:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Form inputs */
.newsletter-form input[type="email"],
input[type="text"],
input[type="email"],
input[type="tel"],
textarea,
select {
  padding: 1rem 1.2rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(5, 5, 8, 0.6);
  color: var(--light-text);
  font-family: var(--font-text);
  width: 100%;
  transition: all 0.3s ease;
  box-shadow: 0 0 0 0 rgba(105, 45, 243, 0);
}

.newsletter-form input[type="email"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(105, 45, 243, 0.2);
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input[type="email"] {
  flex: 1;
}
