* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    background: #000;
    color: #fff;
    font-family: 'Roboto Mono', monospace;
    overflow: hidden;
/* S.Z. commented this to allow select and copy from FACTATUM webpage:
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
*/
}

/* Fonts */
@import url('https://fonts.googleapis.com/css2?family=Workbench&display=swap');

/* Main Content */
.content-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    padding: 20px;
    z-index: 10;
}

#install-button {
  display: block;
  width: 150px;
  max-width: 80%;
  height: auto;
  cursor: pointer;
}

#dynamic-text {
    font-family: 'Roboto Mono', monospace;
    font-weight: 300;
    line-height: 1.6;
    text-align: center;
    text-shadow:
        0 0 5px rgba(255, 255, 255, 0.4),
        0 0 10px rgba(255, 255, 255, 0.3);
    animation: pulse-glow 4s ease-in-out infinite;
}

.dud {
    color: #757575;
}

/* Timer and Background */
.timer-container {
    position: absolute;
    bottom: -3vh; /* desk */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 200px;
    height: 200px;
}

canvas {
    position: absolute;
    width: 100%;
    height: 100%;
    filter: blur(1vmin) brightness(4);
    z-index: 1;
}

.timer {
    position: relative;
    text-align: center;
    color: black;
    font-family: "Workbench", sans-serif;
    font-size: 32px;
    z-index: 3;
    mix-blend-mode: exclusion;
    filter: invert() drop-shadow(0 0 5px white);
    top: 4px;
}

/* --- CHANGED: Unified font size rules --- */

/* Base font size for mobile devices */
#dynamic-text,
.popup-text-content {
    font-size: 18px;
}

/* Responsiveness */
@media (min-width: 769px) {
    /* Font size for desktop versions */
    #dynamic-text,
    .popup-text-content {
        font-size: 26px;
    }
}


@media (max-width: 768px) {
    .timer-container {
        width: 180px;
        height: 180px;
        bottom: -4vh; /* mob */
    }

    .timer {
        font-size: 28px;
    }
}

/* Animations */
@keyframes pulse-glow {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

@keyframes smooth-fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* --- Final Popup Styles --- */

.popup-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease;
}
.popup-container.active {
    display: flex;
    opacity: 1;
}

/* Content Box */
.popup-box {
    background: #000;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 40px 50px;
    width: 90%;
    max-width: 650px;
    margin: 0 auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0);
    transition:
      transform 1s cubic-bezier(0.25,1,0.5,1),
      opacity   1s ease,
      border    1s ease;
}

.popup-container.active .popup-box {
    transform: scale(1);
}

/* Styles for text inside the popup */

/* Base styles for the entire text block */
.popup-text-content {
    font-family: 'Roboto Mono', monospace;
    font-weight: 300;
    color: #fff;
    line-height: 1.7;
    text-align: center;
    margin: 0;
}

/* Highlight the brand with a different font and glow */
.popup-text-content .brand {
    font-family: 'Workbench', sans-serif;
    font-weight: 400;
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 220, 150, 0.7);
}

/* Make the key adjectives italic and slightly brighter */
.popup-text-content .highlight {
    font-style: italic;
    color: #f0f0f0;
}

/* Emphasize the frequency */
.popup-text-content .frequency {
    font-weight: 700;
    color: #eee;
}

/* Style the tagline */
.popup-text-content .tagline {
    margin-top: 20px;
    opacity: 0.8;
    font-size: 0.9em;
}

/* Remove pulsation from the general text so it doesn't distract from the accents */
.popup-box p {
    animation: none;
    text-shadow: none;
}

/*
 * Share button
 */
.share-icon {
    position: fixed;
    top: 20px;
    right: 25px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 998;
    transition: background-color 0.3s;
}

.share-icon:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

.share-icon span {
    display: block;
    width: 4px;
    height: 4px;
    background-color: white;
    border-radius: 50%;
    margin: 0 1.5px;
}

/*
 * Generator Container
 */
#image-generator-container {
    position: fixed;
    top: 0;
    left: -9999px; /* <<< Hide block! */
    width: 1280px;
    height: 1040px;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 50px;
}

#image-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-family: 'Roboto Mono', monospace;
    font-weight: 300;
    line-height: 1.6;
    text-align: center;
}

#image-fact-text {
    font-size: 55px;
    max-width: 90%;
    text-shadow:
        0 0 5px rgba(255, 255, 255, 0.4),
        0 0 10px rgba(255, 255, 255, 0.4),
        0 0 20px rgba(255, 255, 255, 0.4),
        0 0 40px rgba(12, 114, 255, 0.5),
        0 0 70px rgba(12, 114, 255, 0.5);
}

.image-footer {
    position: absolute;
    bottom: 40px;
    display: flex; /*  */
    align-items: center; /*  */
    gap: 5px; /*  */
    left: 50%;
    transform: translateX(-50%); /*  */
}

.image-footer .by-text {
    font-size: 28px; /* "by" */
    font-family: 'Roboto Mono', monospace; /*  */
    font-weight: 300;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
}

.image-footer .brand-text {
    font-size: 32px; /* "Factatum.com" */
    font-family: 'Workbench', sans-serif; /*  */
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.4);
}

/*
 * Action menu
 */
.share-options-menu {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1999;
    display: none;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0); /* match popup */
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 1s ease;
}

.share-options-menu.active {
    display: flex;
    opacity: 1;
}

.menu-close-area {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 2000;
}

.share-options-menu ul {
    list-style: none;
    margin: 0;
    padding: 8px;
    /*  */
    background-color: #0a0a0a;       /* black */
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    width: 250px;
    z-index: 2001;
}

.share-options-menu li {
    padding: 14px 20px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 8px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.share-options-menu li:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.share-options-menu li:hover {
    background-color: #242426;
}

.share-options-menu li.disabled {
    color: #555;
    cursor: not-allowed;
    background-color: transparent;
}

.share-icon.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none; /* click off */
}

.share-options-menu,
.popup-container {
  display: flex !important;
  visibility: visible !important;
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 1s ease,
    transform 1s ease;
}

.share-options-menu.active,
.popup-container.active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.share-options-menu,
.popup-container {
  will-change: opacity, transform;
}

.share-options-menu,
.popup-container {
  transition: opacity 1s ease;
}
.share-options-menu.active,
.popup-container.active {
  opacity: 1;
}

.share-options-menu.loading #share-spinner {
  display: block;
}
.share-options-menu.loading ul {
  display: none;
}

.app-container {
  padding-top: env(safe-area-inset-top);
}