/*--------------------------------------------------------------------------------*/
/* === Global Body Styles === */

/* Base styling for the entire page */
:root {
  color-scheme: dark;
}

body {
  z-index: 10;                              /* Sets stacking context; useful if body overlaps with fixed elements */
  font-family: 'Roboto', sans-serif;       /* Use Roboto font, fallback to sans-serif */
  margin: 0;                                /* Remove default browser margin */
  padding: 0;                               /* Remove default padding */
  background-color: #0b0f13;               /* Dark background color for the whole page */
  color: #ffffff;                          /* White text as default color */
  display: flex;                            /* Enable flexbox layout */
  justify-content: center;                 /* Center content horizontally */
  align-items: center;                     /* Center content vertically */
  min-height: 100vh;                       /* Ensure body fills at least the full viewport height */
  min-height: 100svh;                      /* Support small viewport height units on mobile */
}
/*--------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------*/
/* === Toast Notification === */

/* Styles for the centered floating toast message */
.toast {
  position: fixed;                             /* Stays in place while scrolling */
  top: 50%;                                    /* Center vertically */
  left: 50%;                                   /* Center horizontally */
  transform: translate(-50%, -50%);            /* Perfect centering with offset */

  background: #00bcd4;                         /* Cyan background */
  color: #000;                                 /* Black text for contrast */
  padding: 20px 32px;                          /* Inner spacing (top/bottom + left/right) */
  border-radius: 16px;                         /* Smooth rounded corners */
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);   /* Drop shadow for depth */

  z-index: 99999;                              /* Appears above most elements */
  font-weight: 600;                            /* Bold text */
  font-size: 1.2rem;                           /* Large readable font */
  text-align: center;                          /* Centered text */

  opacity: 1;                                  /* Fully visible by default */
  transition: opacity 0.5s ease;               /* Smooth fade-in/out transition */

  max-width: 90%;                              /* Responsive width limit */
  white-space: nowrap;                         /* Prevent line breaks in short messages */
}
/*--------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------*/
/* === App Container Layout === */

#app {
  display: flex;                             /* Enables Flexbox layout for child elements */
  flex-direction: column;                    /* Stack children vertically (top to bottom) */
  justify-content: space-between;            /* Distribute space between top and bottom content */

  min-height: 100vh;                         /* Ensure full viewport height (even with little content) */
  padding-bottom: 0;                         /* No extra space at the bottom */

  background-color: rgba(34, 34, 34, 1);       /* Fully transparent background (red fallback not visible) */
  backdrop-filter: blur(10px);               /* Apply background blur effect (glass-like appearance) */

  border-radius: 0px;                         /* No rounded corners (sharp edges) */
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);  /* Soft drop shadow for visual depth */

  width: 100%;                               /* Take full width of the parent container */
  transition: transform 0.3s ease-in-out;    /* Smooth animation when element is transformed */

  max-width: none;                           /* No maximum width restriction */
}
/*--------------------------------------------------------------------------------*/

html,
body {
  width: 100%;
  overflow-x: hidden;
}

/*--------------------------------------------------------------------------------*/
/* === Welcome Stats Section (e.g. GIF Counter) === */

/* Container for all stat blocks (e.g. number of GIFs created) */
#welcomeStats {
  display: flex;                     /* Arrange stat blocks in a row */
  justify-content: center;          /* Center-align the row horizontally */
  gap: 30px;                         /* Space between each stat block */
  margin-top: 30px;                  /* Space above the stats section */
  user-select: none;                /* Prevent users from selecting the text */
  flex-wrap: wrap;                  /* Allow wrapping on smaller screens */
}

/* Wrapper for each individual stat block */
.statBlock {
  text-align: center;               /* Center the text inside each block */
}

/* The main number (e.g. 3,245) */
.statNumber {
  font-size: 32px;                  /* Large number for visibility */
  font-weight: bold;               /* Bold text for emphasis */
  color: #00bcd4;                   /* Bright cyan color to stand out */
  text-shadow: 0 0 10px rgba(0, 188, 212, 0.6); /* Soft glowing effect */
}

/* The label underneath the number (e.g. "GIFs created") */
.statLabel {
  font-size: 12px;                  /* Smaller text for the label */
  color: #aaa;                      /* Light gray color */
  text-transform: uppercase;       /* Make the label all uppercase */
  letter-spacing: 1px;             /* Slight spacing between letters */
  margin-top: 4px;                 /* Space between number and label */
}
/*--------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------*/
/* === Header and Footer Shared Styles === */

header,
footer {
  max-width: 1300px;                         /* Limit maximum width to maintain readable layout */
  height: 20px;                              /* Fixed height (can be overridden if content grows) */
  margin: 0 auto;                            /* Center horizontally */
  width: 100%;                               /* Take full width within the max-width */
  background-color: rgba(50, 50, 50, 0.9);   /* Semi-transparent dark background */
  color: white;                              /* Default text color inside header/footer */
}

/*--------------------------------------------------------------------------------*/
/* === Header Specific Styling === */

header {
  display: flex;                             /* Use Flexbox for layout */
  justify-content: space-between;           /* Push content to left and right edges */
  align-items: center;                      /* Vertically center content */
  padding: 10px 30px;                       /* Inner spacing (top/bottom + left/right) */
  border-radius: 16px 16px 0 0;             /* Rounded top corners */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); /* Subtle drop shadow */
  position: relative;                       /* Required for absolutely positioned inner elements */
}

/*--------------------------------------------------------------------------------*/
/* === Header Title Styling === */

header h1 {
  font-size: 22px;                          /* Medium-large title size */
  letter-spacing: 1px;                      /* Slight spacing between letters */
  color: #00bcd4;                           /* Cyan highlight color */
  font-weight: 500;                         /* Medium font weight */
  text-transform: uppercase;               /* Convert text to uppercase */
  margin: 0;                                /* Remove default browser margin */
}
/*--------------------------------------------------------------------------------*/

.brand-title {
  color: #00bcd4;
  letter-spacing: 1px;
  font-weight: 500;
}




#dropdownMenu {
  display: none;
 
}

.header-user-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 6px;
  border-radius: 50%;
  border: 1px solid rgba(0, 188, 212, 0.4);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.2s ease;
}

.header-user-avatar:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 16px rgba(0, 188, 212, 0.28);
  border-color: rgba(0, 188, 212, 0.7);
}

.header-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Keep the icon row tidy and aligned */
#iconContainer {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
  flex-wrap: nowrap;
  white-space: nowrap;
}

#iconContainer > * {
  margin: 0;
  flex-shrink: 0;
}

#iconContainer .header-user-avatar {
  margin: 0;
}

#iconContainer .user-name-display {
  margin: 0;
}





/*--------------------------------------------------------------------------------*/
/* === Canvas Container and Layered Canvases === */

/* Main container that holds both canvases (drawing + reference) */
#canvasContainer {
  display: flex;                               /* Use flexbox to align canvases */
  justify-content: center;                     /* Center horizontally */
  align-items: center;                         /* Center vertically */
  margin: 0 auto;                              /* Horizontally center in page */
  background-color: #252525;                   /* Dark background for drawing surface */
  border: 2px dashed #555;                     /* Dashed border to outline canvas area */
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);    /* Drop shadow for depth effect */
  width: 100%;                                 /* Full available width */
  max-width: 1000px;                           /* Limit max width on larger screens */
  height: 60vh;                                /* Responsive height: 60% of viewport height */
  max-height: 700px;                           /* Limit maximum height */
  position: relative;                          /* Needed for stacking child elements */
  overflow: hidden;                            /* Hide any overflowing canvas content */
  transition: width 0.5s ease, height 0.5s ease; /* Smooth transition on size change */
  margin-top: -50px;                           /* Pull the canvas container upwards */
}

/* Both canvases layered on top of each other (drawing & background/ghost layer) */
#canvas,
#imageCanvas {
  position: relative;                          /* Allow z-index and containment */
  top: 0;                                      /* Reset vertical position */
  left: 0;                                     /* Reset horizontal position */
  width: 100%;                                 /* Fill container width */
  height: 100%;                                /* Fill container height */
  z-index: 1;                                  /* Layer above base background */
  object-fit: contain;                         /* Preserve aspect ratio within available space */

  /* Proportions are preserved visually — good for animation frames */
  /* imageCanvas typically renders underneath as a reference layer */
}

/* Global canvas styling (applies to all canvas elements) */
canvas {
  touch-action: none;                          /* Prevent pinch-zoom and scrolling on touch devices */
  background-color: rgba(0, 0, 0, 0);          /* Fully transparent canvas background */

  /* aspect-ratio: 16 / 9; */                  /* Optional: maintain widescreen ratio if enabled */

  display: block;                              /* Remove unwanted inline spacing */
  width: 100%;                                 /* Responsive width */
  height: auto;                                /* Allow natural scaling of height */
  position: relative;                          /* Enable transitions and potential layering */
  transition: width 0.5s ease, height 0.5s ease; /* Smooth canvas resizing */
}
/*--------------------------------------------------------------------------------*/


#frameControls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.4);
  position: fixed;
  top: 50%;
  left: 50%;
  width: 600px;
  max-width: 90%;
  z-index: 1000;
}


#toolPanel {
  position: fixed;
  top: 200px;
  left: 230px;
  height: 410px;
  /* Võid panna kindla kõrguse, kui soovid */

    max-height: 420px;
  width: 60px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: rgba(40, 40, 40, 0.95);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  cursor: grab;
  z-index: 100;
}
.fullscreen #toolPanel {
  top: 5px;
  left: 5px;
  z-index: 1;
}
.drag-handle {
  font-size: 18px;
  color: #fff;
  cursor: grab;
  margin-bottom: 10px;
  text-align: center;
}
.icon {
  font-size: 36px;
  margin: 0 12px;
  cursor: pointer;
  transition: transform 0.3s, color 0.3s;
  color: #777;
}
.icon:hover {
  transform: scale(1.2);
  color: #00bcd4;
}
.icon.active {
  color: #4CAF50;
  transform: rotate(10deg);
}
footer {
  text-align: center;
  position: fixed;
  bottom: 0;
  left: 50%;
}
#footer {
  padding: 0px;
  box-shadow: 0px -4px 16px rgba(0, 0, 0, 0.4);
  text-align: center;
}
.modal {
  display: none;
  position: fixed;
  z-index: 99999 !important;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.7);
}




/* MODAL SISESE KONTEINERI JOONDUS */
#userProfileModal {
  display: none;
  position: fixed;
  z-index: 99999;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease forwards;
}
#userProfileModal .modal-content {
  padding: 34px 32px;
  border-radius: 16px;
  background-color: #1c1c1c;
  max-width: 340px;
  width: 100%;
  margin: auto;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  align-self: center;
  margin-top: 32px;
}
/* Kui modal on nähtav */
#userProfileModal.show {
  display: flex;
}
/* Avanemise animatsioon */
@keyframes fadeIn {
  from {
  opacity: 0;
  transform: scale(0.95);
}
to {
  opacity: 1;
  transform: scale(1);
}

}
/* Profiilipilt */
.profile-picture-modal {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 3px solid #00bcd4;
}
/* Kasutajanimi */
#profileUsername {
  font-size: 24px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}
/* Liitumisplaan */
#profilePlan {
  font-size: 14px;
  font-weight: 600;
  background-color: #444;
  color: #ccc;
  padding: 6px 16px;
  border-radius: 20px;
  margin-bottom: 30px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
/* KÕIK NUPUD */
#userProfileModal button {
  width: 100%;
  max-width: 320px;
  padding: 14px 22px;
  margin: 10px 0;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
/* 🔐 Muuda parool – rahulik roheline */
#changePasswordBtn {
  background-color: #2e7d32;
}
#changePasswordBtn:hover {
  background-color: #1b5e20;
  transform: scale(1.03);
}
/* ❌ Kustuta konto – punane */
#deleteAccountBtn {
  background-color:rgba(198, 40, 40, 0.7);
}
#deleteAccountBtn:hover {
  background-color: #b71c1c;
  transform: scale(1.03);
}
/* 🚪 Logi välja – sinine */
#logoutBtnModal {
  background-color: #00acc1;
}
#logoutBtnModal:hover {
  background-color: #00838f;
  transform: scale(1.03);
}
/* Ikoonide suurus */
#userProfileModal button i {
  font-size: 18px;
}


/*--------------------------------------------------------------------------------*/
/* === Premium Upgrade Button === */

/* Main premium upgrade button style */
.premium-upgrade-btn {
  position: relative;                          /* Required for positioning the shine effect */
  background: linear-gradient(45deg, #ffd700, #ffcc00); /* Golden gradient background */
  color: #000;                                 /* Black text */
  font-weight: 500;                            /* Medium font weight */
  border: none;                                /* No border */
  border-radius: 12px;                         /* Rounded corners */
  padding: 14px 22px;                          /* Inner spacing */
  cursor: pointer;                             /* Pointer on hover */
  font-size: 16px;                             /* Text size */
  overflow: hidden;                            /* Clip the animated shine */
  z-index: 1;                                   /* Stack above background */
  transition: transform 0.2s ease, background-color 0.3s ease; /* Smooth interactions */
  margin-top: 20px !important;                 /* Spacing from top (forced override) */
}

/* Slight zoom effect on hover */
.premium-upgrade-btn:hover {
  transform: scale(1.05);                      /* Enlarge slightly */
}

/* Animated shine effect overlay */
.premium-upgrade-btn::before {
  content: "";                                 /* Empty content for pseudo-element */
  position: absolute;                          /* Absolute position within the button */
  top: -50%;                                   /* Oversized to cover diagonal swipe */
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(120deg, 
    rgba(255,255,255,0) 30%, 
    rgba(255,255,255,0.6) 50%, 
    rgba(255,255,255,0) 70%);                  /* Soft white streak */
  transform: rotate(25deg);                    /* Tilt the shine */
  animation: shine 4s infinite;                /* Continuous animation */
  z-index: 2;                                  /* Above button background */
  pointer-events: none;                        /* Doesn’t block clicks */
}

/* Shine animation keyframes */
@keyframes shine {
  0% {
    transform: rotate(25deg) translate(-100%, -100%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  20% {
    transform: rotate(25deg) translate(100%, 100%);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}

/* Ensure both button and its icon keep black text */
.premium-upgrade-btn,
.premium-upgrade-btn i {
  color: #000 !important;                      /* Force black text */
}

/*--------------------------------------------------------------------------------*/
/* === Utility: Hidden Element === */

/* Utility class to completely hide elements */
.hidden {
  display: none !important;                    /* Force hide */
}

/* Utility classes for display toggles */
.display-flex {
  display: flex !important;
}

.display-block {
  display: block !important;
}

.display-inline {
  display: inline !important;
}

.display-inline-block {
  display: inline-block !important;
}

.text-error {
  color: red !important;
}

.text-success {
  color: green !important;
}

.overlay-visible-state {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.overlay-hidden-state {
  opacity: 0 !important;
  transform: translateY(10px) !important;
}

/*--------------------------------------------------------------------------------*/
/* === Forgot Password Button === */

/* Text-style button for "Forgot Password?" */
.forgot-password-btn {
  background-color: rgba(0, 65, 1, 0) !important; /* Fully transparent background */
  color: rgb(255, 255, 255);                     /* White text */
  margin-top: 12px;                              /* Spacing above */
  font-weight: 500;                              /* Medium font */
  font-size: 15px;                               /* Readable size */
  border: none;                                  /* No border */
  border-radius: 8px;                            /* Rounded corners */
  padding: 12px 18px;                            /* Clickable padding */
}
/*--------------------------------------------------------------------------------*/






/* Tellimuse tühistamise modal */
#cancelConfirmModal.cancel-confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 100000000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease-out;
}
.cancel-confirm-content {
  background: rgba(20, 20, 20, 0.95);
  padding: 32px 40px;
  border-radius: 18px;
  box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.6), 0 8px 30px rgba(255, 0, 0, 0.25);
  /* muutus */
  text-align: center;
  max-width: 90%;
  width: 400px;
  font-family: 'Segoe UI', sans-serif;
  animation: slideUp 0.3s ease-out;
  border: 1px solid rgba(255, 0, 0, 0.3);
  /* muutus */
}
.cancel-confirm-content p {
  font-size: 20px;
  margin-bottom: 28px;
  color: #ffffff;
  font-weight: 600;
}
.cancel-confirm-content button {
  border: none;
  padding: 10px 20px;
  border-radius: 14px;
  font-size: 16px;
  cursor: pointer;
  margin: 0 8px;
  transition: all 0.25s ease;
  font-weight: 500;
}
#closeCancelModal {
  background: #ffffff;
  color: #111827;
  border: none;
  padding: 10px 24px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
#closeCancelModal:hover {
  background: #f3f4f6;
  /* kerge helehall hover */
  transform: scale(1.05);
}
#confirmCancelBtn {
  background:rgb(203, 50, 50);
  color: #fff;
}
#confirmCancelBtn:hover {
  background: #e63232;
  transform: scale(1.05);
}
/* Konto kustutamise modal */
#deleteConfirmModal.delete-confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 2147483647;
  /* MAX safe value, sama mis sul GIFi kustutamisel */
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease-out;
}
#projectDeleteConfirmModal.delete-confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease-out;
}
#projectOverwriteModal.delete-confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease-out;
}
#passwordPromptModal.delete-confirm-modal {
  justify-content: center;
  align-items: center;
  display: flex;
  position: fixed;
  inset: 0;
  z-index: 2147483650;
  /* kindlasti kõige ees */
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
}
.delete-confirm-content {
  background: rgba(20, 20, 20, 0.95);
  padding: 32px 40px;
  border-radius: 18px;
  box-shadow: 0 0 0 2px rgba(255, 0, 0, 0.6), 0 8px 30px rgba(255, 0, 0, 0.25);
  text-align: center;
  max-width: 90%;
  width: 400px;
  font-family: 'Segoe UI', sans-serif;
  animation: slideUp 0.3s ease-out;
  border: 1px solid rgba(255, 0, 0, 0.3);
}
.delete-confirm-content p {
  font-size: 20px;
  margin-bottom: 28px;
  color: #ffffff;
  font-weight: 600;
}
.delete-confirm-content button {
  border: none;
  padding: 10px 20px;
  border-radius: 14px;
  font-size: 16px;
  cursor: pointer;
  margin: 0 8px;
  transition: all 0.25s ease;
  font-weight: 500;
}
#closeDeleteModal {
  background:rgb(235, 229, 229);
  color: #111827;
}
#closeDeleteModal:hover {
  background: #d1d5db;
  transform: scale(1.05);
}
.delete-btn {
  background: #dc2626;
  color: white;
}
.delete-btn:hover {
  background: #b91c1c;
  transform: scale(1.05);
}
/* Animatsioonid */

.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2147483646;
}
.loading-overlay.hidden {
  display: none;
}
.loading-card {
  background: rgba(18, 18, 18, 0.9);
  border: 1px solid rgba(0, 184, 217, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  border-radius: 16px;
  padding: 18px 22px;
  min-width: 260px;
  text-align: center;
  color: #e5e7eb;
  animation: slideUp 0.25s ease-out;
}
.loading-card p {
  margin: 0 0 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.loading-bar {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.loading-bar-fill {
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, #00b8d9, #41ead4);
  border-radius: 999px;
  animation: loadingPulse 1s ease-in-out infinite;
}
@keyframes loadingPulse {
  0% { transform: translateX(-120%); opacity: 0.4; }
  50% { transform: translateX(15%); opacity: 1; }
  100% { transform: translateX(120%); opacity: 0.4; }
}
@keyframes fadeIn {
  from {
  opacity: 0;
}
to {
  opacity: 1;
}

}
@keyframes slideUp {
  from {
  transform: translateY(20px);
  opacity: 0;
}
to {
  transform: translateY(0);
  opacity: 1;
}

}
.share-confirm-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease-out;
}
.share-confirm-content {
  background: linear-gradient(145deg, #141414, #1a1a1a);
  padding: 36px 42px;
  border-radius: 24px;
  text-align: center;
  max-width: 90%;
  width: 460px;
  font-family: 'Segoe UI', sans-serif;
  animation: slideUp 0.3s ease-out;
  border: 1px solid rgba(59, 130, 246, 0.3);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.25);
}
.share-note {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 32px;
  /* enne oli näiteks 16px */
  line-height: 1.4;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}
.share-icon {
  font-size: 40px;
  margin-bottom: 16px;
}
.share-message {
  font-size: 20px;
  color: white;
  font-weight: 700;
  margin-bottom: 6px;
}
.share-subheadline {
  font-size: 16px;
  color:rgb(0, 255, 238);
  margin-bottom: 20px;
  font-weight: 500;
}
.share-preview-wrapper {
  margin: 0 auto 20px;
  max-width: 100%;
  background: black;
  border-radius: 12px;
  padding: 8px;
}
.share-preview {
  width: 100%;
  border-radius: 10px;
}
.share-subtext {
  font-size: 15px;
  color: #d1d5db;
  margin-bottom: 28px;
  line-height: 1.5;
}
.share-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.share-buttons button {
  width: 100%;
  max-width: 180px;
  padding: 12px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}
.btn-cancel {
  background: linear-gradient(to right, #f3f4f6, #e5e7eb);
  color: #1f2937;
  border: 1px solid #d1d5db;
}
.btn-cancel:hover {
  background: linear-gradient(to right, #e5e7eb, #d1d5db);
  transform: scale(1.05);
}
.btn-primary {
  background: linear-gradient(to right, #3b82f6, #2563eb);
  color: #ffffff;
  border: 1px solid #2563eb;
}
.btn-primary:hover {
  background: linear-gradient(to right, #2563eb, #1d4ed8);
  transform: scale(1.05);
}
@keyframes fadeIn {
  from {
  opacity: 0;
}
to {
  opacity: 1;
}

}
@keyframes slideUp {
  from {
  transform: translateY(20px);
  opacity: 0;
}
to {
  transform: translateY(0);
  opacity: 1;
}

}


/*--------------------------------------------------------------------------------*/
/* === My Animations: Icons below each GIF === */

/* Container for icon buttons under each GIF */
.gif-icon-row {
  display: flex;                   /* Arrange icons in a row */
  justify-content: center;        /* Center icons horizontally */
  gap: 16px;                      /* Spacing between icons */
  margin-top: 8px;                /* Space above icon row */
}

/* Individual icon buttons */
.gif-icon-row .icon-btn {
  font-size: 18px;                /* Icon size (consider consistency) */
  color: #aaa;                    /* Default icon color (light gray) */
  cursor: pointer;               /* Pointer cursor on hover */
  transition: color 0.3s, transform 0.2s; /* Smooth hover effect */
}

/* Hover effect for icon buttons */
.gif-icon-row .icon-btn:hover {
  color: #00bcd4;                 /* Highlight color on hover */
  transform: scale(1.2);         /* Slight enlarge effect */
}

.gif-icon-row .cinema-select {
  position: relative;
}

.gif-icon-row .cinema-select.icon-selected {
  color: #00bcd4;
}

.gif-icon-row .cinema-select.icon-selected::after {
  content: attr(data-order);
  position: absolute;
  top: -10px;
  right: -10px;
  background: #00bcd4;
  color: #000;
  border-radius: 12px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  padding: 2px;
}


/* === Animated GIF Card Grid === */

/* Grid layout for animation cards */
.my-animations-grid {
  display: grid;                              /* CSS grid layout */
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Responsive column sizing */
  gap: 24px;                                  /* Space between cards */
  padding: 20px;                              /* Padding around grid */
}

/* Individual animation card */
.animation-card {
  background-color: #1a1a1a;                  /* Dark background */
  border-radius: 16px;                        /* Rounded corners */
  overflow: hidden;                           /* Hide overflowed content (e.g. rounded image corners) */
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);   /* Subtle depth effect */
  transition: transform 0.2s ease, box-shadow 0.2s ease; /* Smooth hover animation */
  display: flex;                              /* Vertical layout */
  flex-direction: column;
  align-items: center;
  padding-bottom: 12px;
}

/* Hover effect for the entire card */
.animation-card:hover {
  transform: scale(1.015);                    /* Slight scale up */
  box-shadow: 0 10px 25px rgba(0, 188, 212, 0.25); /* Cyan glow on hover */
}

/* Image inside the animation card */
.animation-card img {
  width: 100%;                                /* Full width image */
  height: auto;                               /* Maintain aspect ratio */
  object-fit: cover;                          /* Crop image to fit container */
  border-bottom: 1px solid #333;              /* Subtle separator line */
}

/* Animation title below the image */
.animation-title {
  color: #00bcd4;                             /* Accent text color */
  font-size: 14px;
  font-weight: 500;
  margin: 10px 0 4px;
  text-align: center;
}
/*--------------------------------------------------------------------------------*/










/* 🎯 Price Modal - paigutus kõrvuti ja modernne välimus */
#pricingModal .plans {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 24px;
  justify-content: flex-start;
  padding: 20px 10px;
  margin-top: 20px;
  scroll-snap-type: x mandatory;
}
#pricingModal .plans::-webkit-scrollbar {
  height: 8px;
}
#pricingModal .plans::-webkit-scrollbar-thumb {
  background: #00bcd4;
  border-radius: 4px;
}
#pricingModal .modal-content {
  max-width: 1300px;
  width: 95%;
}
#pricingModal .plan {
  flex: 0 0 260px;
  scroll-snap-align: center;
  background: linear-gradient(145deg, #2a2a2a, #1c1c1c);
  border-radius: 16px;
  padding: 24px;
  color: #eee;
  box-shadow: 0 0 20px rgba(0, 188, 212, 0.15);
  border: 1px solid #00bcd4;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
}
#pricingModal .plan:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 30px rgba(0, 188, 212, 0.3);
}
#pricingModal .plan.premium {
  border: 2px solid #ffaa00;
  box-shadow: 0 0 25px rgba(255, 170, 0, 0.3);
}
#pricingModal .plan.support {
  background: linear-gradient(135deg, #1b3327, #12402e);
  border: 2px solid #4CAF50;
  color: #ffffff;
  box-shadow: 0 0 25px rgba(76, 175, 80, 0.4);
}
#pricingModal .plan.standard {
  border: 2px solid #00e5ff;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
}
#pricingModal .plan.current-plan {
  border: 2px solid #1de9b6;
  box-shadow: 0 0 30px rgba(29, 233, 182, 0.35), 0 0 18px rgba(0, 188, 212, 0.3);
  transform: translateY(-6px);
}
#pricingModal .plan.standard.current-plan {
  border-color: #00e5ff;
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.25);
  transform: translateY(-4px);
}
#pricingModal .plan h3 {
  font-size: 22px;
  color: #00e5ff;
  margin-bottom: 12px;
}
#pricingModal .plan.premium h3,
#pricingModal .plan.premium p {
  color: #ffaa00;
}
#pricingModal .plan.featured h3,
#pricingModal .plan.featured p {
  color: #ffeb3b;
}
#pricingModal .plan p {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 16px;
}
#pricingModal .plan ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  font-size: 14px;
}
#pricingModal .plan ul li {
  padding: 8px 0;
  border-bottom: 1px solid #444;
}

.feature-gif-unlimited {
  position: relative;
  font-weight: 700;
  color: #ffeb3b;
}

.feature-gif-limit {
  color: #9aa3aa;
}

.feature-project-unlimited {
  position: relative;
  font-weight: 700;
  color: #8ee8ff;
}
.feature-tools-unlimited {
  position: relative;
  font-weight: 700;
  color: #9ce4ff;
}

.feature-project-limit {
  color: #9aa3aa;
}

.feature-highlight {
  background: linear-gradient(90deg, rgba(255, 215, 0, 0.16), rgba(0, 188, 212, 0.1));
  box-shadow: 0 0 18px rgba(255, 215, 0, 0.35);
  border-radius: 10px;
  animation: featurePulse 1.4s ease-in-out 0s 3;
}

@keyframes featurePulse {
  0% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.3); transform: scale(1); }
  50% { box-shadow: 0 0 22px rgba(255, 215, 0, 0.55); transform: scale(1.01); }
  100% { box-shadow: 0 0 8px rgba(255, 215, 0, 0.3); transform: scale(1); }
}

#pricingModal .plan button {
  background-color: #00bcd4;
  color: #000;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-top: 16px;
}
#pricingModal .plan button:hover {
  background-color: #00a0b2;
  transform: scale(1.05);
}
#pricingModal .plan button.is-current {
  background: #1de9b6;
  color: #003329;
  cursor: default;
  box-shadow: 0 10px 20px rgba(29, 233, 182, 0.35);
}
#pricingModal .plan button.is-current:hover {
  background: #1de9b6;
  transform: none;
}
#pricingModal .plan.standard button.is-current {
  background: #00bcd4;
  color: #000;
  box-shadow: 0 10px 20px rgba(0, 188, 212, 0.32);
}
#pricingModal .plan.standard button.is-current:hover {
  background: #00a0b2;
}
#pricingModal .plan.is-disabled {
  opacity: 0.6;
  filter: grayscale(0.1);
}
#pricingModal .plan button.is-disabled {
  background: #3a3a3a;
  color: #8e8e8e;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
#pricingModal .plan button.is-disabled:hover {
  background: #3a3a3a;
  transform: none;
}
#pricingModal .plan.support h3 {
  color: #8cff9e;
}
#pricingModal .plan.support p {
  color: #4CAF50;
}
#pricingModal .plan.support ul li:first-child {
  font-weight: bold;
  color: #FFCC00;
  font-size: 16px;
}
#pricingModal .plan.support li::before {
  content: '★ ';
  color: #FFCC00;
  margin-right: 6px;
}
#pricingModal .plan .current-plan-badge {
  position: absolute;
  top: -12px;
  left: 14px;
  background: linear-gradient(135deg, #1de9b6, #00bcd4);
  color: #002f28;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  box-shadow: 0 8px 20px rgba(0, 188, 212, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
#pricingModal .plan.standard .current-plan-badge {
  background: linear-gradient(135deg, #2bd9ff, #00bcd4);
  color: #00313c;
}
#pricingModal .plan .select-plan-btn.support {
  background-color: #4CAF50;
  color: white;
  transition: background-color 0.3s ease;
}
#pricingModal .plan .select-plan-btn.support:hover {
  background-color: #388E3C;
  transform: scale(1.05);
}
.plan.featured {
  position: relative;
  border: 2px solid gold;
  box-shadow: 0 0 35px rgba(255, 215, 0, 0.5);
  background: linear-gradient(145deg, #2d2a1c, #1f1a0c);
}
.plan.featured.current-plan {
  border-color: #1de9b6;
  box-shadow: 0 0 30px rgba(29, 233, 182, 0.35), 0 0 18px rgba(0, 188, 212, 0.3);
}
.plan.featured .badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(to right, #ffeb3b, #ff9800);
  color: #000;
  font-size: 12px;
  font-weight: bold;
  padding: 5px 14px;
  border-radius: 50px;
  text-transform: uppercase;
  box-shadow: 0 0 12px rgba(255, 200, 0, 0.6);
  animation: pulseBadge 2s infinite;
}
@keyframes pulseBadge {
  0%, 100% {
  transform: translateX(-50%) scale(1);
}
50% {
  transform: translateX(-50%) scale(1.1);
}

}
.close {
  color: #aaaaaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover,
.close:focus {
  color: #ffffff;
}
.carousel {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 5px;
  overflow: hidden;
  width: 100%;
}
.carousel-track {
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: 100%;
  height: 80px;
}
.carousel-btn {
  background-color: rgba(60, 60, 60, 0.9);
  border: none;
  color: #ffffff;
  padding: 6px;
  cursor: pointer;
  font-size: 20px;
  border-radius: 50%;
  margin: 0 10px;
  z-index: 2;
}
.carousel-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.frame-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 50px;
  margin: 0 3px;
  border: 1px solid #444;
  background-color: #1c1c1c;
  cursor: pointer;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease;
}
.frame-preview.dragging {
  opacity: 0.5;
}
.frame-preview.active {
  border: 2px solid #00bcd4;
  box-shadow: 0 0 10px rgba(0, 188, 212, 0.5);
}
#frameControlPanel {
  position: fixed;
  right: 565px;
  top: 50px;
  background-color: rgba(50, 50, 50, 0.762);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 0px 20px;
  z-index: 10000;
  width: 230px;
  max-width: 230px;
  height: 60px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  cursor: grab;
  width: 100%;
  /* Veendu, et nupud mahuksid laiuselt ära */
}
.fullscreen #frameControlPanel {
  top: 5px;
  right: 500px;
  height: 60px;
  width: 300px;
  z-index: 1;
}
#removeBackgroundBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #d32f2f2d;
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s, transform 0.1s;
  font-size: 16px;
  padding: 10px;
}
#removeBackgroundBtn i {
  font-size: 20px;
}
#removeBackgroundBtn:hover {
  background-color: #d32f2f;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
  transform: scale(1.05);
}
#frameCounter {
  position: fixed;
  left: 80px;
  bottom: 210px;
  /* Veidi allpool frameControlPanel'i */
    background-color: rgba(50, 50, 50, 0.762);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.373);
  border-radius: 10px;
  padding: 10px 20px;
  z-index: 10000;
  width: 200px;
  max-width: 200px;
  height: 35px;
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  cursor: grab;
}
.frame-counter-display {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 8px;
  width: 100%;
}
.frame-number {
  font-size: 24px;
  color: #ffffff;
  font-weight: bold;
  text-align: center;
  width: 50px;
  /* Piisavalt ruumi kolmele kohale */
}
.frame-number-divider {
  color: #ffffff;
  font-size: 18px;
  opacity: 0.75;
}
/* Drag handle kujundus */
.drag-handle {
  cursor: move;
  font-size: 18px;
  margin-right: 10px;
}
.fullscreen #frameCounter {
  bottom: 120px;
  left: 5px;
  height: 35px;
  width: 200px;
  z-index: 1;
}
.frame-control-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 110px;
  gap: 10px;
}
#deleteFrameBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 15px;
  background-color: #f443364d;
  border-radius: 10px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
#deleteFrameBtn:hover {
  background-color: #f44336;
  /* Tugevam punane hover-efekt */
}
#addFrameBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background-color: #3a3a3a;
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: background-color 0.2s ease-in-out;
}
#addFrameBtn:hover {
  background-color: #528f50;
  /* Kergelt heledam hall hover-efekt */
}
#frameCarousel {
  position: fixed;
  width: calc(100% - 40px);
  /* Täidab kogu laiuse, jättes natuke ruumi servadesse */
    height: 80px;
  bottom: 100px;
  left: 20px;
  /* Jätab ruumi mõlemale küljele */
    right: 20px;
  /* Jätab ruumi mõlemale küljele */
    background-color: rgba(50, 50, 50, 0.3);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 5px;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  cursor: grab;
}
.fullscreen #frameCarousel {
  width: 100%;
  /* Täisekraanil laiub kogu laiusele */
    left: 0;
  right: 0;
  bottom: 20px;
  /* Määrab kauguse akna allservast täisekraanil */
    transform: none;
  /* Eemaldab keskpunkti nihke */
    z-index: 1;
}
.resize-btn {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background-color: rgba(60, 60, 60, 0);
  color: #ffffff;
  border: none;
  border-radius: 50%;
  padding: 15px;
  cursor: pointer;
  font-size: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 10;
}
.resize-btn:hover {
  background-color: rgba(80, 80, 80, 0.9);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.5);
  transform: scale(1.1);
}
.frame-preview.active {
  border: 2px solid #00bcd4;
  box-shadow: 0 0 10px rgba(0, 188, 212, 0.5);
}
.frame-preview:hover {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}
.carousel-track {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: 100%;
  padding: 10px;
}
.carousel-track::-webkit-scrollbar {
  display: none;
}
.frame-preview {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 80px;
  height: 50px;
  margin: 0 3px;
  border: 1px solid #444;
  background-color: #1c1c1c;
  cursor: pointer;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
}
.frame-preview.added {
  animation: fadeIn 0.3s ease forwards;
}
@keyframes fadeIn {
  from {
  opacity: 0;
  transform: scale(0.9);
}
to {
  opacity: 1;
  transform: scale(1);
}

}
#carouselTrack {
  display: flex;
  transition: transform 0.3s ease-in-out;
  padding: 10px;
  overflow-x: auto;
  scroll-behavior: smooth;
  width: 100%;
  height: 100px;
}
#innerAspectRatioBox {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
#aspectRatioOverlay {
  pointer-events: none;
  width: 100%;
  max-width: 3840px;
  /* 4K laius */
    aspect-ratio: 16 / 9;
  border: 2px dashed #00bcd4;
  /* Sinine punktiirjoon */
    position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  z-index: 2;
}
#canvas {
  width: 100%;
  height: 100%;
  display: block;
  z-index: 2;
  /* Joonistamise canvas kõrgemal */
}
#aspectRatioOverlay {
  z-index: 2;
}
#controlPanel {
  position: absolute;
  top: 50px;
  left: 470px;
  background-color: rgba(50, 50, 50, 0.85);
  border-radius: 10px;
  padding: 10px 30px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 999;
  display: flex;
  gap: 15px;
  /* Määrab ühtlase vahe drag handle'i ja nuppude vahel */
    cursor: grab;
  width: 300px;
  height: 40px;
}
.fullscreen #controlPanel {
  top: 5px;
  left: 400px;
  width: 300px;
  height: 40px;
  z-index: 10000;
}
/* Üldine nupu stiil */
.control-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #3a3a3a;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s, box-shadow 0.3s, transform 0.1s;
}
.control-btn:hover {
  background-color: #555;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
  transform: scale(1.05);
}
.save-project-btn--loading {
  background: linear-gradient(135deg, #00bcd4 0%, #0a708f 50%, #00bcd4 100%);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(0, 194, 255, 0.65), 0 0 26px rgba(0, 132, 255, 0.35);
  pointer-events: none;
  opacity: 0.92;
}
.save-project-btn--loading i {
  animation: saveBtnSpin 0.9s linear infinite;
}
.save-project-btn--loading:hover {
  transform: none;
}
.save-project-btn--pulse {
  background: linear-gradient(135deg, #1ad0ff 0%, #0a82ff 50%, #1ad0ff 100%);
  color: #ffffff;
  box-shadow: 0 0 10px rgba(0, 194, 255, 0.8), 0 0 24px rgba(0, 132, 255, 0.45);
  border: 1px solid rgba(26, 208, 255, 0.6);
  animation: saveBtnPulse 1.3s ease-in-out infinite;
}
.save-project-btn--pulse i {
  color: #ffffff;
}
@keyframes saveBtnPulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(0, 194, 255, 0.7), 0 0 18px rgba(0, 132, 255, 0.35);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 14px rgba(0, 194, 255, 0.85), 0 0 28px rgba(0, 132, 255, 0.55);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 8px rgba(0, 194, 255, 0.7), 0 0 18px rgba(0, 132, 255, 0.35);
  }
}
@keyframes saveBtnSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
#loopToggle {
  width: 40px;
  height: 40px;
  cursor: pointer;
}
#timecodePanel {
  position: fixed;
  top: 150px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgb(50, 50, 50);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 6px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0);
  font-family: monospace;
  font-size: 18px;
  z-index: 1000;
  width: auto;
  pointer-events: none;
}
.fullscreen #timecodePanel {
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgb(50, 50, 50);
  padding: 5px 10px;
  z-index: 1000000;
}
#canvasContainer.fullscreen {
  z-index: 1789789789;
  /* Alandame #canvasContainer z-indexi */

    display: flex;
  justify-content: center;
  align-items: center;
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  top: 100;
  left: 0;
  background-color: #1c1c1c;
}
#canvas.fullscreen {
  width: 100vw;
  height: auto;
  max-height: 100vh;
  object-fit: contain;
}
.resize-btn.fullscreen i {
  transform: rotate(180deg);
}
#toolPanel,
#frameControlPanel,
#controlPanel,

.control-btn i {
  font-size: 20px;
  /* Ikooni suuruse ühtlustamine */
}
.control-btn:hover {
  background-color: #555;
  /* Heledam taust hoveril */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
  /* Sügavam vari hoveril */
    transform: scale(1.05);
  /* Kerge suurendusefekt hoveril */
}
/* Spetsiifiline Add Frame nupu jaoks */
.add-frame-btn {
  background-color: #4CAF50;
  /* Roheline */
}
.add-frame-btn:hover {
  background-color: #45a049;
  /* Tumedam roheline hoveril */
}
.carousel-btn:not(:disabled):hover {
  background-color: #555;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
  transform: scale(1.1);
  /* Hover suurendusefekt */
}
#controlPanel label[for="fpsRange"] {
  color: #ffffff;
  font-size: 16px;
  margin-left: 10px;
  margin-right: 5px;
  vertical-align: middle;
}














/*---------------------------------------------------------------------------------*/

/* === FPS SETTINGS PANEL STYLES === */
#fpsPanel {
  pointer-events: all;                           /* Ensure panel is interactive */
  position: fixed;                               /* Fix panel position on screen */
  top: 50px;                                     /* Distance from top edge */
  left: 160px;                                   /* Distance from left edge */
  width: 250px;
  height: 40px;
  background-color: rgba(50, 50, 50, 0.85);      /* Semi-transparent dark background */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);       /* Subtle shadow for depth */
  border-radius: 10px;                           /* Rounded corners */
  padding: 10px 20px;                            /* Inner spacing */
  z-index: 10000;                                /* High stacking order */
  display: flex;                                 /* Flex layout for child items */
  align-items: center;                           /* Vertically center contents */
  gap: 10px;                                     /* Spacing between elements */
  cursor: grab;                                  /* Indicate draggable panel */
  transition: transform 0.3s ease;               /* Smooth transform animations */
}

/* Adjust panel position when in fullscreen mode */
.fullscreen #fpsPanel {
  top: 5px;
  left: 100px;
}

/* === FPS RANGE SLIDER === */
#fpsRange {
  -webkit-appearance: none;                      /* Remove default styling (Safari/Chrome) */
  appearance: none;                              /* Remove default styling (others) */
  width: 120px;
  height: 6px;
  background: #4CAF50;                           /* Green track */
  border-radius: 5px;
  outline: none;                                 /* Remove focus outline */
  opacity: 0.9;
  transition: opacity 0.15s ease-in-out;
  vertical-align: middle;
}

/* Increase slider visibility on hover */
#fpsRange:hover {
  opacity: 1;
}

/* === SLIDER THUMB (circle) === */
#fpsRange::-webkit-slider-thumb {
  -webkit-appearance: none;                      /* Required to fully override default style */
  appearance: none;
  width: 12px;
  height: 12px;
  background: #ffffff;                           /* White thumb */
  border: none;                                  /* Remove default blue border (Safari) */
  border-radius: 50%;                            /* Circle shape */
  cursor: pointer;
  box-shadow: none;                              /* Remove default shadow ring */
  transition: background-color 0.15s ease-in-out;
}

#fpsRange::-moz-range-thumb {
  width: 12px;
  height: 12px;
  background: #ffffff;                           /* White thumb */
  border: none;                                  /* Remove blue border (Firefox) */
  border-radius: 50%;
  cursor: pointer;
}

/* === FPS VALUE DISPLAY === */
#fpsValue,
#fpsPanel span#fpsValue {
  font-size: 14px;
  color: #FFFFFF;
  margin-left: 5px;                              /* Space between slider and value */
}

/* === CONTAINER AROUND FPS SLIDER === */
#fpsControl {
  display: flex;
  align-items: center;
  justify-content: flex-end;                     /* Align contents to the right */
  gap: 10px;                                     /* Space between elements */
  margin-left: auto;                             /* Push to the far right */
  padding-right: 10px;                           /* Add right padding */
}

/* === LABEL NEXT TO SLIDER === */
#fpsControl label {
  color: #ffffff;
  font-size: 14px;
  margin-right: 10px;
}

/* === ICON INSIDE THE PANEL === */
#fpsPanel i {
  font-size: 18px;                               /* Icon size */
  color: #FFFFFF;                                /* Icon color */
  margin-right: 8px;                             /* Space between icon and next item */
}

/* === FLEXIBLE SLIDER WIDTH INSIDE PANEL === */
#fpsPanel input[type="range"] {
  flex-grow: 1;                                  /* Allow slider to stretch */
}


/* === PROGRESS BAR CONTAINER === */
/*---------------------------------------------------------------------------------*/
.progress-container {
  position: fixed;                               /* Stay fixed in the viewport */
  top: 50%;                                      /* Vertically centered */
  left: 50%;                                     /* Horizontally centered */
  transform: translate(-50%, -50%);              /* Perfect centering */
  width: 60%;                                    /* Responsive width */
  max-width: 520px;
  height: 20px;                                  /* Set height for bar container */
  background-color: rgba(24, 24, 24, 0.94);      /* Dark background */
  border: 1px solid rgba(0, 188, 212, 0.35);
  border-radius: 12px;                            /* Rounded corners */
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55), 0 0 0 2px rgba(0, 188, 212, 0.2);
  display: flex;                                 /* Flex layout for content */
  align-items: center;                           /* Vertically center content */
  justify-content: space-between;               /* Space between progress & text */
  padding: 12px 14px;                                 /* Inner spacing */
  z-index: 2147483651;                           /* Appear above other elements */
  color: white;                                  /* Default text color */
}

/* === BACKGROUND BEHIND PROGRESS BAR === */
.progress-background {
  position: absolute;                            /* Positioned over .progress-container */
  width: 100%;                                   /* Full width of container */
  height: 20px;                                  /* Match container height */
  background-color: #555;                        /* Slightly lighter than container */
  border-radius: 5px;                            /* Match rounded corners */
}

/* === PROGRESS FILL BAR === */
.progress-bar {
  width: 0;                                      /* Start with zero progress */
  height: 20px;                                  /* Full height of container */
  background-color: #4CAF50;                     /* Green progress fill */
  border-radius: 5px;                            /* Smooth corners */
  transition: width 0.1s ease;                   /* Smooth transition effect */
}

/* === PERCENTAGE OR STATUS TEXT === */
.progress-text {
  font-size: 16px;                               /* Readable text size */
  white-space: nowrap;                           /* Prevent text from wrapping */
}

/* === MESSAGE UNDER OR NEXT TO BAR === */
.progress-message {
  font-size: 14px;                               /* Slightly smaller for secondary info */
  color: #ffffff;                                /* White text */
  margin-left: 10px;                             /* Spacing from bar/text */
  white-space: nowrap;                           /* Prevent wrapping */
}

/* === UTILITY CLASS TO HIDE PROGRESS UI === */
.hidden {
  display: none;                                 /* Completely hide element */
}









/* Lisa aktiivse loop nupu stiil */
#loopToggle.active {
  background-color: #4CAF50;
  /* Näiteks roheline taust, kui loop on aktiivne */
    color: #fff;
}
#thicknessPanel {
  position: fixed;
  top: 200px;
  right: 230px;
  background-color: rgba(40, 40, 40, 0.95);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 60px;
  height: 420px;
  z-index: 100;
  cursor: grab;
  gap: 16px;
}
.fullscreen #thicknessPanel {
  top: 5px;
  right: 5px;
  z-index: 1000000;
}
.drag-handle {
  font-size: 24px;
  color: #fff;
  cursor: grab;
  margin-bottom: 10px;
  text-align: center;
  user-select: none;
}
#thicknessSlider {
  width: 300px;
  height: 10px;
  transform: rotate(-90deg);
  margin: 150px 0;
  appearance: none;
  background-color: #555;
  border-radius: 10px;
  cursor: pointer;
}
#thicknessSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  background-color: #4CAF50;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
#thicknessSlider::-moz-range-thumb {
  width: 30px;
  height: 30px;
  background-color: #4CAF50;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
#thicknessSlider::-webkit-slider-thumb:hover,
#thicknessSlider::-moz-range-thumb:hover {
  background-color: #00bcd4;
  transform: scale(1.2);
}
#thicknessValue {
  color: #f3f5f338;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
}
/* Üldine stiil väikestele modaalidele (tsentreeritud, fikseeritud) */
.modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  border: 1px solid #00bcd4;
  background-color: #1e1e1e;
  border-radius: 8px;
  text-align: center;
  padding: 30px;
  font-family: 'Arial', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  animation: fadeIn 0.3s ease forwards;
  color: #f2f2f2;
  max-width: 700px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}
/* Ühtne laius ja joondus kõigile sisenditele ja nuppudele */
.modal-content input,
.modal-content button {
  width: 100%;
  max-width: 300px;
  padding: 12px;
  font-size: 16px;
  border-radius: 5px;
  box-sizing: border-box;
}
/* Sisendväljade täiendav stiil */
.modal-content input {
  margin-bottom: 20px;
  border: 1px solid #555;
  transition: border-color 0.3s ease;
  background-color: #333;
  border-color: #00bcd4;
  outline: none;
}
/* Nupu täiendav stiil */
.modal-content button {
  background-color: #00bcd4;
  border: none;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
.modal-content button:hover {
  background-color: #008c9e;
}
/* Üldine sulgemisnupu stiil */
.modal-content .close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  color: white;
  cursor: pointer;
  transition: color 0.3s ease;
}
.modal-content .close:hover {
  color: #ff4444;
}
/* Eraldi stiilid modaalidele */
#userModal .modal-content {
  height: 500px;
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  width: 300px;
}
#userModal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: none;
  /* Määrab, et login-modal ei ole vaikimisi nähtav */
    align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.8);
  /* Taust läbipaistvusega */
}
#resetPasswordModal .modal-content {
  width: 400px;
  height: 300px;
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}







// REGISTER USER 
////////////////////////////////////////////////////////////////////////

/* Register Modal - Layout and Style Enhancements */
#registerUserModal .modal-content {
  width: 400px;
  max-width: 90vw; /* Ensures responsiveness on smaller screens */
  height: auto; /* Adjusts dynamically based on content height */
  color: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px;
  gap: 20px; /* Space between elements inside the modal */
  box-sizing: border-box; /* Prevents padding from exceeding the width */
  border-radius: 8px; /* Smooth rounded corners */
  background-color: #222; /* Dark background for contrast */
  position: fixed;
}
#registerUserModal h2 {
  margin-bottom: 40px !important;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}




/* Create Account Button */
#registerUserModal .register-btn {
  width: 100%;
  max-width: 350px;
  padding: 12px;
  font-size: 16px;
  border-radius: 5px;
  background-color: #00bcd4;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 20px; /* Adds spacing above the button */
}

/* Close Button in Top Right */
#registerUserModal .close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: #9d9d9d;
  cursor: pointer;
  transition: color 0.3s ease;
}

/* OAuth Button Container (Google and Apple) */
#registerUserModal #auth-buttons {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 15px; /* Adds spacing between auth buttons */
  margin-top: 20px;
}

/* OAuth Button Style */
#registerUserModal .auth-button {
  width: 100%;
  max-width: 350px;
  padding: 12px;
  font-size: 16px;
  text-align: center;
  border-radius: 5px;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

/* Google Sign-In Button Colors */
#registerUserModal #google-signin-button {
  background-color: #4285F4;
}
#registerUserModal #google-signin-button:hover {
  background-color: #3367d6;
}

/* Apple Sign-In Button Colors */
#registerUserModal #apple-signin-button {
  background-color: #333333;
}
#registerUserModal #apple-signin-button:hover {
  background-color: #1c1c1c;
}


.select-plan-btn {
  position: relative;
  background: linear-gradient(45deg,rgb(2, 68, 20),rgb(8, 55, 18));
  color: #000;
  font-weight: 500;
  border: none;
  border-radius: 12px;
  padding: 14px 22px;
  cursor: pointer;
  font-size: 16px;
  width: 100%;
  max-width: 350px;
  overflow: hidden;
  z-index: 1;
  transition: transform 0.2s ease, background-color 0.3s ease;
}

.select-plan-btn:hover {
  transform: scale(1.05);
}

/* Läikiv efekt */
.select-plan-btn::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(120deg, rgba(255,255,255,0) 30%, rgba(255, 255, 255, 0.05) 50%, rgba(255,255,255,0) 70%);
  transform: rotate(25deg);
  animation: shine 4s infinite;
  z-index: 2;
  pointer-events: none;
}

@keyframes shine {
  0% {
    transform: rotate(25deg) translate(-100%, -100%);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  20% {
    transform: rotate(25deg) translate(100%, 100%);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}



#termsCheckbox {
  margin-left: 0 !important;
}




.back-to-login-btn {
  margin-top: 12px;
  background: none;
  border: none;
  color: #00bcd4;
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.3s ease;
}

.back-to-login-btn:hover {
  color: #80e8ff;
}





/* "OR" Divider Styling */
.or-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: #9d9d9d;
  margin: 0px 0;
  font-weight: bold;
}
.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid #9d9d9d;
  margin: 0 10px;
}

/* Input Field Style (Username, Email, Password) */
#registerUserModal input[type="text"],
#registerUserModal input[type="email"],
#registerUserModal input[type="password"] {
  width: 300px;
  max-width: 300px; /* Enforces consistent input width */
  padding: 10px; /* Extra space inside input */
  font-size: 16px; /* Improves text readability */
  border-radius: 5px; /* Rounded edges */
  box-sizing: border-box; /* Ensures padding stays within width */
}

/* Terms and Conditions Container */
#registerUserModal .terms-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  font-size: 14px;
  color: #ccc;
  text-align: left;
  flex-wrap: nowrap;
  margin: 12px auto 24px;
  width: auto;
  max-width: 360px;
}

/* Terms Label (Checkbox + Text) */
#registerUserModal .terms-group .terms-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ccc;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.4;
  text-align: left;
}
#registerUserModal .terms-group .terms-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Checkbox Styling */
#registerUserModal input[type="checkbox"] {
  margin: 0;
  transform: translateY(0) scale(1.05); /* Slight vertical alignment and size tweak */
  accent-color: #00bcd4; /* Custom checkbox color */
  cursor: pointer;
}

/* Terms and Conditions Link */
#registerUserModal .terms-group a {
  color: #00bcd4;
  text-decoration: underline;
  transition: color 0.3s ease;
  display: inline-block;
}
#registerUserModal .terms-group a:hover {
  color: #80d8ff;
}















#shortcutModal .modal-content {
  height: 400px;
  color: #ffffff;
  width: 300px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}
/* Lühiklahvide modaali eripärad */
#shortcutModal h2 {
  color: #00bcd4;
  font-size: 24px;
  text-transform: uppercase;
  margin-bottom: 20px;
  border-bottom: 2px solid #444;
  padding-bottom: 10px;
}
.shortcut-list {
  list-style: none;
  padding-left: 0;
  font-size: 16px;
}
.shortcut-list li {
  padding: 8px 0;
  border-bottom: 1px solid #444;
}
.shortcut-list li strong {
  color: #00bcd4;
  margin-right: 8px;
  font-weight: 600;
}
.settings-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}
.settings-table th,
.settings-table td {
  padding: 15px;
  text-align: center;
  border: 1px solid #444;
}
.settings-table th {
  background-color: #2a2a2a;
  color: #00bcd4;
  font-size: 16px;
  text-transform: uppercase;
}
.settings-table td {
  background-color: #333;
  color: #f2f2f2;
}
.panel-visibility-box {
  background-color: #2a2a2a;
  /* Hall taust */

    /* Kerge vari */
    width: 0px;
  height: 0px;
  display: flex;
  /* Muudab konteineri paindlikuks */
    align-items: center;
  /* Vertikaalne tsentreerimine */
    justify-content: center;
  /* Horisontaalne tsentreerimine */
}
.panel-visibility-box .header-subtitle {
  color: #f2f2f2;
  /* Teksti hele värv loetavuse jaoks */
    font-size: 16px;
  /* Teksti suurus */
    margin: 0;
  /* Eemaldab vaikimisi margini */
}
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #888;
  transition: 0.4s;
  border-radius: 20px;
}
.slider:before {
  position: absolute;
  content: "";
  height: 12px;
  width: 12px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}
.switch input:checked+.slider {
  background-color: #00bcd4;
}
.switch input:checked+.slider:before {
  transform: translateX(20px);
}
.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 24px;
  color: white;
  cursor: pointer;
  transition: color 0.3s ease;
}
.close:hover {
  color: #ff4444;
}
/* About modaali uuendatud paigutus */
#aboutModal {
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}
#aboutModal .modal-content {
  color: #e0e0e0;
  padding: 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 90%;
  max-height: 90vh;
  /* Piirame kõrgust, et vältida kerimist */
    overflow-y: auto;
  /* Lisame kerimise ainult vajadusel */

    border-radius: 10px;
}
#aboutModal h2 {
  font-size: 28px;
  color: #00bcd4;
  margin-bottom: 15px;
  text-transform: uppercase;
  border-bottom: 2px solid #444;
  padding-bottom: 8px;
}
#aboutModal p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
  color: #cccccc;
  max-width: 500px;
}
#aboutModal ul {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  list-style: none;
  padding-left: 0;
  gap: 8px;
}
#aboutModal ul li {
  font-size: 16px;
  color: #e0e0e0;
  background-color: #373636;
  padding: 10px 15px;
  border-radius: 5px;
  width: 100%;
  /* Muudame paindlikumaks */
    max-width: 500px;
  /* Maksimaalne laius */
    display: flex;
  align-items: center;
  gap: 10px;
}
#aboutModal ul li::before {
  content: '✔';
  color: #00bcd4;
  font-weight: bold;
}
#aboutModal .btn-container {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}
#aboutModal .btn-container button {
  padding: 10px 20px;
  font-size: 16px;
  background-color: #00bcd4;
  border: none;
  border-radius: 5px;
  color: white;
  cursor: pointer;
  transition: background-color 0.3s ease;
}
#aboutModal .btn-container button:hover {
  background-color: #008c9e;
}
/* Linkide ja ikoonide stiilid */
#registerLink,
#forgotPasswordLink,
#userIcon,
#shortcutIcon,
#myAnimationsIcon,
#userNameDisplay,
#projectNameBadge,
#saveGifIcon,
#settingsIcon,
#publicGalleryIcon,
#languageIcon {
  font-size: 20px;
  color: #00bcd4;
  cursor: pointer;
  transition: color 0.3s ease;
  margin-right: 15px;
}
#registerLink {
  font-size: 20px;
}
#forgotPasswordLink {
  font-size: 16px;
}
#projectNameBadge {
  display: none;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 12px;
  background: rgba(0, 188, 212, 0.12);
  border: 1px solid rgba(0, 188, 212, 0.45);
  color: #e5f8fb;
  font-weight: 600;
  letter-spacing: 0.2px;
  min-width: 120px;
  text-align: center;
  cursor: pointer;
}
@media (max-width: 1100px) {
  #projectNameBadge {
    display: none;
  }
}
#registerLink:hover,
#forgotPasswordLink:hover,
#languageMenu li:hover {
  color: #008c9e;
}

/* Reset default icon spacing inside the header cluster */
#iconContainer #userIcon,
#iconContainer #shortcutIcon,
#iconContainer #myAnimationsIcon,
#iconContainer #userNameDisplay,
#iconContainer #projectNameBadge,
#iconContainer #saveGifIcon,
#iconContainer #settingsIcon,
#iconContainer #publicGalleryIcon,
#iconContainer #languageIcon {
  margin: 0;
}
/* Keelemenüü */
#languageMenu {
  font-size: 15px;
  display: none;
  position: absolute;
  top: 50px;
  right: 60px;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
  background-color: #1e1e1e;
  color: #e0e0e0;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  transform: translateY(-10px);
}
#languageMenu.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
}
/* Keelemenüü üksused */
#languageMenu li {
  padding: 10px 15px;
  color: #e0e0e0;
  background-color: #2a2a2a;
  border-radius: 5px;
  margin-bottom: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}
/* Hover-efekt keelemenüü üksustele */
#languageMenu li:hover {
  background-color: #00bcd4;
  color: #161515;
}
/* Close Button Styling */
.modal-content .close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 24px;
  color: rgb(186, 186, 186);
  cursor: pointer;
  transition: color 0.3s ease;
}
.modal-content .close:hover {
  color: #ffffff;
}
@keyframes fadeIn {
  from {
  opacity: 0;
}
to {
  opacity: 1;
}

}
/* Failinime modaalakna stiilid */

/* Modal - üldised seaded */
#gifExportModal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  /* Tume taust */
}
#gifExportModal .modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 600px;
  padding: 40px;
  background-color: #1d1d1f;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  color: #e0e0e0;
  font-family: Arial, sans-serif;
}
/* Pealkirja stiil */
#gifExportModal h2 {
  color: #00bcd4;
  font-size: 24px;
  margin-bottom: 20px;
  text-transform: uppercase;
  border-bottom: 2px solid #333;
  padding-bottom: 10px;
  text-align: center;
}
/* Sulgemisnupu stiil */
#gifExportModal .close {
  position: absolute;
  top: 20px;
  right: 20px;
  font-size: 30px;
  color: #9a9a9a;
  cursor: pointer;
  transition: color 0.3s;
}
#gifExportModal .close:hover {
  color: #ffffff;
}
/* Sisendgruppide stiil */
.input-group {
  margin-bottom: 20px;
}
.input-group label {
  display: block;
  font-size: 14px;
  color: #bbbbbb;
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.input-group input[type="text"],
.input-group input[type="number"] {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  color: #f2f2f2;
  background-color: #2c2c2e;
  border: 1px solid #555;
  border-radius: 6px;
  box-sizing: border-box;
  transition: border-color 0.3s;
}
.input-group input[type="text"]:focus,
.input-group input[type="number"]:focus {
  border-color: #00bcd4;
  outline: none;
}

.input-hint.error {
  color: #f87171;
}
/* Märkeruudu stiil */
.checkbox-label {
  display: flex;
  align-items: center;
  font-size: 16px;
  color: #ffffff;
  cursor: pointer;
}
.checkbox-label input[type="checkbox"] {
  margin-right: 10px;
  width: 20px;
  height: 20px;
  accent-color: #00bcd4;
}
/////MY MEDIA DELETE JA DOWNLOAD BUTTONS

.animation-btn-wrapper {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}
#recentColorsPanel {
  display: flex;
  position: fixed;
  width: 70px;
  height: 422px;
  bottom: 200px;
  right: 0px;
  left: 122px;
  top: 200px;
  background-color: rgba(40, 40, 40, 0.95);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1000;
  cursor: grab;
}
.fullscreen #recentColorsPanel {
  bottom: 200px;
  right: 0px;
  left: 5px;
  top: 450px;
}
#recentColorsContainer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
}
#recentColorsContainer .color-box,
#recentColorsContainer .color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid #ffffff00;
  margin: 2px;
  box-sizing: border-box;
}
#transparencyPanel {
  pointer-events: all;
  position: fixed;
  top: 50px;
  right: 160px;
  background-color: rgba(50, 50, 50, 0.85);
  border-radius: 10px;
  padding: 10px 20px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: grab;
  transition: transform 0.3s ease;
  width: 350px;
  height: auto;
  flex-wrap: wrap;
}
.fullscreen #transparencyPanel {
  top: 5px;
  right: 100px;
  height: 40px;
  width: 350px;
  z-index: 10000;
}
#backgroundFilename {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #e5f7ff;
  font-size: 12px;
  font-weight: 600;
  flex: 0 1 160px;
  max-width: clamp(160px, 40vw, 240px);
  min-width: 0;
  margin-left: 6px;
  margin-right: 8px;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(0, 188, 212, 0.25), rgba(0, 188, 212, 0.05));
  border: 1px solid rgba(0, 188, 212, 0.35);
  border-radius: 999px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.background-transform-control {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 4px 0;
}
.background-transform-control input[type="range"] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  background: #4a4a4a;
  border-radius: 9999px;
  outline: none;
}
.background-transform-control span {
  min-width: 50px;
  text-align: right;
  font-size: 12px;
  color: #e7f7ff;
  letter-spacing: 0.02em;
}
.background-transform-control i {
  color: #b7c5cc;
  font-size: 12px;
}
.background-transform-control input[type="range"]::-webkit-slider-runnable-track {
  height: 10px;
  background: #3c3c3c;
  border-radius: 9999px;
}
.background-transform-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #00bcd4;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
  margin-top: -4px;
}
.background-transform-control input[type="range"]::-moz-range-track {
  height: 10px;
  background: #3c3c3c;
  border-radius: 9999px;
}
.background-transform-control input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: #00bcd4;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
}
#transparencyControl i {
  color: #81e6ff;
}
#transparencyControl input[type="range"] {
  background: #3a3a3a;
}
#transparencyControl input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, #303030, #3a3a3a);
}
#transparencyControl input[type="range"]::-moz-range-track {
  background: linear-gradient(90deg, #303030, #3a3a3a);
}
#transparencyControl input[type="range"]::-webkit-slider-thumb,
#transparencyControl input[type="range"]::-moz-range-thumb {
  background: #00e0a5;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
}
#transparencyControl span {
  min-width: 50px;
  text-align: right;
  color: #e7f7ff;
}
#transparencyControl #transparencyRange {
  flex: 1;
  width: 100%;
  min-width: 0;
  -webkit-appearance: none;
  appearance: none;
  height: 10px;
  background: linear-gradient(90deg, #303030, #3a3a3a);
  border-radius: 9999px;
  outline: none;
}
#transparencyControl #transparencyRange::-webkit-slider-runnable-track {
  height: 10px;
  background: linear-gradient(90deg, #303030, #3a3a3a);
  border-radius: 9999px;
}
#transparencyControl #transparencyRange::-moz-range-track {
  height: 10px;
  background: linear-gradient(90deg, #303030, #3a3a3a);
  border-radius: 9999px;
}
#transparencyControl #transparencyRange::-webkit-slider-thumb,
#transparencyControl #transparencyRange::-moz-range-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  background: #00e0a5;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.35);
  margin-top: -4px;
}
#transparencyValue {
  display: inline-block;
  color: #cfd8dc;
  font-size: 12px;
}
#uploadImageBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 10px;
  background-color: #00bbd42d;
  color: white;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s, transform 0.1s;
  font-size: 16px;
}
#uploadImageBtn i {
  font-size: 20px;
}
#uploadImageBtn:hover {
  background-color: #0097a7;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
  transform: scale(1.05);
}
#backgroundControlsToggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(0, 188, 212, 0.35);
  background: rgba(0, 188, 212, 0.12);
  color: #e5f7ff;
  cursor: pointer;
  transition: background-color 0.25s, box-shadow 0.25s, transform 0.1s;
}
#backgroundControlsToggle i {
  font-size: 16px;
}
#backgroundControlsToggle:hover {
  background-color: rgba(0, 188, 212, 0.25);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.35);
  transform: scale(1.04);
}
#backgroundControlsToggle.active {
  background-color: #00bcd4;
  color: #0f1f24;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}
#shareSection {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  gap: 10px;
}


/* 🔒 Üldine "disabled-look" – vaikimisi kõikidele nuppudele, checkboxidele jne */
.disabled-look {
    opacity: 0.5;
    pointer-events: auto;
    cursor: not-allowed;
}

/* 🎛 LIUGURITE ERISTUS: ära kasuta opacity't – säilita liuguri välimus */
input[type="range"].disabled-look {
    opacity: 1; /* tühistab üldise */
    filter: grayscale(100%) brightness(85%);
}

/* 🎚 LIUGURI NUPP (thumb) – ainult toon hallimaks */
input[type="range"].disabled-look::-webkit-slider-thumb {
    filter: grayscale(100%) brightness(85%);
    cursor: not-allowed;
}

input[type="range"].disabled-look::-moz-range-thumb {
    filter: grayscale(100%) brightness(85%);
    cursor: not-allowed;
}




.social-share-btn {
  background-color: #44444400;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s;
}
.social-share-btn:hover {
  background-color: #00bcd4;
}
.color-picker-custom {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(45deg, red, orange, yellow, green, blue, indigo, violet);
  cursor: pointer;
  margin-bottom: 10px;
  border: none;
  /* Ilma ääreta */
}
.color-picker-custom:hover {
  opacity: 0.8;
  /* Kerge läbipaistvus hoveril */
}
/* Panel styling */
.color-panel-icon {
  width: 100px;
  height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
  padding: 10px;
  --palette-icon-color: #555;
}
/* Ikon paneli alaosas */
.color-panel-icon::after {
  content: '\f53f';
  /* Font Awesome värvipaleti ikoon */
    font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 24px;
  color: var(--palette-icon-color, #555);
  margin-top: auto;
  /* Asetab ikooni alla */
    padding: 10px;
}
/* Peidab värvivaliku elemendi, kuid säilitab interaktiivsuse */
#colorPickerRecent {
  width: 100%;
  height: 40px;
  opacity: 0;
  position: absolute;
  bottom: 10px;
  /* Paigutab värvivalija alaossa ikooni peale */
    cursor: pointer;
}
#recentColorsPanel {
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 10px;
}
.playing {
  background-color: #4CAF50;
}
/* Register User Modal Styles */

/* Reset Password Modal */

.color-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  margin: 2px;
  border: 1px solid #ddd;
}
.preselected-color {
  border: 1px solid #333;
  /* Eelvalitud värvide stiil */
}
.user-selected-color {
  border: 1px dashed #999;
  /* Kasutaja poolt valitud värvide stiil */
}
#strokePanel {
  display: flex;
  position: fixed;
  top: 200px;
  right: 122px;
  background-color: rgba(40, 40, 40, 0.95);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 60px;
  height: 420px;
  z-index: 100;
  cursor: grab;
  gap: 16px;
}
.fullscreen #strokePanel {
  bottom: 200px;
  right: 5px;
  top: 460px;
}
#strokeSlider {
  width: 300px;
  height: 10px;
  transform: rotate(-90deg);
  margin: 150px 0;
  appearance: none;
  background-color: #555;
  border-radius: 10px;
  cursor: pointer;
}
#strokeSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  background-color: #0097a7;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
#strokeSlider::-moz-range-thumb {
  width: 30px;
  height: 30px;
  background-color: #4CAF50;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
#strokeSlider::-webkit-slider-thumb:hover,
#strokeSlider::-moz-range-thumb:hover {
  background-color: #00bcd4;
  transform: scale(1.2);
}
#strokeValue {
  color: #f3f5f338;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
}
#dragHandleStroke {
  cursor: move;
  color: #ccc;
  font-size: 1.5em;
  margin-bottom: 10px;
}
#opacityPanel {
  display: flex;
  position: fixed;
  top: 200px;
  right: 122px;
  /* Adjust position to prevent overlap with strokePanel */
    background-color: rgba(40, 40, 40, 0.95);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 60px;
  height: 420px;
  z-index: 100;
  cursor: grab;
  gap: 16px;
}
.fullscreen #opacityPanel {
  bottom: 200px;
  right: 5px;
  top: 460px;
}
#opacitySlider {
  width: 300px;
  height: 10px;
  transform: rotate(-90deg);
  margin: 150px 0;
  appearance: none;
  background-color: #555;
  border-radius: 10px;
  cursor: pointer;
}
#opacitySlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  background-color: #0097a7;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
#opacitySlider::-moz-range-thumb {
  width: 30px;
  height: 30px;
  background-color: #4CAF50;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
#opacitySlider::-webkit-slider-thumb:hover,
#opacitySlider::-moz-range-thumb:hover {
  background-color: #00bcd4;
  transform: scale(1.2);
}
#opacityValue {
  color: #f3f5f338;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
}
#dragHandleOpacity {
  cursor: move;
  color: #ccc;
  font-size: 1.5em;
  margin-bottom: 10px;
}
#shadowBlurPanel {
  display: flex;
  position: fixed;
  top: 200px;
  /* Adjust as needed */
    right: 15px;
  /* Adjust to prevent overlap with other panels */
    background-color: rgba(40, 40, 40, 0.95);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  width: 60px;
  height: 420px;
  z-index: 100;
  cursor: grab;
  gap: 16px;
}
.fullscreen #shadowBlurPanel {
  bottom: 200px;
  right: 100px;
  top: 460px;
}
#shadowBlurSlider {
  width: 300px;
  height: 10px;
  transform: rotate(-90deg);
  margin: 150px 0;
  appearance: none;
  background-color: #555;
  border-radius: 10px;
  cursor: pointer;
}
#shadowBlurSlider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 30px;
  height: 30px;
  background-color: #b19f45;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
#shadowBlurSlider::-moz-range-thumb {
  width: 30px;
  height: 30px;
  background-color: #4CAF50;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}
#shadowBlurSlider::-webkit-slider-thumb:hover,
#shadowBlurSlider::-moz-range-thumb:hover {
  background-color: #00bbd400;
  transform: scale(1.2);
}
#shadowBlurValue {
  color: #f3f5f338;
  font-size: 20px;
  font-weight: bold;
  text-align: center;
}
#dragHandleShadowBlur {
  cursor: move;
  color: #ccc;
  font-size: 1.5em;
  margin-bottom: 10px;
}
#tweenBtn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #3a3a3a;
  color: #ffffff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 16px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: background-color 0.3s, box-shadow 0.3s, transform 0.1s;
}
#tweenBtn:hover {
  background-color: #555;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
  transform: scale(1.05);
}
.frame {
  border: 2px solid transparent;
  padding: 10px;
  cursor: pointer;
}
.frame.selected {
  border-color: #007bff;
  /* Valitud kaadritele sinine ääris */
    background-color: rgba(0, 123, 255, 0.1);
}
.profile-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 10px;
}
#profilePicture {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #ffffff;
}
#profileText {
  font-size: 26px;
  color: #00bcd4;
  margin-top: 20px;
  letter-spacing: 1px;
  font-weight: 500;
}
.brand-slogan {
  font-size: 14px;
  margin: 6px 0 10px;
  color: #cccccc;
  letter-spacing: 0.5px;
}
.login-footer {
  display: flex;
  flex-direction: column;
  /* Asetab lingid üksteise alla */
    align-items: center;
  /* Keskele joondamine */
    justify-content: center;
  text-align: center;
  /* Tagab, et tekst on joondatud */
    gap: 10px;
  /* Vahe elementide vahel */
    margin-top: 20px;
  /* Lisab ruumi ülemisele osale */
    width: 100%;
}
.login-footer a {
  color: #00bcd4;
  font-size: 14px;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease-in-out;
}
.login-footer a:hover {
  color: #008c9e;
  text-decoration: underline;
}
/* Veateade keskele */
.login-error {
  text-align: center;
  color: red;
  font-size: 14px;
  margin-top: 10px;
}
#forgotPasswordLink {
  font-size: 12px;
  /* Väiksem tekst */
    color: #aaa;
  /* Veidi hallikam toon, et oleks tagasihoidlik */
    text-decoration: none;
  /* Eemaldab allajoonimise */
}
#forgotPasswordLink:hover {
  color: #fff;
  /* Hoveril muutub heledamaks */
    text-decoration: underline;
  /* Lisab allajoonimise */
}
/* Veateate konteiner fikseeritud kõrgusega */
.login-error-container {
  height: 20px;
  /* Piisavalt ruumi ühe tekstirea jaoks */
    display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  margin-top: 10px;
}
/* Veateade on alguses peidus */
.login-error {
  color: red;
  font-size: 14px;
  visibility: hidden;
  /* Veateade peidetud, aga ruum jääb alles */
}
/* Kui veateade ilmub, muutub see nähtavaks */
.login-error.show {
  visibility: visible;
}
.settings-container {
  display: flex;
  flex-direction: column;
  /* Muudab paigutuse vertikaalseks */
    align-items: center;
  /* Joondab elemendid keskele */
    gap: 15px;
  /* Lisab väikese vahe teksti ja ikooni vahele */
    margin-top: 15px;
  /* Lisaruumi ülemise sisu ja setting ikooni vahel */
}
.settings-text {
  font-size: 16px;
  color: #00bcd4;
  font-weight: bold;
  text-align: center;
}
.settings-icon {
  font-size: 24px;
  color: #00bcd4;
  cursor: pointer;
  transition: transform 0.3s ease-in-out;
  display: none;
  /* Peidame vaikimisi */
}
.settings-icon:hover {
  transform: rotate(90deg);
  color: #008c9e;
}
#upgradePlanBtn {
  position: relative;
  overflow: hidden;
  background-color: #FFCC00;
  color: #222222;
  font-size: 14px;
  font-weight: 600;
  padding: 15px 26px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(255, 204, 0, 0.3);
  transition: all 0.3s ease-in-out;
  /* UUS! */
    margin: 30px auto 20px auto;
  /* rohkem ruumi ülevalt ja alt */
    display: inline-block;
}
/* Hover ja aktiivne efekt jääb samaks */
#upgradePlanBtn:hover {
  background-color: #d4a600;
  /* Tumedam kollane hoveri jaoks */
    box-shadow: 0 6px 14px rgba(255, 204, 0, 0.5);
  transform: translateY(-2px);
}
#upgradePlanBtn:active {
  transform: scale(0.98);
  box-shadow: 0 2px 6px rgba(255, 204, 0, 0.4);
}
/* Läike efekt */
#upgradePlanBtn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  /* Alguses ekraanilt väljas */
    width: 100%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.8) 50%, rgba(255, 255, 255, 0.2) 100%);
  transform: skewX(-30deg);
  /* Kergelt viltune */
    animation: shine 3s infinite ease-in-out;
  /* Efekt kordub lõputult */
}
/* Keyframes animatsioon */
@keyframes shine {
  0% {
  left: -100%;
}
50% {
  left: 100%;
}
100% {
  left: 100%;
}

}
#newFeaturesNotice {
  background-color: #333;
  color: #4CAF50;
  border: 1px solid #4CAF50;
  border-radius: 8px;
  padding: 10px;
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  display: none;
  /* vaikimisi peidetud */
}
.notice-visible {
  display: block !important;
}
.notice-hidden {
  display: none !important;
}
/* Kontaktimodal – kohandatud välimus */
.support-modal-content {
  max-width: 500px;
  width: 90%;
  background-color: #1e1e1e;
  border: 1px solid #00bcd4;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  color: #f2f2f2;
  text-align: center;
  animation: fadeIn 0.3s ease forwards;
}
.support-modal-content h3 {
  margin-top: 0;
  font-size: 20px;
  color: #00bcd4;
  margin-bottom: 20px;
}
.support-modal-content textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #333;
  background-color: #2c2c2c;
  color: #fff;
  font-size: 14px;
  resize: none;
  margin-bottom: 20px;
}
.support-modal-content button {
  padding: 10px 20px;
  background-color: #00bcd4;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.support-modal-content button:hover {
  background-color: #008c9e;
}
////login akna user email nime alla firebasest

.user-email {
  font-size: 14px;
  color: #bbb;
  margin: -4px 0 10px 0;
  font-weight: 400;
}
////MUUDA PAROOLI VÕI KUSTUTA KONTO 

  .account-actions {
  margin-top: 25px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.account-actions a {
  font-size: 14px;
  color: #00bcd4;
  text-decoration: none;
  transition: opacity 0.2s ease;
}
.account-actions a:hover {
  opacity: 0.8;
}
.account-actions a.danger {
  color: #ff5252;
}
#userPlan {
  margin-top: 6px;
  font-size: 13px;
  color: #00bcd4;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
}
/////USERPROFILE delete konto ja muuda parooli

  .account-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  /* rohkem ruumi ülalpoolt */
}
.account-actions a {
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  background-color: #2d2d2d;
  color: #00bcd4;
  transition: background-color 0.3s, transform 0.2s;
  text-align: center;
  width: 200px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
.account-actions a:hover {
  background-color: #3b3b3b;
  transform: scale(1.02);
}
.account-actions a.danger {
  background-color: #4a1c1c;
  color: #ff5252;
}
.account-actions a.danger:hover {
  background-color: #661c1c;
}
///user profile peal liigutasin pildi nime ja plan-i allapoole

  #profilePicture {
  margin-top: 20px;
  /* või rohkem, nt 20px kui soovid suuremat nihet */
}
#profileText {
  display: block;
  margin-top: 10px;
}
#userPlan {
  margin-top: 6px;
  font-size: 14px;
  color: #cccccc;
  cursor: pointer;
}
.account-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.account-actions a {
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 13px;
  text-decoration: none;
  text-align: center;
  display: inline-block;
  transition: all 0.2s ease;
  min-width: 120px;
}
#changePasswordLink {
  background-color:rgb(8, 75, 20);
  color:rgb(255, 255, 255);
}
#changePasswordLink:hover {
  background-color: #444;
}
#deleteAccountLink {
  background-color:rgba(215, 39, 39, 0.32);
  color:rgb(255, 255, 255);
  transition: background-color 0.2s ease;
}
#deleteAccountLink:hover {
  background-color: #5c1e1e;
  color: #ffcccc;
}
.logout-wrapper {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}
#logoutButton {
  background-color:rgba(20, 213, 239, 0.69);
  color: white;
  padding: 15px 2px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0);
  transition: background-color 0.2s ease;
  width: 300px;
  max-width: 100%;
  text-align: center;
}
#logoutButton:hover {
  background-color: #009eb2;
}
.modal-action-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  background-color: #00bcd4;
  color: #fff;
  transition: background-color 0.3s ease;
}
.modal-action-btn:hover {
  background-color: #0097a7;
}
.modal-action-btn.danger {
  background-color: #e53935;
}
.modal-action-btn.danger:hover {
  background-color: #b71c1c;
}
.modal-action-btn.secondary {
  background-color: #555;
}
.modal-action-btn.secondary:hover {
  background-color: #333;
}
//// SEE ON SEE MODAL MIS AVANEB SIIS KUI KASUTAJA ON SISSE LOGINUD JA VAJUTAB OMA NIME PEALE

.user-profile-modal {
  max-width: 420px;
  padding: 40px 30px;
  border-radius: 16px;
  background: #1e1e1e;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
  border: 1px solid #00bcd4;
  text-align: center;
  animation: fadeInScale 0.3s ease-out forwards;
}
/* Mobile: give the profile modal breathing room and a visible close button */
@media (max-width: 820px) {
  #userProfileModal {
    padding: calc(env(safe-area-inset-top, 0px) + 12px) 10px calc(env(safe-area-inset-bottom, 0px) + 14px);
    align-items: flex-start;
  }
  #userProfileModal .modal-content {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
    max-height: calc(100vh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 24px);
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: #11161d;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55);
  }
  #userProfileModal .modal-content.user-profile-modal {
    width: min(92vw, 340px);
    max-width: 340px;
    padding: 24px 18px 28px;
    margin: 6px auto 0;
    border-radius: 14px;
    border-color: rgba(255, 255, 255, 0.08);
    background: #11161d;
  }
  #userProfileModal .close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    font-size: 20px;
    color: #e6f6ff;
    background: rgba(0, 188, 212, 0.12);
    border-radius: 50%;
    line-height: 1;
  }
  #userProfileModal .close:hover,
  #userProfileModal .close:focus {
    color: #ffffff;
    background: rgba(0, 188, 212, 0.22);
  }
  #userProfileModal .profile-picture-modal {
    width: 90px;
    height: 90px;
    margin-top: 6px;
  }
  #userProfileModal .profile-name {
    font-size: 22px;
    margin: 10px 0 8px;
  }
  #userProfileModal .membership-tag {
    margin-bottom: 12px;
  }
  #userProfileModal .modal-button-group button {
    padding: 12px 14px;
    font-size: 16px;
    border-radius: 12px;
  }
}
@keyframes fadeInScale {
  from {
  opacity: 0;
  transform: scale(0.95);
}
to {
  opacity: 1;
  transform: scale(1);
}

}
.profile-name {
  font-size: 24px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 10px;
}
/* Ühine klass kõigile märgistele */
.membership-tag {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 12px;
  font-weight: bold;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
/* PREMIUM kuupõhine – kuldne taust, must tekst */
.membership-tag.premium-monthly {
  background: linear-gradient(to right, #FFD700, #FFB800);
  color: #000 !important
}
/* PREMIUM aastapõhine – sinine taust, must tekst */
.membership-tag.premium-yearly {
  background: linear-gradient(to right, #BBDEFB, #64B5F6);
  /* heledam sinine gradient */
    color: #000 !important
}
/* SUPPORT roheline taust, valge tekst */
.membership-tag.support {
  background: linear-gradient(to right, #4CAF50, #2E7D32);
  color: #fff !important;
  cursor: default;
}
/* Läikeefekt */
.membership-tag.shiny::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  height: 100%;
  width: 100%;
  background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.5) 50%,
        rgba(255, 255, 255, 0) 100%
    );
  transform: skewX(-20deg);
  animation: shine 3s infinite;
}
/* Läike animatsioon */
@keyframes shine {
  0% {
  left: -100%;
}
100% {
  left: 100%;
}

}
.btn-upgrade {
  background: linear-gradient(135deg, #FFD700, #FFEB3B);
  color: #333;
  border: none;
  border-radius: 12px;
  padding: 14px 20px;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
  margin-bottom: 25px;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.btn-upgrade:hover {
  transform: scale(1.05);
}
.modal-button-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  align-items: center;
}
#userProfileModal .modal-button-group button {
  width: 100%;
  margin: 0 !important;
}
#userProfileModal .modal-button-group .premium-upgrade-btn {
  margin: 0 !important;
}
#userProfileModal .modal-button-group p {
  margin: 0;
  color: #cdd5d8;
  font-size: 13px;
  display: none;
}
.modal-button-group p:not(:empty) {
  display: block;
}
.btn-safe {
  background-color: #2e7d32;
  color: #fff;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s;
}
.btn-safe:hover {
  background-color: #388e3c;
  transform: scale(1.02);
}
.btn-danger {
  background-color: #772727;
  color: #fff;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s;
}
.btn-danger:hover {
  background-color: #b71c1c;
  transform: scale(1.02);
}
.btn-neutral {
  background-color: #4e8ca3;
  color: #fff;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s;
}
.btn-neutral:hover {
  background-color: #357a91;
  transform: scale(1.02);
}
#profilePlan.premium {
  position: relative;
  background: linear-gradient(90deg, #FFD700, #FFB700);
  color: #000 !important;
  font-weight: bold;
  padding: 6px 16px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 1px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}
/* Läike-element */
#profilePlan.premium::before {
  content: '';
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0.2) 100%);
  transform: skewX(-20deg);
  animation: shimmer 3s infinite;
}
/* Läike animatsioon */
@keyframes shimmer {
  0% {
  left: -75%;
}
50% {
  left: 100%;
}
100% {
  left: 100%;
}

}
/////welcomemodal
/////welcomemodal
/////welcomemodal
/////welcomemodal
/////welcomemodal
/////welcomemodal

  .show-modal {
  display: flex;
}
.welcome-container {
  margin: auto;
  text-align: center;
  background-color: #2a2a2a;
  padding: 50px 30px;
  border-radius: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
  max-width: 420px;
  width: 90%;
  font-family: 'Roboto', sans-serif;
  color: white;
  position: relative;


}

html, body {
  height: 100%;
}

@media (min-width: 769px) {
  html, body {
    overflow: hidden !important;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    overflow-y: auto !important;
  }
}












#welcomeModal {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  overflow: hidden !important;
  z-index: 9999;
  display: none; /* avamisel pannakse flexiks */
  background-color: rgba(0, 0, 0, 0.7); /* kui ei ole veel */
}

.welcome-container {
  max-height: 90vh; /* oluline! */
  overflow-y: auto; /* ainult sisemise sisu scroll, kui vaja */
}

.welcome-logo {
  max-width: 60px;
  margin: 20px auto 25px;
  display: block;
  pointer-events: none;
}

/* Next-step hint */
.next-step-hint {
  position: fixed;
  bottom: 120px;
  right: 40px;
  background: linear-gradient(135deg, #1f1f1f, #2a2a2a);
  color: white;
  padding: 24px 28px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  max-width: 340px;
  z-index: 9999;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.next-step-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 18px;
}
.next-step-title .accent {
  color: #00e6b8;
}
.next-step-row {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}
.next-step-emoji {
  font-size: 20px;
}
.next-step-kbd {
  background: #444;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.next-step-link {
  color: #00e6b8;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}
.next-step-actions {
  text-align: right;
}
.next-step-btn {
  background: #00bcd4;
  color: white;
  padding: 8px 14px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
  transition: background 0.2s ease;
}
.next-step-btn.hover,
.next-step-btn:hover {
  background: #00acc1;
}
.welcome-title {
  font-size: 26px;
  margin: 0;
  color: #00bcd4;
}
.welcome-slogan {
  font-size: 14px;
  margin: 5px 0 15px;
  color: #cccccc;
  letter-spacing: 0.5px;
}
.star-rating {
  color: gold;
  font-size: 14px;
  margin-bottom: 25px;
}
.media-section {
  position: relative;
  margin-bottom: 30px;
}
.welcome-gif,
.welcome-video {
  width: 100%;
  border-radius: 12px;
  display: block;
}
.welcome-video {
  display: none;
}
.video-wrapper {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 30px;
}
.video-overlay {
  position: absolute;
  bottom: 0;
  left: 10px;
  right: 10px;
  background: rgba(0, 187, 212, 0);
  border: 1px solid rgba(0, 187, 212, 0);
  border-radius: 12px;
  padding: 10px 15px;
  font-size: 22px;
  color: #ffffff;
  text-align: center;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.overlay-visible {
  opacity: 1;
  transform: translateY(0);
}
.overlay-hidden {
  opacity: 0;
  transform: translateY(10px);
}
.start-button {
  min-width: 130px;
  padding: 14px 40px;
  font-size: 16px;
  font-weight: bold;
  background-color: #00bcd4;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.3);
  transition: all 0.3s ease;
}
.language-selector {
  margin: 15px auto 10px;
  display: flex;
  justify-content: center;
  gap: 16px;
}
.flag-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  object-fit: cover;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
}
.video-controls {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 20px;
}
.video-btn {
  background: none;
  border: none;
  cursor: pointer;
}
.stop-icon {
  font-size: 44px;
  color: #d6b560;
}
#welcomeModal i {
  font-size: 48px;
  color: #00bcd4;
}
.link-paragraph,
.login-paragraph {
  margin-top: 10px;
  font-size: 12px;
  color: #bbb;
}
.link {
  color: #00bcd4;
  text-decoration: underline;
}
.video-timecode {
  display: none;
  position: absolute;
  bottom: 1px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0);
  color: #ffffff;
  font-family: monospace;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 6px;
  z-index: 20;
  pointer-events: none;
}
.footer-note {
  font-size: 11px;
  color: #888888;
  margin-top: 30px;
}







@media (max-width: 850px) {
  #frameControlPanel {
    top: 100px;
    right: 250px;
  }
  #fpsPanel {
    top: 700px;
    right: 10px;
  }
  #toolPanel {
    top: 45px;
    left: 0px;
  }
  #recentColorsPanel {
    top: 500px;
    left: 10px;
  }
  #opacityPanel {
    top: 45px;
    right: 10px;
  }
  #thicknessPanel {
    top: 500px;
    right: 10px;
  }
  #strokePanel {
    top: 0px;
    right: 0px;
  }
  #controlPanel {
    position: fixed;
    top: 45px;
    left: 200px;
  }
  #transparencyPanel {
    top: 200px;
    left: 200px;
    right: 10px;
  }
  #frameCarousel {
    bottom: 30px;
    left: 10px;
    right: 10px;
    height: auto;
    gap: 5px;
  }
  #frameCounter {
    bottom: 0px;
    left: 4000px;
  }
  #canvasContainer {
    height: 45vh;
    max-height: 420px;
  }
  .frame-preview {
    width: 60px;
    height: 40px;
  }
}
/// ei näita kui kasutaja pole sisse loginud

#saveGifIcon {
  display: none;
  /* vaikimisi peidetud */
}
/* Style for register and forgot password buttons */
.login-link-button {
  display: inline-block;
  padding: 10px 16px;
  margin: 8px 4px 0;
  background-color: #00bcd4;
  color: white;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 188, 212, 0.3);
}
.login-link-button:hover {
  background-color: #0097a7;
  box-shadow: 0 4px 12px rgba(0, 188, 212, 0.4);
}












.register-btn {
    background-color: #ffd700;
    color: #000;
    font-weight: 800;
    text-transform: uppercase;
    border: none;
    border-radius: 12px;
    padding: 14px 22px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.2s ease, background-color 0.3s ease;
}

.register-btn:hover {
    transform: scale(1.05);
    background-color: #f9c400;
}
