/* Ancient History Background Styles */

body {
  background: #0e0b16 url('../images/papyrus-texture.png');
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at center, rgba(212, 175, 55, 0.2) 0%, rgba(14, 11, 22, 0.9) 80%);
  z-index: -1;
  animation: pulse 15s infinite alternate;
}

@keyframes pulse {
  0% {opacity: 0.8;}
  100% {opacity: 1;}
}

/* Fallback content styles */
.webgl-fallback {
  display: none; /* Hide the WebGL fallback message */
}

/* For better timeline visibility */
.timeline-container {
  position: relative;
}

.timeline-container::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: linear-gradient(to bottom, 
    rgba(212, 175, 55, 0), 
    rgba(212, 175, 55, 0.7) 15%, 
    rgba(212, 175, 55, 0.7) 85%, 
    rgba(212, 175, 55, 0));
  transform: translateX(-50%);
  z-index: -1;
}

/* Portal effect enhancement */
.portal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 10;
    background: radial-gradient(circle at center, rgba(153, 0, 255, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
}

.portal-overlay.active {
    opacity: 1;
}

/* Loading indicator */
.zen-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.zen-loader::before {
    content: '';
    position: absolute;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #9900ff;
    border-bottom-color: #3311bb;
    animation: spin 2s linear infinite;
}

.zen-loader::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-left-color: #d4af37;
    border-right-color: #d4af37;
    animation: spin 1.5s linear infinite reverse;
}

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

/* Interactive elements */
.zen-control-panel {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
    display: flex;
    gap: 10px;
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

.zen-control-panel:hover {
    opacity: 1;
}

.zen-control-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(20, 10, 40, 0.7);
    border: 1px solid rgba(212, 175, 55, 0.3);
    color: #d4af37;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.zen-control-button:hover {
    background: rgba(40, 20, 80, 0.9);
    border-color: rgba(212, 175, 55, 0.8);
    transform: scale(1.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .zen-control-panel {
        bottom: 10px;
        right: 10px;
    }
    
    .zen-control-button {
        width: 30px;
        height: 30px;
    }
}