* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #2c3e50;
}

.session-info {
  background-color: #fff;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: background-color 0.3s, border-color 0.3s;
}

.session-info.expired {
  background-color: #fadbd8;
  border: 2px solid #e74c3c;
}

.session-info p {
  margin-bottom: 10px;
}

.session-info .expiry {
  color: #e74c3c;
  font-weight: bold;
}

.expiry-notice {
  background-color: #e74c3c;
  color: white;
  font-weight: bold;
  padding: 10px;
  margin: 10px -15px -15px -15px;
  border-radius: 0 0 8px 8px;
  text-align: center;
  font-size: 16px;
}

.upload-section {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upload-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.btn {
  padding: 12px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  flex: 1;
  transition: background-color 0.3s;
}

.btn-primary {
  background-color: #3498db;
  color: white;
}

.btn-secondary {
  background-color: #2ecc71;
  color: white;
}

.btn:hover {
  opacity: 0.9;
}

.btn:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
}

.preview-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.image-preview {
  position: relative;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  aspect-ratio: 1 / 1;
}

.image-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview .status {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 5px;
  background-color: rgba(0, 0, 0, 0.7);
  color: white;
  font-size: 12px;
  text-align: center;
}

.progress-container {
  height: 5px;
  background-color: #ecf0f1;
  border-radius: 2px;
  margin-top: 5px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background-color: #2ecc71;
  width: 0;
  transition: width 0.3s;
}

.error-message {
  color: #e74c3c;
  background-color: #fadbd8;
  padding: 10px;
  border-radius: 5px;
  margin-top: 10px;
  display: none;
}

.images-gallery {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gallery-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.gallery-count {
  background-color: #3498db;
  color: white;
  padding: 3px 8px;
  border-radius: 10px;
  font-size: 14px;
}

.hidden {
  display: none;
}

.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.9);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-spinner {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin-bottom: 20px;
}

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

/* Για κινητά */
@media (max-width: 768px) {
  .container {
    padding: 15px;
  }
  
  .upload-buttons {
    flex-direction: column;
  }
  
  .preview-container {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }
}

/* Ειδοποιήσεις */
.notification {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  padding: 15px;
  background-color: #2ecc71;
  color: white;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  z-index: 1000;
  text-align: center;
  font-weight: bold;
}

.notification.show {
  transform: translateY(0);
  opacity: 1;
}

.notification.error {
  background-color: #e74c3c;
}

/* Νέο στυλ για ειδοποίηση λήξης session */
#sessionExpiredAlert {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #e74c3c;
  color: white;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  z-index: 2000;
  max-width: 90%;
  width: 400px;
  display: none;
}

#sessionExpiredAlert.show {
  display: block;
  animation: pulse 2s infinite;
}

#sessionExpiredAlert h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 22px;
}

#sessionExpiredAlert p {
  margin-bottom: 15px;
  font-size: 16px;
}

#sessionExpiredAlert button {
  background-color: white;
  color: #e74c3c;
  border: none;
  padding: 8px 16px;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(231, 76, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(231, 76, 60, 0); }
}

/* Μήνυμα για άδειο container εικόνων */
.no-images-message {
  text-align: center;
  padding: 20px;
  color: #7f8c8d;
  font-style: italic;
}

/* Μόνιμο banner λήξης session - βεβαιωνόμαστε ότι παραμένει ορατό ακόμα και σε περίπτωση σφάλματος */
#permanentExpiryBanner {
  position: fixed; /* αλλαγή από sticky σε fixed */
  top: 0;
  left: 0;
  right: 0;
  background-color: #e74c3c;
  color: white;
  text-align: center;
  padding: 15px;
  z-index: 2000; /* αύξηση του z-index */
  font-weight: bold;
  font-size: 18px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: none;
  border-bottom: 3px solid #c0392b;
}

#permanentExpiryBanner.show {
  display: block;
  animation: attentionPulse 2s infinite;
}

#permanentExpiryBanner::before {
  content: "⚠️ ";
}

#permanentExpiryBanner::after {
  content: " ⚠️";
}

/* Το τρεμόπαιγμα του banner για προσέλκυση προσοχής */
@keyframes attentionPulse {
  0% { background-color: #e74c3c; }
  50% { background-color: #c0392b; }
  100% { background-color: #e74c3c; }
}

/* Εξτρά εφέ για το μόνιμο μήνυμα λήξης */
.expired-highlight {
  animation: textBlink 1.5s infinite;
  font-weight: bold;
}

@keyframes textBlink {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Μετά την προσθήκη του μόνιμου banner, αφήνουμε λίγο παραπάνω χώρο */
#permanentExpiryBanner + .container {
  padding-top: 10px;
}

#permanentExpiryTime {
  display: block;
  font-size: 14px;
  margin-top: 5px;
  opacity: 0.9;
}

/* Στυλ για τη λήξη session - Απλοποιημένη προσέγγιση */
body.session-expired {
  background-color: #fadbd8;
}

.expired-container {
  max-width: 600px;
  margin: 50px auto;
  padding: 30px;
  background-color: #fff;
  border-radius: 8px;
  border: 2px solid #e74c3c;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.expired-container h2 {
  color: #e74c3c;
  margin-bottom: 20px;
  font-size: 24px;
}

.expired-container p {
  margin-bottom: 15px;
  font-size: 16px;
  color: #333;
}

.expired-time {
  font-style: italic;
  color: #7f8c8d;
  font-size: 14px;
  margin-top: 20px;
}