/* تنظیمات پایه */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

@font-face {
    font-family: 'Vazir';
    src: url('../fonts/Vazir.woff2') format('woff2'),
         url('../fonts/Vazir.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

body {
    font-family: 'Vazir', Tahoma, Arial, sans-serif;
    background-color: #f5f5f5;
    direction: rtl;
    color: #333;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* کانتینر اصلی */
.app-container {
    width: 100%;
    max-width: 450px;
    padding: 15px;
    margin: 0 auto;
}

/* کارت اصلی */
.card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 20px;
    position: relative;
}

/* هدر */
.header {
    text-align: center;
    margin-bottom: 25px;
}

.logo-container {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px auto;
    padding: 15px;
    background-color: #f1ff00;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo {
    width: 100%;
    height: 100%;
}

h1 {
    font-size: 1.5rem;
    color: #4285f4;
    margin: 10px 0;
}

h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: #555;
}

/* بخش تنظیمات */
.setup-section {
    padding: 15px 0;
}

.input-group {
    display: flex;
    margin-bottom: 15px;
}

.input {
    flex: 1;
    padding: 12px 15px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 6px 0 0 6px;
    font-family: inherit;
}

.button {
    background-color: #4285f4;
    border: none;
    color: white;
    padding: 12px 20px;
    text-align: center;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 0 6px 6px 0;
    font-family: inherit;
}

.button:hover {
    background-color: #3367d6;
}

.note {
    font-size: 0.8rem;
    color: #777;
    margin-top: 10px;
}

/* بخش نمایش کد */
.code-section {
    padding: 15px 0;
    text-align: center;
}

.code-container {
    margin: 15px 0;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.code {
    font-size: 2.2rem;
    font-weight: bold;
    color: #333;
    
    font-family: 'Courier New', monospace;
}

.progress-bar-container {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    margin: 15px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 100%;
    background-color: #4CAF50;
    border-radius: 4px;
    transition: width 1s linear;
}

.time-remaining {
    font-size: 0.9rem;
    color: #666;
}

/* اطلاعات اپ */
.app-info {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 0.8rem;
    color: #999;
    text-align: center;
}

.offline {
    color: #ff4444;
    font-weight: bold;
}

/* کلاس مخفی */
.hidden {
    display: none;
}

/* استایل‌های خاص PWA */
@media (display-mode: standalone) {
    body {
        padding: 0;
        margin: 0;
        background-color: #ffffff;
    }
    
    .app-container {
        padding: 0;
        max-width: 100%;
    }
    
    .card {
        border-radius: 0;
        box-shadow: none;
        min-height: 100vh;
    }
}

/* واکنش‌گرایی */
@media screen and (max-width: 480px) {
    .app-container {
        padding: 10px;
    }
    
    .card {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    .code {
        font-size: 1.8rem;
    }
}


/* استایل اصلاح شده برای نوتیفیکیشن به‌روزرسانی */
.update-notification {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #4285f4;
  color: white;
  text-align: center;
  padding: 15px;
  z-index: 9999;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
  direction: rtl;
}

.update-notification-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
  max-width: 600px;
  margin: 0 auto;
}

.update-actions {
  display: flex;
  gap: 10px;
}

.update-button {
  background-color: white;
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  font-family: inherit;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.2s;
}

.update-now {
  color: #4285f4;
}

.update-later {
  color: #555;
  background-color: rgba(255, 255, 255, 0.85);
}

.update-button:hover {
  background-color: #f0f0f0;
}

@media screen and (max-width: 480px) {
  .update-notification-content {
    flex-direction: column;
    gap: 10px;
  }
  
  .update-actions {
    width: 100%;
    justify-content: center;
  }
}
