@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  --color-primary: #ff3b3b;
  --color-secondary: #00d4ff;
  --color-bg: #0f0f0f;
  --color-surface: #1a1a1a;
  --color-text: #ffffff;
  --color-text-muted: #888888;
  --color-border: #2a2a2a;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body.modal-open {
  overflow: hidden;
}

.bg-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: url('Background.jpg') no-repeat center center;
  background-size: cover;
  background-attachment: fixed;
}

.bg-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(15, 15, 15, 0.95) 0%, rgba(15, 15, 15, 0.85) 100%);
  backdrop-filter: blur(2px);
}

.main-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}


/* Hero */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  position: relative;
}

.hero-inner {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  min-height: 100vh;
  margin: 0 auto;
}

.hero-logo-wrapper {
  margin-bottom: 2.5rem;
  animation: fadeIn 1s ease-out;
  transition: opacity 0.6s ease, transform 0.6s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
}

.hero.scrolled .hero-logo-wrapper {
  opacity: 0;
  transform: translateY(-50px);
  pointer-events: none;
}

.hero.scrolled .scroll-indicator {
  opacity: 0;
  transform: translateX(-50%) translateY(-20px);
  pointer-events: none;
}

.hero-logo {
  max-width: 400px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.8));
  animation: float 8s ease-in-out infinite;
}

/* Scroll Indicator */
.scroll-indicator {
  position: absolute;
  bottom: calc(3rem + 20px);
  left: 50%;
  transform: translateX(-50%);
  animation: fadeIn 1s ease-out 0.5s both;
  opacity: 1;
  z-index: 10;
  width: 30px;
  margin: 0 auto;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-indicator.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mouse {
  width: 30px;
  height: 50px;
  border: 2px solid var(--color-secondary);
  border-radius: 20px;
  position: relative;
}

.mouse::before {
  content: '';
  width: 6px;
  height: 10px;
  background: var(--color-secondary);
  border-radius: 3px;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollDown 1.5s infinite;
}

@keyframes scrollDown {
  0% {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
}

/* Slogan Section */
.slogan-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
  position: absolute;
  top: 100vh;
  left: 0;
  right: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  pointer-events: none;
}

.slogan-section.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.slogan-content {
  text-align: center;
  max-width: 800px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  position: relative;
}

.hero-slogan {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(1.5rem, 5vw, 3rem);
  font-weight: 600;
  text-align: center;
  line-height: 1.4;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
  width: 100%;
  display: block;
}

.slogan-section.visible .hero-slogan {
  opacity: 1;
  transform: translateY(0);
}

.slogan-emoji {
  opacity: 0;
  transform: translateY(30px) scale(0.8);
  transition: opacity 0.8s ease 0.4s, transform 0.8s ease 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.slogan-section.visible .slogan-emoji {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.pepe-emoji {
  max-width: 150px;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

.slogan-part {
  display: inline-block;
}

.slogan-part-1 {
  color: var(--color-secondary);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.slogan-part-2 {
  color: var(--color-primary);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-30px) rotate(2deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Page Header */
.page-header {
  padding: 3rem 3rem 2rem;
  text-align: center;
  position: relative;
}

.back-link {
  position: absolute;
  left: 3rem;
  top: 3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-secondary);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.back-link:hover {
  color: var(--color-primary);
}

.back-link svg {
  width: 20px;
  height: 20px;
}

.page-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--color-text);
  margin: 0;
  background: linear-gradient(135deg, var(--color-secondary), var(--color-primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Widgets Section */
.widgets-section {
  padding: 2rem 3rem 6rem;
  position: relative;
  flex: 1;
}

.widgets-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 800px;
  margin: 4rem auto 0;
}

.widget-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 3rem 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
}

.widget-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-secondary);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.discord-widget:hover {
  border-color: #5865F2;
  box-shadow: 0 10px 30px rgba(88, 101, 242, 0.4);
}

.discord-widget:hover .widget-icon {
  color: #5865F2;
}

.widget-icon {
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.widget-icon svg {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
}

.widget-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
}

.widget-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.widget-desc {
  color: var(--color-text-muted);
  line-height: 1.6;
  font-size: 1rem;
}

/* Projects Container */
.projects-container {
  margin-top: 3rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.project-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-secondary);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.2);
}

.project-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 1.5rem;
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 212, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
}

.project-logo svg {
  width: 100%;
  height: 100%;
}

.project-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.project-desc {
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.project-link {
  padding: 0.8rem 2rem;
  background: transparent;
  border: 1px solid var(--color-secondary);
  border-radius: 8px;
  color: var(--color-secondary);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: inline-block;
}

.project-link:hover {
  background: var(--color-secondary);
  color: var(--color-bg);
  transform: translateY(-2px);
}

/* Video Thumbnail Styles */
.video-thumbnail {
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.video-thumbnail:hover {
  opacity: 0.9;
}

.video-thumbnail:hover .play-button {
  background: rgba(0, 212, 255, 1);
  transform: translate(-50%, -50%) scale(1.1);
}

.video-container video {
  pointer-events: auto;
}

.back-to-widgets {
  display: block;
  margin: 3rem auto 0;
  padding: 0.8rem 2rem;
  background: transparent;
  border: 1px solid var(--color-primary);
  border-radius: 8px;
  color: var(--color-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.back-to-widgets:hover {
  background: var(--color-primary);
  color: var(--color-bg);
  transform: translateY(-2px);
}

/* References */
.references {
  padding: 6rem 3rem;
  position: relative;
  opacity: 1;
  transition: opacity 0.8s ease;
  margin-top: 100vh;
}

.section-inner {
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 4rem;
  text-align: center;
}

.section-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 700;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-primary));
}

.references-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.ref-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  text-decoration: none;
  color: var(--color-text);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.ref-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 59, 59, 0.1), rgba(0, 212, 255, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.ref-item:hover {
  transform: translateY(-5px);
  border-color: var(--color-primary);
  box-shadow: 0 10px 40px rgba(255, 59, 59, 0.2);
}

.ref-item:hover::before {
  opacity: 1;
}

.ref-icon-wrapper {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 59, 59, 0.1);
  border-radius: 12px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.ref-icon {
  width: 32px;
  height: 32px;
  color: var(--color-primary);
  transition: all 0.3s ease;
}

.ref-item:hover .ref-icon-wrapper {
  background: var(--color-primary);
  transform: scale(1.1) rotate(5deg);
}

.ref-item:hover .ref-icon {
  color: var(--color-bg);
}

.ref-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.ref-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.ref-desc {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

/* Platform specific */
.ref-item[data-platform="spotify"]:hover {
  border-color: #1DB954;
  box-shadow: 0 10px 40px rgba(29, 185, 84, 0.2);
}

.ref-item[data-platform="spotify"]:hover .ref-icon-wrapper {
  background: #1DB954;
}

.ref-item[data-platform="youtube"]:hover {
  border-color: #FF0000;
  box-shadow: 0 10px 40px rgba(255, 0, 0, 0.2);
}

.ref-item[data-platform="youtube"]:hover .ref-icon-wrapper {
  background: #FF0000;
}

/* Footer */
.footer {
  padding: 1rem 3rem;
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

.footer-link {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: color 0.3s ease;
  text-decoration: none;
}

.footer-link:hover {
  color: var(--color-primary);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease forwards;
}

.modal.active.closing {
  animation: fadeOut 0.3s ease forwards;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  opacity: 1;
  transition: opacity 0.3s ease;
}

.modal.active .modal-backdrop {
  animation: fadeIn 0.3s ease forwards;
}

.modal.active.closing .modal-backdrop {
  animation: fadeOut 0.3s ease forwards;
}

.modal-box {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 3rem;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 1;
  animation: slideInUp 0.4s ease forwards;
}

.modal-projects {
  max-width: 900px;
  width: 95%;
}

.projects-grid-modal {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 1rem;
}

.modal.active.closing .modal-box {
  animation: slideOutDown 0.3s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes slideOutDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(50px);
  }
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 2rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-family: 'Poppins', sans-serif;
}

.modal-close:hover {
  background: var(--color-border);
  color: var(--color-text);
}

.modal-title {
  font-family: 'JetBrains Mono', monospace;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--color-primary);
}

.modal-body {
  color: var(--color-text-muted);
  line-height: 1.8;
}

.modal-body h3 {
  color: var(--color-text);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.modal-body p {
  margin-bottom: 1rem;
}

.modal-body a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.modal-body a:hover {
  color: var(--color-primary);
}

/* Contact Modal */
.contact-item {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
}

.contact-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.contact-item h3 {
  color: var(--color-text);
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.contact-item p {
  color: var(--color-text-muted);
  font-size: 1rem;
  margin: 0;
}

.contact-item a {
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  font-weight: 500;
}

.contact-item a:hover {
  color: var(--color-primary);
}

/* Responsive */
@media (max-width: 968px) {
  .references {
    padding: 4rem 2rem;
  }

  .references-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .hero {
    padding: 2rem 1.5rem;
  }

  .hero-logo {
    max-width: 250px;
  }

  .hero-logo-wrapper {
    margin-bottom: 2rem;
  }

  .hero-slogan {
    font-size: clamp(1.2rem, 6vw, 2rem);
    padding: 0 1rem;
    word-wrap: break-word;
  }

  .slogan-part {
    display: inline;
  }

  .references {
    padding: 3rem 1.5rem;
  }

  .footer {
    padding: 1rem 1.5rem;
  }

  .footer-inner {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .modal-box {
    padding: 2rem 1.5rem;
  }

  .page-header {
    padding: 2rem 1.5rem 1.5rem;
  }

  .back-link {
    position: static;
    margin-bottom: 1rem;
    justify-content: center;
  }

  .programs-section {
    padding: 2rem 1.5rem 4rem;
  }

  .programs-grid {
    grid-template-columns: 1fr;
  }

  .widgets-container {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .widget-card {
    padding: 2rem 1.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--color-bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--color-secondary), var(--color-primary));
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--color-primary), var(--color-secondary));
}

/* Scrollbar when modal is open - keep visible but darkened */
body.modal-open::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.3), rgba(255, 59, 59, 0.3)) !important;
}

body.modal-open::-webkit-scrollbar-track {
  background: rgba(15, 15, 15, 0.3) !important;
}
