/* =========================================================
   نقطه‌های متحرک کنار "به زودی"
   ========================================================= */
.loading-dots {
    display: flex;
    justify-items: center;
    justify-content: center;
    gap: 4px;   
}
.loading-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #000;
    animation: loading-bounce 1.4s ease-in-out infinite;
}
.loading-dots span:nth-child(2){
    animation-delay: 0.15s;
}
.loading-dots span:nth-child(3){
    animation-delay: 0.3s;
}
@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.45;
    }
    40%{
        transform: translateY(-6px);
        opacity: 1;
    }
}
/* =========================================================
   ویجت درصد
   ========================================================= */
.percent {
  position: relative;
  width: 150px;
  height: 150px;
  display: flex;
  justify-items: center;
}
.percent .widget {
      position: relative;
      width: 150px;
      height: 150px;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .percent .widget svg {
      position: relative;
      width: 150px;
      height: 150px;
      transform: rotate(270deg);
    }
.percent .widget svg circle {
  fill: none;
  stroke-width: 7;
  transform: translate(5px, 5px);
  stroke-dasharray: 440;
  stroke-linecap: round;
}
.percent .widget svg circle:nth-child(1) {
  stroke: rgb(198, 198, 198);
}
 .percent .widget svg circle:nth-child(2) {
      stroke: #ffe500;
      stroke-dasharray: 440;
      stroke-linecap: round;
      stroke-dashoffset:440 ;
      filter: blur(0.8px); 
    }
    .percent div {
      position: absolute;
      color: #000;
      font: 1em;
      text-align: center; 
    }
    .percent .dot {
      position: absolute;
      width: 100%;
      height: 100%;
      display: flex;
      justify-content: center;
      align-items: center;
      z-index: 10; 
    }
    .percent .dots::before {
      content: '';
      position: absolute;
      top: -3px;
      left: -10;
      width: 20px;
      height: 20px;
      background: #014d4e;
      border-radius: 50%;
       box-shadow:
    0 0 5px #ffffff,           
    0 0 5px #5ddcff,        
    0 0 5px #014d4e,         
    0 0 5px #014d4e;    
    }
    .percent div span {
      text-transform: lowercase;
      letter-spacing: 0.15em;  
    }
    .percent .number h2 {
     font-size: 25px;
     font-weight: 600;
     text-shadow: 0px 1px 1px black;
     font-family: Verdana, Geneva, Tahoma, sans-serif;
}
.percent .number span {
  font-size: 20px; 
  text-shadow: 0px 1px 1px black;
}

/* =========================================================
   وضعیت نور لامپ
   ========================================================= */
#lampPolygonWrapper.lamp-off {
    opacity: 0;
    visibility: hidden;
}
#lampHalfCircleElement {
  cursor: pointer;
  transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s ease, fill 0.35s ease;
}
#lampHalfCircleElement.lamp-on {
  fill: #ffe988; 
  opacity: 1;
  filter: 
    brightness(1.6) 
    saturate(1.2) 
    contrast(1.1)
    drop-shadow(0px 2px 3px rgba(255, 255, 240, 0.9))
    drop-shadow(0px 8px 20px rgba(255, 240, 180, 0.7))
    drop-shadow(0px 4px 25px rgba(255, 215, 100, 0.5));
}
#lampHalfCircleElement.lamp-off-color {
  fill: #e7e0cf;
  opacity: 0.95;
  filter:
    brightness(0.98)
    saturate(0.6)
    contrast(1.03);
}
#lampHalfCircleElement.lamp-dimmed {
  fill: #f3df9a;
  opacity: 0.9 !important;
  filter:
    brightness(0.95)
    saturate(0.82)
    contrast(1.03)
}
#lampHalfCircleElement.lamp-burned {
  fill: #121212 !important;
  opacity: 1;
  filter: none;
}
#lampPolygonWrapper {
  transition: opacity 0.4s ease, filter 0.4s ease;
  opacity: 0;
}
#lampPolygonWrapper.lamp-on-glow {
  opacity: 0.9 !important;
  filter: brightness(1.12) saturate(1.05);
}
#lampPolygonWrapper.lamp-dimmed {
  opacity: 0.58 !important;
  filter: brightness(1.08) saturate(1.03);
}
#lampPolygonWrapper.lamp-burned {
  opacity: 0.08 !important;
  filter: grayscale(1) brightness(0.4);
}
#lampHalfCircleElement,
#lampPolygonWrapper {
    transition: fill 0.8s ease, opacity 0.8s ease, transform 0.8s ease;
}
.lamp-burned-transition {
    transition: fill 0.8s ease, opacity 0.8s ease, transform 0.8s ease;
}

/* =========================================================
   popup پیام
   ========================================================= */

#popup {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#popup.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
#popupText {
    color: inherit;
      direction: rtl;
  unicode-bidi: plaintext;
   white-space: normal;
}
.popup-bubble {
    display: flex;             
    flex-direction: column;    
    align-items: center;       
    justify-content: center;   
    text-align: center;        
    white-space: pre-line;     
}
/* =========================================================
   دکمه SVG و ظاهر شیشه‌ای آن
   ========================================================= */

.svg-button-container {
    margin-top: 0 !important; 
    margin-right: 15px !important; 
    gap: 10px; 
    display: flex; 
    align-items: center;
    justify-content: center;
    position: relative; 
    overflow: visible; 
    padding: 0; 
    box-sizing: content-box;
}
.glass-toggle-btn {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(16px) saturate(100%);
    -webkit-backdrop-filter: blur(16px) saturate(100%);
    box-shadow: inset 0 0 0 0.2px rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
}
.glass-toggle-btn::before, 
.glass-toggle-btn::after {
    content: none;
}
.glass-toggle-btn:hover {
    box-shadow:
        0 2px 2px rgba(0, 0, 0, 0.20),
        0 2px 16px rgba(0, 0, 0, 0.11);
}
.glass-toggle-btn:active {
    transform: scale(0.965);
}
.svg-button {
    width: 100%;
    height: 100%;
    display: block;
}
.power-icon {
    stroke: #014d4e;
    filter: none;
    transition: stroke .35s cubic-bezier(0.2, 0.8, 0.2, 1),
                filter .35s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.off .power-icon {
    stroke: #1e90ff;
    filter: url(#neonBlue);
}
.glass-popup {
    position: absolute;
    z-index: 50;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.20),
        inset 0 0 12px rgba(255, 255, 255, 0.08);
    padding: 10px 14px;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: opacity .22s ease, transform .22s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
#popup {
    width: clamp(140px, 15vw + 100px, 250px);
    min-height: clamp(40px, 5vh + 30px, 60px);
    padding: clamp(8px, 1vw, 16px) clamp(10px, 1.5vw, 20px);
    border-radius: clamp(10px, 2vw, 16px);
}
#popupText {
    position: relative;
    z-index: 3;
    width: 100%;
    text-align: center;
    display: block;
    line-height: 1.5;
    font-size: clamp(0.75rem, 0.8vw + 0.5rem, 1rem);
    font-family: IRAN-Rounded;
    text-shadow:
        0 0 6px rgba(255,255,255,0.25),
        0 0 12px rgba(100,200,255,0.18);
}
.glass-popup::before {
    content: "";
    position: absolute;
    inset: -35%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(0, 255, 255, 0.00) 20deg,
        rgba(0, 200, 255, 0.18) 50deg,
        rgba(120, 255, 255, 0.45) 80deg,
        rgba(0, 200, 255, 0.18) 110deg,
        rgba(0, 255, 255, 0.00) 140deg,
        transparent 360deg
    );
    filter: blur(10px);
    opacity: 0.85;
    animation: neonSpin 3.8s linear infinite;
    pointer-events: none;
    z-index: 1;
}
.glass-popup::after {
    content: "";
    position: absolute;
    inset: 1px;
    background: rgba(255,255,255,0.03);
    border-radius: inherit;
    z-index: 2;
    pointer-events: none;
}
@keyframes neonSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.glass-popup.show {
    opacity: 1;
}
@media (min-width: 769px) {
    #popup {
        top: 50%;
        right: calc(100% + 8px);
        transform: translateY(-50%) translateY(6px);
        min-width: 140px;
        max-width: 210px;
        min-height: 44px;
        border-radius: 14px;
    }
    #popup.show {
        transform: translateY(-50%);
    }
}
@media (max-width: 768px) {
    #popup {
        top: calc(90% + 8px);
        left: 5%;
        transform: translateX(-50%) translateY(6px);
        width: 118px;     
        min-height: 36px; 
        padding: 7px 10px; 
        border-radius: 12px;
    }
    #popup.show {
        transform: translateX(-50%) translateY(0);
    }
    #popupText {
        font-size: 0.78rem;
        line-height: 1.35;
           display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    width: 100%;
    text-align: center;
    }
    .popup-bubble {
        clip-path: none; 
    }
}
#mySvgButtonContainer {
  width: clamp(2.4rem, 3.8vw, 3.2rem);  
  height: clamp(2.4rem, 3.8vw, 3.2rem);
}
/* =========================================================
   متغیرهای صفحه اصلی
   ========================================================= */

:root{
    --glass-bg:rgba(255,255,255,.10);
    --glass-border:rgba(255,255,255,.18);
    --title-color:#000;
    --text-color:#000;
    --badge-color:#0f172a;
}
.dark-theme {
    --glass-bg: rgba(255,255,255,.12);
    --glass-border: rgba(255,255,255,.22);
    --title-color: #f5f7f5; 
    --text-color: #f5f7f5;
    --badge-color: #ffffff;
}
#heroSection h1 {
    color: var(--title-color);
}
#heroSection p {
    color: var(--text-color);
}

/* =========================================================
   کارت‌های شیشه‌ای
   ========================================================= */

.glass-card{
    position:relative;
    width:min(1100px,100%);
    overflow:hidden;
    border-radius:32px;
    padding:80px 60px;
    background:var(--glass-bg);
    backdrop-filter:blur(18px);
    -webkit-backdrop-filter:blur(18px);
    border:1px solid var(--glass-border);
    box-shadow:
        0 20px 60px rgba(0,0,0,.08),
        inset 0 1px 0 rgba(255,255,255,.18);
    isolation:isolate;
}
.glass-layer{
    position:absolute;
    pointer-events:none;
}
.layer-1{
    inset:10px;
    border-radius:24px;
    background:rgba(255,255,255,.03);
    border:1px solid rgba(255,255,255,.08);
}
.layer-2{
    inset:20px;
    border-radius:20px;
    background:rgba(255,255,255,.015);
    border:1px solid rgba(255,255,255,.04);
}
.glass-content{
    position:relative;
    z-index:10;
}
.glass-title {
    margin-top: 24px;
    font-size: clamp(2.5rem,5vw,4.8rem);
    line-height: 1.05;
    font-weight: 900;
    letter-spacing: -2px;
    color: #000;
    text-wrap: balance;
}
.glass-description {
    margin-top: 24px;
    max-width: 700px;
    font-size: 1.1rem;
    line-height: 2;
    color: var(--text-color);
}
.glass-badge{
    display:inline-flex;
    padding:10px 18px;
    border-radius:999px;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.12);
    color:var(--badge-color);
    font-size:14px;
    font-weight:600;
}

/* =========================================================
   انرژی گوشه‌های کارت‌ها
   ========================================================= */

.energy-svg{
    position:absolute;
    width:120px;
    height:120px;
    pointer-events:none;
    z-index:50;
}
.energy-top-left{
    top:0;
    left:0;
}
.energy-bottom-right{
    bottom:0;
    right:0;
}
.energy-path{
    fill:none;
    stroke-width: 7;
    stroke-linecap:round;
    stroke-linejoin:round;
    filter:
        drop-shadow(0 0 2px #ffffff)
        drop-shadow(0 0 6px #9cecff)
        drop-shadow(0 0 12px #5ddcff);
}
/* =========================================================
   Responsive rules
   ========================================================= */
   
@media (max-width:768px){
    .hero-section{
        padding:20px;
    }
    .glass-card{
        padding:40px 24px;
    }
    
    .glass-title {
        font-size: 2.5rem;
    }
    .glass-description {
        font-size: 1rem;
        line-height: 1.5;
    }
    .energy-svg{
        width:90px;
        height:90px;
    }
}

