/* Root Variables */
:root {
  --primary-color: #751dfe;
  --secondary-color: #BE0000;
  --accent-color: #f1c40f;
  --bg-dark: #121212;
  --bg-card: #1e1e1e;
  --text-primary: #ffffff;
  --text-secondary: #aaa;
  --transition-speed: 0.3s;
  --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.3);
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Header Styles */
header {
  position: relative;
  background: url('../images/banner.png') center/cover;
  padding: 120px 20px;
  overflow: hidden;
}

header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(117, 29, 254, 0.3), rgba(190, 0, 0, 0.3));
  animation: gradientShift 10s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.5; }
}

header h1 {
  position: relative;
  font-size: 48px;
  margin: 0;
  animation: slideDown 0.8s ease-out;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

header p {
  position: relative;
  font-size: 20px;
  margin-top: 20px;
  animation: slideDown 0.8s ease-out 0.2s backwards;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Section Titles */
h2 {
  margin: 60px 0 30px;
  font-size: 36px;
  text-align: center;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

/* Info Section */
.info {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  text-align: center;
  animation: fadeIn 1s ease-out;
}

.info p {
  font-size: 17px;
  line-height: 1.8;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Projects Section */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  padding: 40px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.project-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 30px 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-speed) ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out backwards;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.project-card:hover::before {
  left: 100%;
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }
.project-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.project-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
  position: static;
  transform: none;
  left: auto;
}

.project-card h2::after {
  display: none;
}

.project-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 15px;
}

.project-card img {
  margin-top: 15px;
  max-width: 150px;
  transition: transform var(--transition-speed) ease;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.project-card:hover img {
  transform: scale(1.1) rotate(5deg);
}

/* Plugin Cards - Same style as project cards */
.plugin-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 30px 20px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-speed) ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out backwards;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.plugin-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.plugin-card:hover::before {
  left: 100%;
}

.plugin-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-lg);
}

.plugin-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
  position: static;
  transform: none;
  left: auto;
}

.plugin-card h2::after {
  display: none;
}

.plugin-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 15px;
}

.plugin-card img {
  margin-top: 15px;
  max-width: 150px;
  transition: transform var(--transition-speed) ease;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.plugin-card:hover img {
  transform: scale(1.1) rotate(5deg);
}

/* Skills Section */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 25px;
  padding: 40px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.skill {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 25px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-speed) ease;
  animation: fadeInUp 0.6s ease-out backwards;
}

.skill:nth-child(1) { animation-delay: 0.1s; }
.skill:nth-child(2) { animation-delay: 0.2s; }
.skill:nth-child(3) { animation-delay: 0.3s; }
.skill:nth-child(4) { animation-delay: 0.4s; }

.skill:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-md);
}

.skill h3 {
  margin: 0 0 15px;
  font-size: 20px;
}

.progress {
  background: #333;
  border-radius: 10px;
  overflow: hidden;
  height: 12px;
  position: relative;
}

.progress-bar {
  height: 100%;
  background: var(--accent-color);
  border-radius: 10px;
  position: relative;
  animation: progressAnimation 1.5s ease-out;
  transition: width 0.5s ease;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes progressAnimation {
  from { width: 0 !important; }
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Modal/Overlay Styles */
#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.3s ease;
}

#overlay.show {
  display: flex;
}

/* Project Modal */
#modal-card {
  position: relative;
  background: var(--bg-card);
  border-radius: 20px;
  padding: 40px;
  max-width: 650px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  gap: 30px;
  align-items: flex-start;
  transform: scale(0.8);
  opacity: 0;
  transition: all 0.3s ease;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

#modal-card.show {
  transform: scale(1);
  opacity: 1;
}

#modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 0, 0, 0.2);
  border: none;
  color: #ff4444;
  font-size: 28px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#modal-close:hover {
  background: rgba(255, 0, 0, 0.4);
  transform: rotate(90deg);
}

#modal-logo {
  max-width: 180px;
  max-height: 180px;
  flex-shrink: 0;
  animation: rotateIn 0.5s ease;
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-180deg) scale(0.5);
  }
  to {
    opacity: 1;
    transform: rotate(0) scale(1);
  }
}

#modal-desc {
  color: var(--text-primary);
  font-size: 16px;
  text-align: left;
  flex: 1;
}

#modal-desc h2 {
  margin: 0 0 20px;
  position: static;
  transform: none;
  left: auto;
  text-align: left;
}

#modal-desc h2::after {
  left: 0;
  transform: none;
}

#modal-desc p {
  margin: 10px 0;
  line-height: 1.6;
}

/* Plugin Modal */
#plugin-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.3s ease;
}

#plugin-overlay.show {
  display: flex;
}

#plugin-modal {
  position: relative;
  background: linear-gradient(135deg, #1e1e1e 0%, #2a2a2a 100%);
  border-radius: 24px;
  padding: 0;
  max-width: 900px;
  width: 90%;
  max-height: 90vh;
  transform: scale(0.9) translateY(20px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}

#plugin-modal.show {
  transform: scale(1) translateY(0);
  opacity: 1;
}

#plugin-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 0, 0, 0.3);
  border: 2px solid #ff4444;
  color: #ff4444;
  font-size: 24px;
  cursor: pointer;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  font-weight: bold;
}

#plugin-close:hover {
  background: rgba(255, 0, 0, 0.6);
  transform: rotate(90deg) scale(1.1);
}

#plugin-content {
  overflow-y: auto;
  max-height: 90vh;
  padding: 40px;
  scrollbar-width: thin;
  scrollbar-color: var(--primary-color) #333;
}

#plugin-content::-webkit-scrollbar {
  width: 8px;
}

#plugin-content::-webkit-scrollbar-track {
  background: #333;
  border-radius: 10px;
}

#plugin-content::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

#plugin-content::-webkit-scrollbar-thumb:hover {
  background: #8c3eff;
}

.plugin-header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid rgba(117, 29, 254, 0.3);
}

.plugin-header h2 {
  font-size: 32px;
  margin: 0 0 10px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: static;
  transform: none;
  left: auto;
}

.plugin-header h2::after {
  display: none;
}

.plugin-version {
  display: inline-block;
  background: var(--primary-color);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 14px;
  margin-top: 10px;
}

.plugin-description {
  background: rgba(117, 29, 254, 0.1);
  border-left: 4px solid var(--primary-color);
  padding: 20px;
  margin: 20px 0;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.8;
}

.plugin-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin: 30px 0;
}

.info-item {
  background: rgba(255, 255, 255, 0.05);
  padding: 15px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.info-item strong {
  color: var(--accent-color);
  display: block;
  margin-bottom: 5px;
}

.plugin-screenshots {
  margin: 30px 0;
}

.plugin-screenshots h3 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--accent-color);
}

.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

.screenshot-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow-md);
}

.screenshot-item:hover {
  transform: scale(1.05);
}

.screenshot-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.screenshot-item:hover img {
  transform: scale(1.1);
}

.screenshot-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: 30px 10px 10px;
  color: white;
  font-size: 14px;
  text-align: center;
}

.plugin-features {
  margin: 30px 0;
}

.plugin-features h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--accent-color);
}

.plugin-features ul {
  list-style: none;
  padding: 0;
}

.plugin-features li {
  background: rgba(255, 255, 255, 0.05);
  padding: 12px 20px;
  margin: 10px 0;
  border-radius: 8px;
  border-left: 3px solid var(--primary-color);
  transition: all 0.3s ease;
}

.plugin-features li:hover {
  background: rgba(117, 29, 254, 0.2);
  transform: translateX(10px);
}

.plugin-features li::before {
  content: '✓ ';
  color: var(--accent-color);
  font-weight: bold;
  margin-right: 10px;
}

/* Footer */
footer {
  background: var(--bg-card);
  padding: 30px 20px;
  margin-top: 60px;
  color: var(--text-secondary);
  text-align: center;
  border-top: 2px solid rgba(117, 29, 254, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  header h1 {
    font-size: 32px;
  }

  header p {
    font-size: 16px;
  }

  h2 {
    font-size: 28px;
  }

  .projects {
    grid-template-columns: 1fr;
  }

  .skills {
    grid-template-columns: 1fr;
  }

  #modal-card {
    flex-direction: column;
    align-items: center;
  }

  #modal-logo {
    max-width: 120px;
    max-height: 120px;
  }

  #modal-desc {
    text-align: center;
  }

  #plugin-content {
    padding: 30px 20px;
  }

  .plugin-header h2 {
    font-size: 24px;
  }

  .screenshot-grid {
    grid-template-columns: 1fr;
  }
}

/* Loading Animation */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s ease-in-out infinite;
}
