/* ===== FONTS ===== */
@font-face {
  font-family: 'RVFont';
  src: url('rvfont.ttf') format('truetype');
}

/* ===== BASE STYLES ===== */
*, *::before, *::after {
  box-sizing: border-box;
  -webkit-overflow-scrolling: touch;
}

body, html {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  overflow-x: hidden;
}

/* ===== SCROLLBAR STYLES ===== */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: rgba(13, 26, 38, 0.5);
  border-radius: 12px;
  margin: 5px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(145deg, rgba(136, 192, 208, 0.8), rgba(104, 160, 176, 0.8));
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(145deg, rgba(136, 192, 208, 1), rgba(104, 160, 176, 1));
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Firefox scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(136, 192, 208, 0.8) rgba(13, 26, 38, 0.5);
}

/* ===== MAIN LAYOUT ===== */
#app {
  position: relative;
  background: radial-gradient(ellipse at center, #1a2a3a 0%, #0d1a26 100%);
  min-height: 100vh;
  padding: 20px 0;
  overflow-y: auto;
}

#app::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 165, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 69, 0, 0.08) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(138, 43, 226, 0.15) 0%, transparent 80%);
  pointer-events: none;
  z-index: 1;
  transform: translateZ(0);
  will-change: transform;
}

/* ===== PARTICLES ===== */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float linear infinite;
}

/* ===== CONTENT SECTIONS ===== */
.content {
  position: relative;
  z-index: 10;
  width: 100%;
  margin: 0;
  padding: 0;
}

.section {
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.15));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 60px;
  margin: 0 20px 40px 20px;
  width: calc(100vw - 80px);
  min-height: 30vh;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease-out forwards;
}

.section:nth-child(1) { animation-delay: 0.2s; }
.section:nth-child(2) { animation-delay: 0.4s; }
.section:nth-child(3) { animation-delay: 0.6s; }

.section-title {
  font-family: 'RVFont', Arial, sans-serif;
  color: #88c0d0;
  font-size: 2.5rem;
  margin-bottom: 30px;
  text-align: left;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
  position: relative;
  padding-bottom: 15px;
  width: 100%;
  display: flex;
  align-items: center;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 120px;
  height: 3px;
  background: linear-gradient(to right, #88c0d0, transparent);
}

/* ===== NAVIGATION ===== */
.back-button {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 1000;
}

.back-btn {
  padding: 12px 24px;
  background: linear-gradient(145deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.15));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  touch-action: manipulation;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.5),
    inset 0 2px 4px rgba(255, 255, 255, 0.2),
    inset 0 -2px 4px rgba(0, 0, 0, 0.4);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.back-btn::before {
  content: '←';
  transition: transform 0.3s ease;
}

.back-btn:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
  box-shadow: 
    0 15px 45px rgba(0, 0, 0, 0.7),
    inset 0 2px 8px rgba(255, 255, 255, 0.3),
    inset 0 -2px 8px rgba(0, 0, 0, 0.5);
}

.back-btn:hover::before {
  transform: translateX(-3px);
  animation: arrowBounce 0.6s ease-in-out;
}

/* ===== PHOTO GRID ===== */
.photo-grid {
  column-count: 4;
  column-gap: 30px;
  margin-top: 40px;
  width: 100%;
}

.photo-block {
  break-inside: avoid;
  margin-bottom: 30px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  border: none;
  overflow: hidden;
  position: relative;
  box-shadow: none;
  touch-action: manipulation;
  opacity: 0;
  transform: translateY(30px);
  animation: photoFadeIn 0.8s ease-out forwards;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.photo-block:nth-child(1) { animation-delay: 0.1s; }
.photo-block:nth-child(2) { animation-delay: 0.2s; }
.photo-block:nth-child(3) { animation-delay: 0.3s; }
.photo-block:nth-child(4) { animation-delay: 0.4s; }
.photo-block:nth-child(5) { animation-delay: 0.5s; }
.photo-block:nth-child(6) { animation-delay: 0.6s; }
.photo-block:nth-child(7) { animation-delay: 0.7s; }
.photo-block:nth-child(8) { animation-delay: 0.8s; }
.photo-block:nth-child(9) { animation-delay: 0.9s; }

.photo-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(136, 192, 208, 0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.photo-block:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
  border-color: rgba(136, 192, 208, 0.3);
}

.photo-block:hover::before {
  opacity: 1;
}

.photo-block img, 
.photo-block video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.photo-block:hover img, 
.photo-block:hover video {
  transform: scale(1.08);
}

/* ===== VIDEO CONTROLS ===== */
.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  opacity: 1;
  border-radius: 16px;
  cursor: pointer;
  transition: opacity 0.3s ease;
}

.photo-block:hover .video-overlay {
  background: rgba(0, 0, 0, 0.2);
}

.play-button {
  width: 60px;
  height: 60px;
  background: rgba(136, 192, 208, 0.8);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.8rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
}

.play-button:hover {
  background: rgba(136, 192, 208, 1);
  transform: scale(1.1);
}

.play-button.hidden {
  opacity: 0;
  pointer-events: none;
}

.sound-indicator {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  z-index: 3;
  opacity: 0.8;
  cursor: pointer;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.sound-indicator:hover {
  background: rgba(0, 0, 0, 0.8);
  opacity: 1;
}

/* ===== COOL THINGS GRID ===== */
.cool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.cool-item {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  touch-action: manipulation;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s ease-out forwards;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

/* Updated animation delays for cool items after adding Koi Pond Wallpaper */
.cool-item:nth-child(1) { animation-delay: 0.1s; } /* Koi Pond Wallpaper */
.cool-item:nth-child(2) { animation-delay: 0.2s; } /* Roadmen Playermodel */
.cool-item:nth-child(3) { animation-delay: 0.3s; } /* Rainbow Crosshair */
.cool-item:nth-child(4) { animation-delay: 0.4s; } /* rp_newexton2Riverside2 */
.cool-item:nth-child(5) { animation-delay: 0.5s; } /* RP Riverden v1a */
.cool-item:nth-child(6) { animation-delay: 0.6s; } /* South Park Day/Night */
.cool-item:nth-child(7) { animation-delay: 0.7s; } /* Album Cover Display */
.cool-item:nth-child(8) { animation-delay: 0.8s; } /* Oil Painted Sky */
.cool-item:nth-child(9) { animation-delay: 0.9s; } /* Minecraft Skin Display */
.cool-item:nth-child(10) { animation-delay: 1.0s; } /* Spotify Discord Presence */
.cool-item:nth-child(11) { animation-delay: 1.1s; } /* Angel Fish Wallpaper */

.cool-item:hover {
  z-index: 10;
  transform: translateY(-5px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.5);
  border-color: rgba(136, 192, 208, 0.3);
}

.cool-item-image-container {
  width: 100%;
  height: 200px;
  position: relative;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cool-item-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.cool-item-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.cool-item a {
  color: #88c0d0;
  text-decoration: none;
  font-size: 1.1rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.3s ease;
}

.cool-item a:hover {
  color: #a8d0e0;
}

.cool-item a i {
  font-size: 0.9rem;
}

.cool-description {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  line-height: 1.5;
  flex-grow: 1;
}

/* ===== NOTEPAD COMPONENT ===== */
.notepad-wrapper {
  width: 100%;
  margin-top: 20px;
  position: relative;
  min-height: 100px;
}

.notepad-container {
  width: 100%;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 20px;
  min-height: 100px;
  font-family: 'RVFont', monospace;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
}

.notepad-lines {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
  z-index: 1;
}

.notepad-line {
  position: absolute;
  left: 20px;
  right: 20px;
  height: 1px;
  background-color: rgba(255, 255, 255, 0.08);
}

.notepad-content {
  position: relative;
  z-index: 2;
  line-height: 30px;
}

/* ===== UTILITY COMPONENTS ===== */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 1.2rem;
  background-color: #88c0d0;
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s infinite;
}

.rainbow-text {
  background: linear-gradient(to right, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #8b00ff);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  font-weight: bold;
  display: inline-block;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top-color: #88c0d0;
  animation: spin 1s ease-in-out infinite;
}

.icon-placeholder {
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.5);
}

/* ===== STATUS BADGES ===== */
.image-note {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-bottom: 20px;
  background: rgba(136, 192, 208, 0.15);
  border: 1px solid rgba(136, 192, 208, 0.3);
  border-radius: 30px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.image-note i {
  color: #88c0d0;
}

.image-note:hover {
  background: rgba(136, 192, 208, 0.25);
  border-color: rgba(136, 192, 208, 0.5);
  color: rgba(255, 255, 255, 0.9);
}

.work-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-top: 15px;
  background: rgba(255, 154, 162, 0.15);
  border: 1px solid rgba(255, 154, 162, 0.3);
  border-radius: 30px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.work-progress i {
  color: #FF9AA2;
}

.work-progress:hover {
  background: rgba(255, 154, 162, 0.25);
  border-color: rgba(255, 154, 162, 0.5);
  color: rgba(255, 255, 255, 0.9);
}

/* ===== FOOTER ===== */
.footer {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.footer-text {
  font-size: 1.2rem;
  font-weight: bold;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(to right, 
    #FF9AA2, #FFB7B2, #FFDAC1, #E2F0CB, #B5EAD7, #C7CEEA
  );
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-text:hover {
  transform: scale(1.05);
  filter: brightness(1.2);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes photoFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) translateX(var(--drift));
    opacity: 0;
  }
}

@keyframes blink {
  0%, 50% { 
    opacity: 1; 
  }
  51%, 100% { 
    opacity: 0; 
  }
}

@keyframes arrowBounce {
  0%, 100% { 
    transform: translateX(-3px); 
  }
  50% { 
    transform: translateX(-6px); 
  }
}

@keyframes spin {
  to { 
    transform: rotate(360deg); 
  }
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 1200px) {
  .photo-grid {
    column-count: 3;
  }
  
  .cool-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  #app {
    padding: 10px 0;
  }
  
  .section {
    padding: 40px 30px;
    margin: 0 10px 30px 10px;
    width: calc(100vw - 40px);
    min-height: 30vh;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .photo-grid {
    column-count: 2;
    column-gap: 20px;
  }
  
  .cool-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
  }
  
  .photo-block {
    margin-bottom: 20px;
  }
  
  .back-button {
    top: 15px;
    left: 15px;
  }
  
  .back-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .cool-item-image-container {
    height: 160px;
  }
  
  .play-button {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .footer-text {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 30px 20px;
    margin: 0 5px 20px 5px;
    width: calc(100vw - 30px);
    min-height: 30vh;
  }
  
  .photo-grid {
    column-count: 1;
    column-gap: 15px;
  }
  
  .cool-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .photo-block {
    margin-bottom: 15px;
  }
  
  .cool-item-image-container {
    height: 140px;
  }
  
  .play-button {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .footer-text {
    font-size: 0.9rem;
  }
}