/* ===== CSS Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    background: #000;
}

/* ===== Video Background ===== */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -10;
    overflow: hidden;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
}

.video-background video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.4) contrast(1.1) saturate(1.05);
    opacity: 0;
    transition: opacity 2s ease;
    will-change: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.video-background video.show {
    opacity: 1;
}

/* ===== Video Overlay ===== */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: -9;
    pointer-events: none;
}

/* ===== Particles ===== */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -8;
    pointer-events: none;
}

.particle {
    position: absolute;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
    border-radius: 50%;
    pointer-events: none;
    animation: particleFloat 15s linear infinite;
    will-change: transform;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

@keyframes particleFloat {
    0% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0;
    }
    5% {
        opacity: 0.8;
    }
    95% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(-100vh) translateX(20px) rotate(360deg);
        opacity: 0;
    }
}

/* ===== Main Quote Wrapper ===== */
.quote-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.quote-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ===== Quote Mark (Outside Box) ===== */
.quote-mark-wrapper {
    position: relative;
    height: 120px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    margin-bottom: -40px;
    z-index: 2;
}
/* ----- Back Button ----- */
.back-button {
    position: fixed;
    top: 2rem;
    left: 2rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.6rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 100;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateX(-6px);
    box-shadow: 
        0 12px 48px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.back-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.back-button:hover .back-icon {
    transform: translateX(-4px);
}
/* ----- Footer ----- */
.bot-footer {
    text-align: center;
    padding: 2rem 0;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    font-weight: 300;
}
.quote-mark {
    font-family:'Franklin Gothic Medium', 'Arial Narrow', Arial;
    font-size: 180px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1;
    letter-spacing: -20px;
    text-shadow: 
        0 0 20px rgba(255, 255, 255, 0.8),
        0 0 40px rgba(255, 255, 255, 0.6),
        0 0 60px rgba(255, 255, 255, 0.4),
        0 0 80px rgba(255, 255, 255, 0.3);
    filter: drop-shadow(0 0 40px rgba(255, 255, 255, 0.8)) drop-shadow(0 0 20px rgba(255, 255, 255, 0.6));
    animation: quotePulse 3s ease-in-out infinite;
}

@keyframes quotePulse {
    0%, 100% {
        opacity: 0.5;
        filter: drop-shadow(0 0 30px rgba(100, 200, 255, 0.5)) drop-shadow(0 0 15px rgba(100, 200, 255, 0.3));
    }
    50% {
        opacity: 0.8;
        filter: drop-shadow(0 0 60px rgba(100, 200, 255, 0.9)) drop-shadow(0 0 30px rgba(100, 200, 255, 0.7));
    }
}

/* ===== Quote Box (Glass Morphism) ===== */
.quote-box {
    position: relative;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 24px;
    padding: 3.5rem 3rem;
    width: 100%;
    color: #fff;
    box-shadow: 
        0 8px 32px rgba(255, 255, 255, 0.37),
        inset 0 0 20px rgba(255, 255, 255, 0.05);
    animation: boxGlow 4s ease-in-out infinite;
    transition: all 0.3s ease;
}

.quote-box:hover {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 
        0 8px 40px rgba(255, 255, 255, 0.5),
        inset 0 0 20px rgba(255, 255, 255, 0.08);
}

@keyframes boxGlow {
    0%, 100% {
        box-shadow: 
            0 8px 32px rgba(31, 38, 135, 0.37),
            inset 0 0 20px rgba(255, 255, 255, 0.05);
    }
    50% {
        box-shadow: 
            0 8px 40px rgba(100, 200, 255, 0.2),
            inset 0 0 25px rgba(255, 255, 255, 0.08);
    }
}

/* ===== Quote Text ===== */
.quote-text {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    line-height: 1.8;
    text-align: center;
    color: #ffffff;
    font-weight: 300;
    letter-spacing: 0.3px;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.5),
        0 0 20px rgba(100, 200, 255, 0.3),
        0 0 30px rgba(100, 200, 255, 0.1);
    animation: textGlow 3s ease-in-out infinite;
}

@keyframes textGlow {
    0%, 100% {
        text-shadow:
            0 0 10px rgba(255, 255, 255, 0.5),
            0 0 20px rgba(100, 200, 255, 0.3),
            0 0 30px rgba(100, 200, 255, 0.1);
    }
    50% {
        text-shadow:
            0 0 15px rgba(255, 255, 255, 0.7),
            0 0 30px rgba(100, 200, 255, 0.4),
            0 0 45px rgba(100, 200, 255, 0.2);
    }
}

/* ===== Quote Author ===== */
.quote-author {
    margin-top: 2rem;
    text-align: right;
    font-size: 1rem;
    opacity: 0.85;
    font-weight: 400;
    letter-spacing: 1px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
    animation: authorFadeIn 0.8s ease 0.3s both;
}

@keyframes authorFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 0.85;
        transform: translateX(0);
    }
}

/* ===== Action Buttons ===== */
.quote-actions {
    display: flex;
    gap: 15px;
    margin-top: 2.5rem;
    justify-content: center;
    animation: buttonsSlideIn 0.8s ease 0.5s both;
}

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

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 
        0 4px 20px rgba(255, 255, 255, 0.3),
        inset 0 0 10px rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.btn:active {
    transform: translateY(-1px);
}

.btn svg {
    stroke: currentColor;
}

.btn-refresh:hover {
    animation: spin 0.6s ease-in-out;
}

@keyframes spin {
    from {
        transform: rotate(0deg) translateY(-3px);
    }
    to {
        transform: rotate(360deg) translateY(-3px);
    }
}

.btn-copy.copied {
    background: rgba(76, 175, 80, 0.3);
    border-color: rgba(76, 175, 80, 0.6);
}

/* ===== Loading Spinner ===== */
.loading-spinner {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-spinner.active {
    opacity: 1;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== Animations ===== */
.quote-box {
    animation: fadeInScale 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

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

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .back-button {
        top: 1rem;
        left: 1rem;
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }
    .quote-box {
        padding: 2.5rem 2rem;
        border-radius: 20px;
    }

    .quote-text {
        font-size: 1.3rem;
    }

    .quote-mark {
        font-size: 120px;
        letter-spacing: -15px;
    }

    .quote-mark-wrapper {
        height: 80px;
        margin-bottom: -30px;
    }

    .quote-actions {
        gap: 12px;
    }

    .btn {
        width: 45px;
        height: 45px;
    }

    .btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .back-button span {
        display: none;
    }

    .back-button {
        width: 44px;
        height: 44px;
        padding: 0;
        justify-content: center;
    }
    .quote-wrapper {
        padding: 15px;
    }

    .quote-box {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .quote-text {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .quote-mark {
        font-size: 80px;
        letter-spacing: -10px;
    }

    .quote-mark-wrapper {
        height: 60px;
        margin-bottom: -20px;
    }

    .quote-author {
        font-size: 0.9rem;
        margin-top: 1.5rem;
    }

    .quote-actions {
        gap: 10px;
        margin-top: 2rem;
    }

    .btn {
        width: 40px;
        height: 40px;
    }

    .btn svg {
        width: 16px;
        height: 16px;
    }
}
/* Base: allow sliding when needed */
/* Base glass bottom bar */
.glass-bottombar {
  width: fit-content;
  max-width: 90vw;          /* IMPORTANT: prevents going out of screen */
  margin: 40px auto 20px;

  display: flex;
  gap: 20px;

  padding: 10px 25px;
  border-radius: 14px;

  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);

  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);

  overflow-x: auto;         /* 🔥 SLIDING ENABLED */
  white-space: nowrap;      /* prevents wrapping */
  scrollbar-width: none;    /* hides scrollbar (Firefox) */
}

.glass-bottombar::-webkit-scrollbar {
  display: none;            /* hides scrollbar (Chrome) */
}

/* Links */
.glass-bottombar a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  transition: 0.2s ease;
  white-space: nowrap;      /* do NOT break text */
}

.glass-bottombar a:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

/* -------------------------------
   RESPONSIVE: shrink padding + gap
-------------------------------- */

/* Tablets */
@media (max-width: 900px) {
  .glass-bottombar {
    gap: 14px;
    padding: 8px 20px;
  }
  .glass-bottombar a {
    font-size: 0.9rem;
  }
}

/* Large phones */
@media (max-width: 600px) {
  .glass-bottombar {
    gap: 12px;
    padding: 8px 16px;
  }
  .glass-bottombar a {
    font-size: 0.85rem;
    padding: 6px 8px;
  }
}

/* Small phones */
@media (max-width: 430px) {
  .glass-bottombar {
    gap: 10px;
    padding: 6px 14px;
  }
  .glass-bottombar a {
    font-size: 0.8rem;
  }
}

/* Ultra small */
@media (max-width: 350px) {
  .glass-bottombar {
    gap: 8px;
    padding: 5px 12px;
  }
  .glass-bottombar a {
    font-size: 0.75rem;
  }
}