/* Dark Theme */
:root {
  --dark-background: #0f1515;
  --text-color: #f5f5f5;
  --primary-color: #00d492;
  --primary-hover: #00b77d;
  --accent-color: #00d492;
  --accent-hover: #00b77d;
  --text-light: #f5f5f5;
  --text-dark: #333;
  --bg-dark: #222;
  --bg-light: rgba(255, 255, 255, 0.1);
  
  /* Card Animation Variables */
  --card-animation-duration: 0.5s;
  --card-hover-scale: 1.03;
  --card-hover-y-offset: -5px;
  --card-shadow-color: rgba(0, 0, 0, 0.2);
  --card-hover-shadow-color: rgba(0, 0, 0, 0.3);
  --card-hover-border-color: rgba(0, 212, 146, 0.4);
}

body {
  background-color: var(--dark-background);
  color: var(--text-color);
  overflow-x: hidden; /* Prevent horizontal scrolling */
  font-family: 'YekanBakh', Arial, sans-serif;
}

/* Completely isolated background container */
#background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  z-index: -10;
  pointer-events: none;
}

/* Background Layers */
.background-base {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

/* General theme for background objects */
.bg-object {
  position: relative;
  background: linear-gradient(45deg, rgba(61, 61, 61, 0.171) 0%, rgba(75, 83, 79, 0.226) 100%);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  overflow: hidden;
  border-radius: 15px;
  border: 1px solid rgba(0, 212, 146, 0.1);
  transition: all 0.3s ease;
}

.bg-object:hover {
  border-color: rgba(0, 212, 146, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.bg-object::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url(/assets/background/grain-bg.svg) no-repeat center;
  scale: 1;
  opacity: 0.7;
  z-index: -1;
  pointer-events: none;
}

.grain-blur {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: url(/assets/background/grain-blur.svg) no-repeat center;
  background-size: contain;
  animation: rotate 30s linear infinite;
  transform-origin: center center;
  z-index: -1;
  width: 100%;
  height: 100%;
}

@keyframes rotate {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.grain-background {
  background: url(/assets/background/grain-bg.svg) repeat;
  z-index: -1;
  background-size: cover;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0.8;
}

.grid-bg {
  background: url(/assets/background/grid-bg.svg) no-repeat;
  z-index: -2;
  background-size: cover;
  background-position: center center;
}

.large-blur {
  left: -30px;
  border-radius: 750px;
  opacity: .5;
  background: radial-gradient(70.71% 70.71% at 50% 50%, rgba(117, 173, 255, .2) 0, rgba(117, 173, 255, 0) 70%, rgba(117, 173, 255, 0) 100%);
  z-index: -2;
  scale: 1.5;
}

.small-blur {
  background: url(/assets/background/small-blur.svg) no-repeat 50%;
  z-index: -2;
  background-size: contain;
  scale: 1.5;
}

/* Deep base layer - beneath everything */
.under-grain-layer {
  background: linear-gradient(120deg, #121212, #1c1c1c, #151515);
  position: fixed;
  z-index: -10;
  width: 140%;
  height: 140%;
  top: -20%;
  left: -20%;
  opacity: 1;
}

/* Base background layer - beneath grid and grain */
.base-bg-layer {
  background: url(/assets/background/grain-bg.svg) repeat;
  z-index: -4;
  background-size: 80px 80px; /* Make pattern larger */
  background-position: center center;
  width: 120%;
  height: 120%;
  top: -10%;
  left: -10%;
  opacity: 0.8;
  scale: 1.2;
  position: fixed;
}

/* Header styles with blur effect */
.header {
    background-color: rgba(116, 179, 152, 0.16);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    width: 100%;
    left: 0;
    right: 0;
    margin: 0 auto;
    transform-origin: center top;
}

.header.scrolled {
    margin: 15px auto;
    border-radius: 15px;
    width: 85%;
    max-width: 1200px;
    top: 10px; /* Move down slightly when scrolled */
}

/* Logo container styles */
.logo-container {
    display: flex;
    align-items: center;
}

.site-logo {
    height: 45px;
    width: auto;
    margin-left: 10px;
    border-radius: 12px;
    object-fit: contain;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-light);
    margin-right: 8px;
}

/* Auth button styles */
.auth-button {
    margin-right: 20px;
}

.auth-link {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.auth-link:hover {
    background-color: var(--primary-hover);
}

/* Main nav with blur effect */
.main-nav ul {
    border-radius: 10px;
    overflow: hidden;
}

@media (max-width: 768px) {
  .main-nav {
    background: rgba(30, 37, 34, 0.8) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 0 0 15px 15px;
  }
}

/* Make sure all content stays above backgrounds */
.content {
  position: relative;
  z-index: 1;
}

/* Font Settings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
}

p, span, div, a {
  font-weight: 400;
}

button, .btn-primary, .btn-secondary, .submit-btn {
  font-weight: 600;
}

/* Direction Settings for RTL */
body, .content, form, input, textarea, select {
  direction: rtl;
  text-align: right;
}

/* Common Styles */
.page-title {
  font-weight: 800;
  margin-bottom: 2rem;
}

/* Card Animation Classes */
.card-animated {
  position: relative;
  transition: transform var(--card-animation-duration) ease,
              box-shadow var(--card-animation-duration) ease,
              border-color var(--card-animation-duration) ease;
  overflow: hidden;
  will-change: transform, box-shadow;
}

.card-animated:hover {
  transform: translateY(var(--card-hover-y-offset)) scale(var(--card-hover-scale));
  box-shadow: 0 15px 30px var(--card-shadow-color);
  border-color: var(--card-hover-border-color);
}

/* Different animation styles */
.card-animated.card-float:hover {
  transform: translateY(var(--card-hover-y-offset));
}

.card-animated.card-scale:hover {
  transform: scale(var(--card-hover-scale));
}

.card-animated.card-tilt-right:hover {
  transform: perspective(1000px) rotateY(2deg) rotateX(1deg);
}

.card-animated.card-tilt-left:hover {
  transform: perspective(1000px) rotateY(-2deg) rotateX(1deg);
}

.card-animated.card-glow:hover {
  box-shadow: 0 5px 15px var(--primary-color), 0 0 30px rgba(0, 212, 146, 0.2);
}

.card-animated.card-border:hover {
  box-shadow: 0 5px 15px var(--card-shadow-color);
  border: 1px solid var(--primary-color);
}

/* Animation Speed Modifiers */
.card-animated.card-fast {
  transition-duration: 0.3s;
}

.card-animated.card-slow {
  transition-duration: 0.8s;
}

/* Card 3D Effect (Parallax) */
.card-3d {
  position: relative;
  transform-style: preserve-3d;
  transform: perspective(1000px);
}

.card-3d-content {
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.card-3d:hover .card-3d-content {
  transform: translateZ(20px);
}

.card-3d-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
}

.card-3d-layer.layer-1 {
  transform: translateZ(10px);
}

.card-3d-layer.layer-2 {
  transform: translateZ(20px);
}

.card-3d-layer.layer-3 {
  transform: translateZ(30px);
}

/* Card Flip Animation */
.card-flip-container {
  perspective: 1000px;
  width: 100%;
  height: 100%;
}

.card-flip {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.card-flip-container:hover .card-flip {
  transform: rotateY(180deg);
}

.card-flip-front, .card-flip-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.card-flip-back {
  transform: rotateY(180deg);
}

/* Button animation */
.btn-animated {
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-animated:hover {
  transform: translateY(-3px);
  box-shadow: 0 7px 14px rgba(0, 0, 0, 0.18);
}

.btn-animated:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.btn-animated.btn-pulse:hover {
  animation: btn-pulse 1s infinite;
}

@keyframes btn-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(0, 212, 146, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(0, 212, 146, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 212, 146, 0);
  }
}

/* Override animations for elements that shouldn't animate */
.no-animation {
  transition: none !important;
}

.no-animation:hover {
  transform: none !important;
  box-shadow: none !important;
  border-color: rgba(0, 212, 146, 0.1) !important;
}

/* Loading Overlay Styles */
.loading-overlay {
  position: fixed;
  top: 70px; /* زیر منو قرار بگیرد - ارتفاع منو */
  left: 0;
  width: 100%;
  height: calc(100% - 70px); /* ارتفاع صفحه منهای ارتفاع منو */
  background-color: rgba(255, 255, 255, 0); /* شفاف بدون پس‌زمینه سفید */
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 9999; /* بالاتر از همه عناصر */
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
  opacity: 1;
}

.loader-container {
  text-align: center;
  padding: 20px;
  border-radius: 25px;
  background-color: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  border: 1px solid var(--primary-color, #4caf4f3f);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.loader {
  border: 5px solid rgba(0, 0, 0, 0);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  margin: 0 auto 20px;
  animation: spin 1s linear infinite;
}

.loader-container p {
  color: white;
  font-family: 'YekanBakh', Arial, sans-serif;
}

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