/* 
  Layer Management CSS for Athena-sama Website
  
  Layer Structure:
  - Layer 1: UI Elements (z-index: 1000+)
  - Layer 2: VRM Container (z-index: 100-999)
  - Layer 3: Background Effects (z-index: 1-99)
*/

/* === LAYER 3: BACKGROUND EFFECTS === */
.background-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.time-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #87CEEB 0%, #FFE0EC 100%);
  transition: all 1s ease-in-out;
  z-index: 11;
}

.particle-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 12;
  opacity: 0.6;
}

/* === LAYER 2: VRM CONTAINER - LAYOUT RESPONSIVE === */
.vrm-container-fixed {
  /* Old fixed positioning disabled for new 3-column layout */
  /* position: fixed; */
  /* top: 50%; */
  /* left: 50%; */
  /* transform: translate(-50%, -50%); */
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 100;
  background: transparent;
  mix-blend-mode: normal;
  opacity: 1;
  pointer-events: none;
}

#vrm-canvas {
  width: 100%;
  height: 100%;
  background: transparent;
  display: block;
}

.athena-visible-area {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 101;
  
  /* Enhanced mask for centered display */
  -webkit-mask: radial-gradient(
    ellipse 200px 300px at center,
    rgba(0,0,0,1) 70%,
    rgba(0,0,0,0.9) 85%,
    rgba(0,0,0,0) 100%
  );
  mask: radial-gradient(
    ellipse 200px 300px at center,
    rgba(0,0,0,1) 70%,
    rgba(0,0,0,0.9) 85%,
    rgba(0,0,0,0) 100%
  );
}

.arch-text-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 102;
  pointer-events: none;
}

/* === LAYER 1: UI ELEMENTS === */
.ui-layer {
  position: relative;
  z-index: 1000;
  width: 100vw;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  pointer-events: auto;
}

/* === NEW SCROLL-RESPONSIVE HEADER === */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.8rem 0;
  transform: translateY(0); /* Show header by default */
  transition: transform 0.3s ease;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.site-header.visible {
  transform: translateY(0);
}

.header-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.nav-logo h2 {
  color: #FF69B4;
  font-size: 1.3rem; /* 25% smaller */
  margin: 0;
  background: linear-gradient(135deg, #FF69B4, #87CEEB);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  color: #666;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  transition: all 0.3s ease;
  font-size: 0.9rem; /* Smaller font */
}

.nav-link:hover {
  background: linear-gradient(135deg, #FF69B4, #87CEEB);
  color: white;
  transform: translateY(-2px);
}

/* === SIDE PANELS === */
.side-panels {
  /* Disabled for new 3-column layout */
  display: none;
  /* position: fixed; */
  /* top: 0; */
  /* left: 0; */
  /* right: 0; */
  /* bottom: 0; */
  /* z-index: 500; */
  /* pointer-events: none; */
  /* display: flex; */
  /* justify-content: space-between; */
  /* align-items: center; */
  /* padding: 0 40px; */
}

.side-panel {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  width: 280px;
}

.left-panel {
  align-self: flex-start;
  margin-top: 20vh;
}

.right-panel {
  align-self: flex-start;
  margin-top: 20vh;
}

.panel-item {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 182, 193, 0.3);
  transition: all 0.3s ease;
  position: relative;
}

.clickable-panel {
  cursor: pointer;
}

.clickable-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.95);
}

.panel-arrow {
  position: absolute;
  top: 50%;
  font-size: 1.5rem;
  color: #FF69B4;
  font-weight: bold;
  transform: translateY(-50%);
  opacity: 0;
  transition: all 0.3s ease;
}

.left-panel .panel-arrow {
  right: -15px;
}

.right-panel .panel-arrow {
  left: -15px;
}

.clickable-panel:hover .panel-arrow {
  opacity: 1;
  transform: translateY(-50%) scale(1.2);
}

.daily-message,
.athena-profile,
.fortune-panel {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(5px);
  border-radius: 15px;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(255, 182, 193, 0.3);
  transition: all 0.3s ease;
}

.daily-message:hover,
.athena-profile:hover,
.fortune-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.main-content {
  position: relative;
  z-index: 400;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1);
  margin-top: 70vh; /* Push content below Athena */
  border: 1px solid rgba(255, 182, 193, 0.2);
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  padding: 3rem;
}

.blog-section,
.youtube-section {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  padding: 2rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(255, 182, 193, 0.2);
}

.site-footer {
  position: relative;
  z-index: 1001;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding: 2rem 0;
  margin-top: 3rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.social-link {
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #FFB6C1, #87CEEB);
  color: white;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.social-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

.social-link.music {
  background: linear-gradient(135deg, #FF6B9D, #C44569);
  animation: musicPulse 2s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}

.social-link.music::before {
  content: '♪';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  opacity: 0.7;
}

@keyframes musicPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

.social-link.music:hover {
  animation: none;
  background: linear-gradient(135deg, #FF1744, #AD1457);
}

.social-link.tiktok {
  background: linear-gradient(135deg, #FF0050, #00F2EA);
  position: relative;
  overflow: hidden;
  animation: tiktokGlow 3s ease-in-out infinite alternate;
}

.social-link.tiktok::before {
  content: '♪';
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.2rem;
  opacity: 0.8;
  animation: tiktokNote 1.5s ease-in-out infinite;
}

@keyframes tiktokGlow {
  0% { box-shadow: 0 4px 15px rgba(255, 0, 80, 0.3); }
  100% { box-shadow: 0 6px 25px rgba(0, 242, 234, 0.4); }
}

@keyframes tiktokNote {
  0%, 100% { transform: translateY(-50%) rotate(-5deg); }
  50% { transform: translateY(-50%) rotate(5deg); }
}

.social-link.tiktok:hover {
  animation: none;
  background: linear-gradient(135deg, #FF0050, #000000);
  box-shadow: 0 8px 30px rgba(255, 0, 80, 0.5);
}

/* === MODAL OVERLAY === */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-overlay.active {
  display: flex;
}

.profile-modal {
  background: white;
  border-radius: 20px;
  max-width: 600px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: linear-gradient(135deg, #FFB6C1, #87CEEB);
  color: white;
  border-radius: 20px 20px 0 0;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-content {
  padding: 2rem;
}

/* === STATUS INFO === */
.status-info {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9rem;
  z-index: 1500;
  backdrop-filter: blur(5px);
}

.status-info p {
  margin: 0.2rem 0;
}

/* === LOADING SCREEN === */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: linear-gradient(135deg, #FFB6C1, #87CEEB);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  transition: opacity 0.5s ease;
}

.loading-screen.hidden {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
}

.loading-content h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* === TIME-BASED GRADIENT THEMES === */
.time-gradient.morning {
  background: linear-gradient(135deg, #87CEEB 0%, #FFE0EC 100%);
}

.time-gradient.afternoon {
  background: linear-gradient(135deg, #4DA6FF 0%, #FFC0D9 100%);
}

.time-gradient.night {
  background: linear-gradient(135deg, #1A237E 0%, #FFE0EC 100%);
}

/* === RESPONSIVE ADJUSTMENTS === */
@media (max-width: 768px) {
  .athena-visible-area {
    -webkit-mask: radial-gradient(
      ellipse 200px 300px at center,
      rgba(0,0,0,1) 60%,
      rgba(0,0,0,0.8) 80%,
      rgba(0,0,0,0) 100%
    );
    mask: radial-gradient(
      ellipse 200px 300px at center,
      rgba(0,0,0,1) 60%,
      rgba(0,0,0,0.8) 80%,
      rgba(0,0,0,0) 100%
    );
  }
  
  .header-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
  }
  
  .content-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
  }
  
  .main-content {
    margin-top: 5rem;
  }
  
  .footer-links {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
}