@font-face {
  font-family: 'Segoe UI';
  src: url('/assets/fonts/segoeuil.ttf') format('truetype');
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

:root {
  --lg-accent-h: 210;
  --lg-accent-s: 80%;
  --lg-accent-l: 60%;
  --lg-accent: var(--lg-accent-h) var(--lg-accent-s) var(--lg-accent-l);
}

html {
    font-family: 'Segoe UI';
    font-size: 16px;
    background-color: rgb(18, 22, 24);
    color: #dddddd;
}

* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI';
    font-weight: 300;
    letter-spacing: 0.5px;
    line-height: 1.4;
    color: #dddddd;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    touch-action: manipulation;
    font-family: 'Segoe UI';
    background-color: rgb(18, 22, 24);
    color: #dddddd;
}

body {
    font-family: 'Segoe UI';
    background: url('/assets/images/background.png') center center no-repeat;
    background-attachment: scroll;
    background-size: cover;
    color: #dddddd;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    overflow: hidden;
    animation: fadeInPage 0.8s ease-in-out;
}

@keyframes fadeInPage {
    from { opacity: 0; background-color: black; }
    to { opacity: 1; background-color: rgb(18, 22, 24); }
}

header.glass {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: linear-gradient(90deg, rgba(18,22,24,0.85) 0%, rgba(34,34,34,0.65) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow:
      inset 0 1.5px 0 hsl(0 0% 95% / 0.45),
      0 5px 19px rgba(0, 0, 0, 0.4);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dddddd;
    font-size: 1.25rem;
    font-weight: 500;
    user-select: none;
}


.container {
    font-family: 'Segoe UI';
    position: relative;
    margin: 0 auto;
    top: -3px; 
    bottom: 0;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 20px;
    max-width: 620px;
    width: 100%;
    color: #dddddd;
    text-align: center;
    overflow: visible;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1;
    align-self: center;
    border-radius: 28px;
    
box-shadow:
  inset 3px 3px 4px hsl(0 0% 100% / 0.4),      
  inset -3px -3px 4px rgba(0, 0, 0, 0.4),      
  0 5px 19px rgba(0, 0, 0, 0.4);               
    border: none;
    outline: 1px solid rgba(255, 255, 255, 0.18);
    outline-offset: -1px;
    backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    -webkit-backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    background:
      radial-gradient(120% 100% at 50% -40%, hsl(0 0% 100% / 0.08) 0%, hsl(0 0% 100% / 0) 60%),
      linear-gradient(180deg, hsl(0 0% 100% / 0.05) 0%, hsl(0 0% 0% / 0.05) 100%),
      linear-gradient(90deg, rgba(0, 100, 200, 0.15), rgba(0, 150, 255, 0.12)),
      rgba(0, 100, 200, 0.12);
    background-blend-mode: screen, soft-light;
    transition: background 0.35s ease, box-shadow 0.35s ease;
    filter: url(#liquidGlass);
    background-image:
      radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08), transparent 60%),
      radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.04), transparent 60%);
    background-blend-mode: overlay;
}

.container::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 28px;
    pointer-events: none;
}

h1 {
    font-family: 'Segoe UI';
    font-size: clamp(1.9rem, 5vw, 2.5rem);
    color: #fafafa; 
    font-weight: 700; 
    margin-bottom: 20px;
    letter-spacing: 0.6px; 
    text-shadow: none; 
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25)); 
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

p {
    font-family: 'Segoe UI';
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: #dddddd;
}


 .joke-box {
    font-family: 'Segoe UI';
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: clamp(16px, 2vw, 20px);
    margin: 20px 0 33px;
    color: #dddddd;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    overflow: hidden;
    width: 100%;
    max-width: 520px;
    word-wrap: break-word;
    white-space: normal;
    text-overflow: ellipsis;
    text-align: center;
    align-items: center;
    justify-content: center;
    display: flex;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
    flex-shrink: 0;
    will-change: contents;
    flex: 0 0 auto;
    contain: strict;
    flex-direction: row;
    flex-wrap: wrap;
    border-radius: 28px;
    box-shadow:
    inset 0 1.5px 0 hsl(0 0% 95% / 0.45), 0 5px 19px rgba(0, 0, 0, 0.4);    
    border: none;
    outline: 1px solid rgba(255, 255, 255, 0.18);
    outline-offset: -1px;
    backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    -webkit-backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    background-clip: border-box;
    -webkit-background-clip: border-box;
    background:
      radial-gradient(120% 100% at 50% -40%, hsl(0 0% 100% / 0.08) 0%, hsl(0 0% 100% / 0) 60%),
      linear-gradient(180deg, hsl(0 0% 100% / 0.05) 0%, hsl(0 0% 0% / 0.05) 100%),
      linear-gradient(90deg, rgba(0, 100, 200, 0.15), rgba(0, 150, 255, 0.12)),
      rgba(0, 100, 200, 0.12);
    background-blend-mode: screen, soft-light;
    transition: background 0.35s ease, box-shadow 0.35s ease;
    filter: url(#liquidGlass);
    background-image:
      radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08), transparent 60%),
      radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.04), transparent 60%);
    background-blend-mode: overlay;
}

.joke-box::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 28px;
    pointer-events: none;
}

button {
    font-family: 'Segoe UI';
    padding: clamp(8px, 1.5vw, 15px) clamp(12px, 3vw, 20px);
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: #dddddd;
    cursor: pointer;
    width: auto;
    text-align: center;
    display: inline-block;
    margin: 0 auto;
    border-radius: 16px;
    box-shadow:
      inset 0 2px 0 hsl(0 0% 100% / 0.45),
      0 5px 19px rgba(0, 0, 0, 0.4);
    border: none;
    outline: 1px solid rgba(255, 255, 255, 0.18);
    outline-offset: -1px;
    backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    -webkit-backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    background-clip: border-box;
    -webkit-background-clip: border-box;
    background:
      radial-gradient(1000% 1000% at 50% 300000000%, hsl(0 0% 100% / 0.12) 0%, hsl(0 0% 100% / 0) 95%),
      linear-gradient(180deg, hsl(0 0% 100% / 0.05) 0%, hsl(0 0% 0% / 0.05) 100%),
      rgba(255, 255, 255, 0.05);
    background-blend-mode: screen, soft-light;
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

#prev-button,
#next-button {
    width: 48px !important;
    min-width: 48px !important;
    max-width: 48px !important;
    flex: 0 0 auto !important;
    height: 50px;
    min-height: 50px;
    max-height: 50px;
    font-size: 1.6rem !important;
    line-height: 1 !important;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    box-shadow:
      inset 0 1.5px 0 hsl(0 0% 95% / 0.45),
      0 5px 19px rgba(0, 0, 0, 0.4);
    border: none;
    outline: 1px solid rgba(255, 255, 255, 0.18);
    outline-offset: -1px;
    backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    -webkit-backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    background-clip: border-box;
    -webkit-background-clip: border-box;
}

#prev-button:hover,
#next-button:hover {
    background-color: rgba(255, 255, 255, 0.22);
    box-shadow:
      inset 0 1px 0 hsl(0 0% 100% / 0.4),
      0 3px 10px rgba(0, 0, 0, 0.35);
}

#prev-button:active,
#next-button:active {
    transform: scale(0.96);
}

button::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px;
    pointer-events: none;
}

button:hover {
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.button-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 20px auto;
    position: static;
    transform: none;
    white-space: nowrap;
    flex-wrap: nowrap !important;
}

.copy-button {
    font-family: 'Segoe UI';
    padding: clamp(6px, 1.5vw, 11px) clamp(12px, 3vw, 20px);
    font-size: clamp(0.8rem, 2vw, 0.9rem);
    background: rgba(173, 216, 230, 0.15);
    color: #dddddd;
    cursor: pointer;
    width: auto;
    flex-shrink: 0;
    white-space: nowrap;
    text-align: center;
    display: inline-flex;
    margin: 0;
    border-radius: 16px;
    
    box-shadow:
      inset 0 1.5px 0 hsl(0 0% 95% / 0.45),
      0 5px 19px rgba(0, 0, 0, 0.4);
    border: none;
    outline: 1px solid rgba(255, 255, 255, 0.18);
    outline-offset: -1px;
    backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    -webkit-backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    background-clip: border-box;
    -webkit-background-clip: border-box;
    background:
      radial-gradient(1000% 1000% at 50% 300000000%, hsl(0 0% 100% / 0.12) 0%, hsl(0 0% 100% / 0) 95%),
      linear-gradient(180deg, hsl(0 0% 100% / 0.05) 0%, hsl(0 0% 0% / 0.05) 100%),
      rgba(255, 255, 255, 0.05);
    background-blend-mode: screen, soft-light;
    transition: background 0.35s ease, box-shadow 0.35s ease;
    height: 48px;
    min-height: 48px;
    max-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
}

.copy-button::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px;
    pointer-events: none;
}

.copy-button:hover {
    background-color: rgba(135, 206, 250, 0.25);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.copy-button:active, .copy-button:focus {
    transform: scale(0.98);
    outline: none;
}

#joke-button {
    font-family: 'Segoe UI';
    position: relative;
    padding: clamp(8px, 1.5vw, 15px) clamp(12px, 3vw, 20px);
    font-size: 1rem;
    background: rgba(34, 139, 34, 0.25); 
    color: #dddddd;
    width: auto;
    min-width: 120px;
    text-align: center;
    cursor: pointer;
    display: inline-block;
    margin: 0 auto;
    border-radius: 16px;
    box-shadow:
      inset 0 1.7px 0 hsl(0 0% 100% / 0.45),
      0 5px 19px rgba(0, 0, 0, 0.4);
    border: none;
    outline: 1px solid rgba(255, 255, 255, 0.18);
    outline-offset: -1px;
    backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    -webkit-backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    background-clip: border-box;
    -webkit-background-clip: border-box;
    background:
      radial-gradient(1000% 1000% at 50% 300000000%, hsl(120 40% 90% / 0.12) 0%, hsl(120 40% 90% / 0) 95%),
      linear-gradient(180deg, hsl(120 40% 100% / 0.05) 0%, hsl(120 40% 0% / 0.05) 100%),
      rgba(34, 139, 34, 0.15);
    background-blend-mode: screen, soft-light;
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

#joke-button::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 16px;
    pointer-events: none;
}

#joke-button::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: url('/assets/images/cow-pattern.png') center/cover no-repeat;
    opacity: 0.15;
    pointer-events: none;
    border-radius: inherit;
}

#joke-button:hover {
    background-color: rgba(50, 205, 50, 0.35); 
    box-shadow: 0 2px 8px rgba(34, 139, 34, 0.18), 0 2px 4px rgba(0,0,0,0.3);
}

.share-button {
    font-family: 'Segoe UI';
    background: rgba(128, 90, 213, 0.15); 
    color: #dddddd;
    border-radius: 16px;
    padding: clamp(6px, 1.5vw, 12px) clamp(12px, 3vw, 20px);
    font-size: clamp(0.8rem, 1.5vw, 0.9rem);
    width: clamp(80px, 15vw, 100px);
    position: fixed;
    bottom: clamp(40px, 5vh, 60px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    cursor: pointer;
    
    box-shadow:
      inset 0 1.6px 0 hsl(0 0% 100% / 0.35),
      0 2px 8px rgba(0, 0, 0, 0.25);

    border: none;
    outline: 1px solid rgba(255, 255, 255, 0.15);
    outline-offset: -1px;

    backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    -webkit-backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
    background-clip: border-box;
    -webkit-background-clip: border-box;

    background:
      radial-gradient(1000% 1000% at 50% 300%, hsl(260 60% 90% / 0.12) 0%, hsl(260 60% 90% / 0) 95%),
      linear-gradient(180deg, hsl(260 60% 100% / 0.05) 0%, hsl(260 60% 0% / 0.05) 100%),
      rgba(128, 90, 213, 0.13);
    background-blend-mode: screen, soft-light;
    transition: background 0.35s ease, box-shadow 0.35s ease;
}

.share-button:hover {
    background-color: rgba(128, 90, 213, 0.28);
    box-shadow:
      inset 0 1px 0 hsl(0 0% 100% / 0.4),
      0 3px 10px rgba(0, 0, 0, 0.3);
}

footer {
    font-family: 'Segoe UI';
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2px 0; 
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 -3px 14px rgba(0, 0, 0, 0.45); 
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px 12px 0 0;
    display: flex;
    align-items: center; 
    justify-content: center;
    color: #dddddd;
    font-size: 0.8rem;
    z-index: 1000;
    line-height: 1.2;
    min-height: 24px; 
}

footer p {
    font-family: 'Segoe UI';
    font-size: 0.8rem;
    margin: 0;
    color: #dddddd;
}

footer a {
    font-family: 'Segoe UI';
    display: flex;
    align-items: center;
    justify-content: center;
    color: #dddddd;
}

footer p {
    margin: 0;
}

#page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgb(18, 22, 24);
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.8s ease;
    pointer-events: none;
}

#page-loader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.joke-answer {
    font-style: italic;
    color: rgba(220, 220, 220, 0.9);
    display: inline;
    margin-left: 8px;
    font-size: 0.95em;
    white-space: nowrap;
}

.joke-box .joke-answer {
  font-style: italic;
  color: rgba(220, 220, 220, 0.9);
  display: inline;
  font-size: inherit;
  line-height: inherit;
  white-space: normal;
  word-break: break-word;
}

.joke-box .sep { opacity: 0.65; margin: 0 6px; }

.section-box,
.sub-section-box {
  position: relative;
  border-radius: 28px;
  box-shadow:
    inset 3px 3px 4px hsl(0 0% 100% / 0.4),      
    inset -3px -3px 4px rgba(0, 0, 0, 0.4),      
    0 5px 19px rgba(0, 0, 0, 0.4);
  border: none;
  outline: 1px solid rgba(255, 255, 255, 0.18);
  outline-offset: -1px;
  overflow: hidden;
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
  backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.2) brightness(1.05);
  background:
    radial-gradient(120% 100% at 50% -40%, hsl(0 0% 100% / 0.08) 0%, hsl(0 0% 100% / 0) 60%),
    linear-gradient(180deg, hsl(0 0% 100% / 0.05) 0%, hsl(0 0% 0% / 0.05) 100%),
    linear-gradient(90deg, rgba(0, 100, 200, 0.15), rgba(0, 150, 255, 0.18)),
    rgba(0, 100, 200, 0.18);
  background-blend-mode: screen, soft-light;
  transition: background 0.35s ease, box-shadow 0.35s ease;
  filter: url(#liquidGlass);
  background-image:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.08), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(255, 255, 255, 0.04), transparent 60%);
  background-blend-mode: overlay;
  padding: 25px;
  margin: 4px auto;
  max-width: 900px;
  top: 99px;
}

.section-box:hover,
.sub-section-box:hover {
  background-color: rgba(30, 45, 60, 0.7);
}

.nav-row {
    width: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -6px;
}

.nav-row #prev-button {
    position: absolute;
    left: -3px;
}

.nav-row #next-button {
    position: absolute;
    right: -3px;
}

. 
#prev-button span,
#next-button span {
    font-size: 1.6rem !important;
    line-height: 1 !important;
}