body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
  display: none;
}

.popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  z-index: 2;
  text-align: center;
  width: 80%;
  max-width: 400px;
  display: none;
}

.popup img {
  width: 100px;
  margin: 0 auto 10px;
  display: block;
}

.popup h2 {
  font-weight: bold;
  margin-top: 0;
}

.popup p {
  margin-bottom: 10px;
}

.popup .small-text {
  font-size: 16px;
  color: #555;
  line-height: 1.6;
}

.popup .button {
  background-color: #ffd814;
  color: black;
  padding: 15px 0;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  width: 100%;
  display: inline-block;
  text-decoration: none;
}

.button-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.button-container .button {
  margin-bottom: 10px;
}

@media (max-width: 600px) {
  .popup {
    width: 90%;
  }
}

.desktop-view {
  display: block;
}

.mobile-view {
  display: none;
}

@media (max-width: 768px) {
  .desktop-view {
    display: none;
  }

  .mobile-view {
    display: block;
  }
}


/* ==========================================================================
   iOS Style Notification & Alert System (Ported from APPLE-NOTI)
   ========================================================================== */

#ios-notification-container {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translate(-50%, -150%) scale(0.85);
    opacity: 0;
    width: 95%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(30px) saturate(150%);
    -webkit-backdrop-filter: blur(30px) saturate(150%);
    border-radius: 32px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    z-index: 9999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    transition: transform 0.6s cubic-bezier(0.34, 1.2, 0.64, 1), opacity 0.4s ease-out;
    overflow: hidden;
    padding: 14px 16px;
    box-sizing: border-box;
    border: 0.5px solid rgba(0, 0, 0, 0.05);
    color: #000 !important;
    cursor: pointer;
}

#ios-notification-container.show {
    transform: translate(-50%, 0) scale(1);
    opacity: 1;
}

.ios-notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.ios-notification-header-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ios-app-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ios-app-name {
    font-size: 13px;
    color: #000;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.ios-time {
    font-size: 13px;
    color: #888;
    font-weight: 400;
}

.ios-notification-body {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.ios-notification-content {
    flex: 1;
}

.ios-notification-title {
    font-size: 16px;
    font-weight: 600;
    color: #000;
    margin-bottom: 4px;
    letter-spacing: -0.2px;
}

.ios-notification-text {
    font-size: 15px;
    color: #000;
    line-height: 1.4;
    padding-right: 8px;
    letter-spacing: -0.2px;
}

.ios-notification-text span {
    color: #1461B6; /* iOS blue link color */
}

.ios-notification-text u {
    color: #000;
    text-decoration: underline;
}

.ios-notification-image {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.ios-notification-image img {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: contain;
    background-color: transparent;
}

/* Custom iOS Alert Popup Overlay (Center) */
#ios-alert-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 9999998;
    align-items: center;
    justify-content: center;
}

#ios-alert-overlay.show {
    display: flex;
}

#ios-alert-box {
    background-color: rgba(60, 60, 63, 0.85);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    width: 330px;
    border-radius: 28px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    padding: 24px 16px 16px 16px;
    box-sizing: border-box;
    border: 0.5px solid rgba(255, 255, 255, 0.1);
    color: #FFF;
}

.ios-alert-message {
    font-size: 16px;
    color: #FFF;
    line-height: 1.4;
    font-weight: 400;
    margin-bottom: 24px;
    padding: 0 8px;
    text-align: center;
    letter-spacing: -0.2px;
}

.ios-alert-message br {
    display: block;
    margin-bottom: 2px;
}

.ios-alert-buttons-row {
    display: flex;
    gap: 12px;
    margin-bottom: 2px;
}

.ios-alert-btn-row {
    flex: 1;
    padding: 0;
    font-size: 17px;
    font-weight: 600;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    transition: opacity 0.2s, background-color 0.2s;
    text-decoration: none;
}

.ios-alert-btn-row.cancel {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.25);
    font-weight: 500;
}

.ios-alert-btn-row.ok {
    color: #fff;
    background-color: #3B82F6;
    font-weight: 600;
}

.ios-alert-btn-row:active {
    opacity: 0.8;
}

/* Second Alert Styles */
#ios-second-alert-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 9999998;
    align-items: center;
    justify-content: center;
}

#ios-second-alert-overlay.show {
    display: flex;
}

#ios-second-alert-box {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    width: 320px;
    border-radius: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    text-align: center;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 20px 16px 16px;
    box-sizing: border-box;
}

.ios-second-alert-message {
    font-size: 15px;
    color: #111;
    line-height: 1.4;
    margin-bottom: 20px;
}

.ios-second-alert-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ios-second-alert-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    background-color: #007aff;
    color: #fff;
    cursor: pointer;
}

.ios-second-alert-btn.cancel {
    background-color: #e5e5ea;
    color: #007aff;
    font-weight: 500;
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
    .ios-app-name,
    .ios-notification-title,
    .ios-notification-text,
    .ios-notification-text u {
        color: #000 !important;
    }
    .ios-notification-text span {
        color: #1461B6 !important;
    }
    #ios-notification-container {
        background: rgba(255, 255, 255, 0.95) !important;
    }
}
