@font-face {
  font-family: 'Vampire Wars Italic';
  src: url('assets/Vampire Wars Italic.otf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

/* Main Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Courier New', monospace;
}

.custom-cursor {
  position: fixed;
  width: 40px;
  height: 40px;
  background: url('assets/custom_cursor.png') no-repeat center center;
  background-size: contain;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
}

body:not(.touch-device) {
  cursor: none;
}

body {
  background-color: #000;
  color: #fff;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 100vh;
}

.container {
  width: 100%;
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
  pointer-events: none;
}

.glitch-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s;
}

#hacker-overlay,
#snow-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 3;
}

.hidden {
  display: none !important;
}

/* Controls */
.controls {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 20;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 15px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.theme-button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background-color: rgba(0, 0, 0, 0.5);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  font-size: 14px;
  font-weight: bold;
  color: white;
}

.theme-button:hover {
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.8);
}

.top-controls {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 15px;
  z-index: 20;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 15px;
  border-radius: 20px;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.volume-control,
.transparency-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.volume-icon,
.transparency-icon {
  width: 20px;
  height: 20px;
  cursor: pointer;
  color: white;
}

.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 80px;
  height: 5px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.3);
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: white;
  cursor: pointer;
}

/* Profile Block */
#profile-block,
#skills-block {
  position: relative;
  width: 820px;
  max-width: 100%;
  min-height: 332px;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 30px;
  border-radius: 15px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 20px;
  backdrop-filter: blur(10px);
  transform-style: preserve-3d;
  transition: transform 0.5s ease-out, opacity 0.5s ease-out;
  opacity: 0;
  /* Set to 0 for GSAP animation */
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 25px;
}

.profile-container {
  position: relative;
  width: 150px;
  height: 150px;
  flex-shrink: 0;
}

.profile-container::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  background: radial-gradient(circle at 10px 10px,
      var(--primary-color, #00CED1) 10%,
      transparent 15%);
  animation: orbit 3s linear infinite;
  z-index: -1;
  filter: blur(1px);
}

.profile-picture {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  cursor: pointer;
}

.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.name-and-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

#profile-name {
  font-family: 'Vampire Wars Italic', sans-serif;
  font-size: 32px;
  font-weight: bold;
  letter-spacing: 3px;
  color: #fff;
  filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.7));
}

.badge-box {
  background: rgba(255, 255, 255, 0.1);
  padding: 5px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-box-inner {
  display: flex;
  gap: 8px;
}

.badge-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.badge-container {
  position: relative;
}

.badge-container .tooltip {
  visibility: hidden;
  width: 120px;
  background-color: rgba(0, 0, 0, 0.9);
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px;
  position: absolute;
  z-index: 100;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.badge-container:hover .tooltip {
  visibility: visible;
  opacity: 1;
}

.badge {
  width: 22px;
  height: 22px;
  transition: transform 0.3s;
}

.badge:hover {
  transform: scale(1.2);
}

#profile-bio {
  color: rgba(255, 255, 255, 0.8);
  font-size: 16px;
  line-height: 1.6;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.bio-separator {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  margin: 10px 0;
}

.profile-footer {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 25px;
  flex-wrap: wrap;
}

.social-icon {
  width: 32px;
  height: 32px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
}

.social-icon:hover {
  transform: scale(1.3);
}

.visitor-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
}

.visitor-icon {
  width: 16px;
  height: 16px;
}

/* Skills Block */
.skills-title {
  text-align: center;
  font-size: 24px;
  margin-bottom: 10px;
}

.skill {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.skill-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.skill-bar-container {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

.skill-bar {
  height: 100%;
  width: 0%;
  transition: width 2s ease-out;
}

#python-bar {
  background: linear-gradient(90deg, #ff6b6b, #ff9f9f);
}

#cpp-bar {
  background: linear-gradient(90deg, #4facfe, #00f2fe);
}

#csharp-bar {
  background: linear-gradient(90deg, #43e97b, #38f9d7);
}

/* Results Button */
#results-button-container {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}

#results-theme {
  background: rgba(0, 0, 0, 0.8);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 10px 20px;
  border-radius: 20px;
  cursor: pointer;
  backdrop-filter: blur(5px);
  transition: all 0.3s;
}

#results-theme:hover {
  background: rgba(0, 0, 0, 1);
  border-color: white;
}

/* Animations */
@keyframes orbit {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.glitch {
  animation: glitch-anim 0.2s ease-in-out;
}

@keyframes glitch-anim {
  0% {
    transform: translate(0);
  }

  20% {
    transform: translate(-2px, 2px);
  }

  40% {
    transform: translate(-2px, -2px);
  }

  60% {
    transform: translate(2px, 2px);
  }

  80% {
    transform: translate(2px, -2px);
  }

  100% {
    transform: translate(0);
  }
}

/* Start Screen */
#start-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  cursor: pointer;
  backdrop-filter: blur(15px);
}

#start-text {
  font-size: 20px;
  text-align: center;
  padding: 20px;
  max-width: 80%;
}

/* Theme Borders */
.home-theme #profile-block,
.home-theme #skills-block {
  border-color: #00CED1;
}

.hacker-theme #profile-block,
.hacker-theme #skills-block {
  border-color: #22C55E;
}

.rain-theme #profile-block,
.rain-theme #skills-block {
  border-color: #1E3A8A;
}

.anime-theme #profile-block,
.anime-theme #skills-block {
  border-color: #DC2626;
}

.car-theme #profile-block,
.car-theme #skills-block {
  border-color: #EAB308;
}

/* Responsive Breakpoints */

/* Tablets */
@media (max-width: 1024px) {

  #profile-block,
  #skills-block {
    width: 700px;
  }
}

@media (max-width: 768px) {

  #profile-block,
  #skills-block {
    width: 90%;
    padding: 20px;
  }

  #profile-name {
    font-size: 28px;
  }

  .profile-header {
    gap: 15px;
  }

  .profile-container {
    width: 120px;
    height: 120px;
  }
}

/* Mobile Devices */
@media (max-width: 500px) {
  body {
    overflow-y: auto;
  }

  .container {
    padding: 100px 15px 140px 15px;
    /* Even more padding to avoid overlap */
    align-items: flex-start;
    height: auto;
    min-height: 100vh;
  }

  #profile-block,
  #skills-block {
    width: 100%;
    min-height: auto;
    padding: 25px 15px;
    gap: 15px;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
  }

  .profile-container {
    width: 100px;
    height: 100px;
  }

  .profile-info {
    width: 100%;
    align-items: center;
  }

  .name-and-badges {
    justify-content: center;
    flex-direction: column;
    gap: 10px;
  }

  #profile-name {
    font-size: 26px;
    letter-spacing: 2px;
  }

  .badge-box {
    padding: 4px;
    max-width: 100%;
  }

  .badge-group {
    justify-content: center;
    gap: 6px;
  }

  .badge {
    width: 20px;
    height: 20px;
  }

  #profile-bio {
    font-size: 14px;
    text-align: center;
  }

  .social-links {
    gap: 20px;
  }

  .social-icon {
    width: 32px;
    height: 32px;
  }

  /* Fixed controls adjustments */
  .top-controls {
    width: 95%;
    padding: 6px 10px;
    gap: 10px;
  }

  .slider {
    width: 60px;
  }

  .controls {
    width: 95%;
    padding: 6px 10px;
    justify-content: center;
  }

  .theme-button {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  #results-button-container {
    bottom: 70px;
  }
}

/* Extremely small screens */
@media (max-height: 600px) {
  .container {
    padding-top: 80px;
  }
}