:root {
  --primary-pink: #ff69b4;
  --secondary-pink: #ffb6c1;
  --dark-pink: #ff1493;
  --light-pink: #ffc0cb;
  --primary-black: #000000;
  --dark-gray: #1a1a1a;
  --medium-gray: #2d2d2d;
  --light-gray: #404040;
  --white: #ffffff;
  --gradient-primary: linear-gradient(135deg, var(--primary-pink), var(--dark-pink));
  --gradient-dark: linear-gradient(135deg, var(--primary-black), var(--medium-gray));
  --shadow-pink: 0 0 20px rgba(255, 105, 180, 0.3);
  --shadow-dark: 0 0 20px rgba(0, 0, 0, 0.5);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--gradient-dark);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background:
    radial-gradient(circle at 20% 80%, rgba(255, 105, 180, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 20, 147, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(255, 182, 193, 0.05) 0%, transparent 50%);
  animation: backgroundFloat 20s ease-in-out infinite;
  z-index: -1;
}

@keyframes backgroundFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  33% { transform: translateY(-20px) rotate(1deg); }
  66% { transform: translateY(10px) rotate(-1deg); }
}

.open-btn {
  position: fixed; top: 20px; left: 20px; z-index: 1000;
  background: var(--gradient-primary);
  border: none; color: var(--white);
  padding: 12px 15px; font-size: 18px; border-radius: 50%;
  cursor: pointer; box-shadow: var(--shadow-pink);
  transition: all 0.3s cubic-bezier(0.68,-0.55,0.265,1.55);
  animation: pulse 2s infinite;
}
.open-btn:hover {
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 0 30px rgba(255,105,180,0.6);
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(255,105,180,0.4); }
  70% { box-shadow: 0 0 0 10px rgba(255,105,180,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,105,180,0); }
}

#separator, body.sidebar-closed #separator {
  position: fixed; left: 0; width: 100%; text-align: center; z-index: 100;
  bottom: 24px; pointer-events: auto; transition: opacity 0.3s ease;
}
#separator.hide, body:not(.sidebar-closed) #separator {
  opacity: 0; pointer-events: none; display: none;
}
body.sidebar-closed #separator { bottom: 20px; z-index: 1000; }
#separator { padding: 40px 0; }
#separator .nav-link {
  font-size: 3rem; color: var(--primary-pink); text-decoration: none;
  animation: bounce 2s infinite; display: inline-block; transition: all 0.3s;
}
#separator .nav-link:hover { color: var(--dark-pink); transform: scale(1.2); }
@keyframes bounce {
  0%,20%,50%,80%,100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin: 32px;
}
.project-grid #iner-container { max-width: none; margin: 0; height: 100%; }
.project-grid #iner-container img { max-width: 150px; width: 100%; height: auto; }

.sidebar {
  position: fixed; top: 0; left: -300px; width: 300px; height: 100vh;
  background: linear-gradient(180deg, var(--primary-black), var(--dark-gray));
  backdrop-filter: blur(10px); z-index: 999;
  transition: left 0.4s cubic-bezier(0.68,-0.55,0.265,1.55);
  border-right: 2px solid var(--primary-pink); box-shadow: var(--shadow-dark);
  display: flex; flex-direction: column; padding-top: 80px;
}
.sidebar.open { left: 0; }
.sidebar .nav-link {
  display: block; padding: 20px 30px; color: var(--white);
  text-decoration: none; font-size: 18px; font-weight: 500;
  border-bottom: 1px solid rgba(255,105,180,0.1);
  position: relative; overflow: hidden; transition: all 0.3s;
}
.sidebar .nav-link::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: var(--gradient-primary); transition: left 0.3s; z-index: -1;
}
.sidebar .nav-link:hover::before { left: 0; }
.sidebar .nav-link:hover {
  color: var(--white); text-shadow: 0 0 10px rgba(255,255,255,0.8);
  transform: translateX(10px);
}

.container {
  max-width: 1200px; margin: 0 auto; padding: 20px; position: relative;
}

.info-banner-wrapper {
  position: fixed; top: 0; left: 0; right: 0; z-index: 998;
  animation: slideDownBanner 0.5s ease-out;
}
.info-banner {
  background: var(--gradient-primary); padding: 15px; text-align: center;
  box-shadow: var(--shadow-pink); display: flex; align-items: center;
  justify-content: center; gap: 10px; animation: bannerGlow 3s infinite;
}
@keyframes slideDownBanner {
  from { transform: translateY(-100%); }
  to { transform: translateY(0); }
}
@keyframes bannerGlow {
  0%,100% { box-shadow: var(--shadow-pink); }
  50% { box-shadow: 0 0 30px rgba(255,105,180,0.6); }
}
.close-checkbox:checked + .info-banner { display: none; }
.close-btn {
  cursor: pointer; font-size: 24px; font-weight: bold; padding: 0 10px;
  border-radius: 50%; transition: all 0.3s;
}
.close-btn:hover {
  background: rgba(255,255,255,0.2);
  transform: rotate(90deg) scale(1.2);
}

#home {
  text-align: center; padding: 120px 0 80px; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  animation: fadeInUp 1s ease-out;
}
#logo {
  width: 150px; height: 150px; border-radius: 50%; border: 4px solid var(--primary-pink);
  margin-bottom: 20px; animation: logoFloat 6s infinite; box-shadow: var(--shadow-pink);
  transition: all 0.3s;
}
#logo:hover {
  transform: scale(1.1) rotate(360deg);
  box-shadow: 0 0 40px rgba(255,105,180,0.8);
}
@keyframes logoFloat {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}
#oh64 {
  font-size: 2rem; font-weight: bold; background: var(--gradient-primary);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text; margin: 20px 0;
  animation: textGlow 2s ease-in-out infinite alternate;
}
@keyframes textGlow {
  from { filter: drop-shadow(0 0 5px rgba(255,105,180,0.5)); }
  to { filter: drop-shadow(0 0 20px rgba(255,105,180,0.8)); }
}

#about, #system, #project, #contact {
  padding: 80px 0; margin: 40px 0; border-radius: 20px;
  background: rgba(45,45,45,0.3); backdrop-filter: blur(10px);
  border: 1px solid rgba(255,105,180,0.2); box-shadow: var(--shadow-dark);
  animation: fadeInSection 0.8s ease-out; position: relative; overflow: hidden;
}
#about::before, #system::before, #project::before, #contact::before {
  content: ''; position: absolute; top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(255,105,180,0.05) 0%, transparent 70%);
  animation: sectionRotate 20s linear infinite; z-index: -1;
}
@keyframes sectionRotate {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}
@keyframes fadeInSection {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}
.about-container {
  max-width: 800px; margin: 0 auto; padding: 0 40px;
}
.about-container p {
  font-size: 1.1rem; line-height: 1.8; text-align: justify;
}
.about-container a, #en-m a, #contact #en-m a, #contact #en-m span.discord-handle {
  color: var(--primary-pink); text-decoration: none; font-weight: bold;
  transition: all 0.3s; position: relative;
}
.about-container a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
  background: var(--gradient-primary); transition: width 0.3s;
}
.about-container a:hover::after { width: 100%; }
.about-container a:hover, #en-m a:hover, #contact #en-m a:hover, #contact #en-m span.discord-handle:hover {
  color: var(--dark-pink); text-shadow: 0 0 5px rgba(255,105,180,0.5);
}
span.discord-handle { cursor: pointer; }
#en-m { font-size: 1.2rem; line-height: 2; }
#contact { text-align: center; }
#contact #en-m { font-size: 1rem; }

#system h1, #project h1, #contact h1 {
  text-align: center; font-size: 2.5rem; margin-bottom: 40px;
  background: var(--gradient-primary); -webkit-background-clip: text;
  -webkit-text-fill-color: transparent; background-clip: text;
  animation: titleSlide 0.8s;
}
@keyframes titleSlide {
  from { transform: translateX(-100px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
#system img {
  display: block; margin: 0 auto; max-width: 100%; border-radius: 15px;
  border: 2px solid var(--primary-pink); box-shadow: var(--shadow-pink);
  transition: all 0.3s;
}
#system img:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(255,105,180,0.6);
}

#project { text-align: center; }
#iner-container {
  background: rgba(26,26,26,0.8); margin: 20px auto; padding: 30px;
  border-radius: 15px; border: 2px solid transparent; background-clip: padding-box;
  box-shadow: var(--shadow-dark); transition: all 0.4s cubic-bezier(0.68,-0.55,0.265,1.55);
  position: relative; overflow: hidden; max-width: 600px;
}
#iner-container::before {
  content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: var(--gradient-primary); transition: left 0.4s; z-index: -1; opacity: 0.1;
}
#iner-container:hover::before { left: 0; }
#iner-container:hover {
  transform: translateY(-10px) scale(1.02);
  border-color: var(--primary-pink);
  box-shadow: 0 20px 40px rgba(255,105,180,0.3);
}
#iner-container img {
  max-width: 80px; height: auto; border-radius: 10px; margin-bottom: 15px;
  transition: all 0.3s;
}
#iner-container:hover img { transform: scale(1.1) rotate(5deg); }
#iner-container h2 {
  color: var(--white); font-size: 1.3rem; margin: 0; transition: all 0.3s;
}
#iner-container:hover h2 {
  color: var(--primary-pink);
  text-shadow: 0 0 10px rgba(255,105,180,0.5);
}
#project a { text-decoration: none; display: block; }
.gif-container {
  margin: 0 auto;
  position: relative;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tigif {
  position: relative;
  width: 120px;
  height: 100px;
  margin: 10px;
}

.tigif img {
  position: absolute;
  width: 48px;
  height: 48px;
  object-fit: cover;
  margin: 0;
  padding: 0;
}

.tigif img:nth-child(1) {
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.tigif img:nth-child(2) {
  left: 0;
  bottom: 0;
}

.tigif img:nth-child(3) {
  right: 0;
  bottom: 0;
}

.gif-text {
  margin-top: 10px;
  text-align: center;
}

#endofpage {
  padding: 40px 0; border-top: 1px solid rgba(255,105,180,0.3); margin-top: 60px;
}
#status a {
  color: var(--primary-pink); text-decoration: none; padding: 10px 20px;
  border: 2px solid var(--primary-pink); border-radius: 25px; transition: all 0.3s;
  display: inline-block;
}
#status a:hover {
  background: var(--gradient-primary); color: var(--white);
  transform: scale(1.05); box-shadow: var(--shadow-pink);
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translate3d(0,40px,0); }
  to { opacity: 1; transform: translate3d(0,0,0); }
}

.fade-in { animation: fadeInUp 0.8s ease-out forwards; }
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

.particle {
  position: fixed; width: 4px; height: 4px; background: var(--primary-pink);
  border-radius: 50%; pointer-events: none; opacity: 0.6;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%,100% { transform: translateY(0) translateX(0); opacity: 0.6; }
  50% { transform: translateY(-100px) translateX(50px); opacity: 1; }
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--dark-gray); }
::-webkit-scrollbar-thumb {
  background: var(--gradient-primary); border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--dark-pink); }

@media (max-width: 768px) {
  .container { padding: 10px; }
  #oh64 { font-size: 2.5rem; }
  .sidebar { width: 250px; left: -250px; }
  #about, #system, #project, #contact { margin: 20px 0; padding: 40px 20px; }
  .about-container { padding: 0 20px; }
  #iner-container { margin: 15px 10px; padding: 20px; }
}

@media (max-width: 480px) {
  #oh64 { font-size: 1rem; }
  #logo { width: 120px; height: 120px; }
  .info-banner { padding: 10px; font-size: 0.9rem; }
  .sidebar .nav-link { padding: 15px 20px; font-size: 16px; }
}

@media (min-width: 769px) {
  #project {
    gap: 20px;
  }
  #project #iner-container {
    box-sizing: border-box;
  }
  #project #iner-container img {
    max-width: 150px;
    width: 100%;
    display: block;
    margin: 0 auto;
  }
}
