:root {
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --bg-gradient-1: #4c1d95;
    --bg-gradient-2: #db2777;
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
    --text-color: #f3f4f6;
    --text-muted: #9ca3af;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0f172a;
    color: var(--text-color);
    overflow-x: hidden;
}

.background-mesh {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at 50% 50%, var(--bg-gradient-1), transparent 70%),
        radial-gradient(circle at 50% 50%, var(--bg-gradient-2), transparent 70%);
    /* Fallback or simplified mesh */
    background-size: 200% 200%;
    z-index: -1;
    animation: gradientMove 15s ease infinite alternate;
    opacity: 0.6;
}

@keyframes gradientMove {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* More complex mesh gradient simulation via pseudo-elements if desired, but radial is good for now to keep it performant and clean */
.background-mesh::before,
.background-mesh::after {
    content: '';
    position: absolute;
    width: 60vmax;
    height: 60vmax;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite;
}

.background-mesh::before {
    background: #8b5cf6;
    top: -20%;
    left: -10%;
    animation-delay: -2s;
}

.background-mesh::after {
    background: #ec4899;
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.global-nav {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link img {
    height: 40px;
    transition: transform 0.2s;
}

.logo-link:hover img {
    transform: scale(1.05);
}

.nav-title {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
    font-weight: 600;
}

.container {
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

.card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

header {
    text-align: center;
}

h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #cbd5e1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.slider-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.slider-label {
    font-size: 0.9rem;
    color: var(--text-color);
    display: flex;
    justify-content: space-between;
}

.slider {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    transition: background 0.3s;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: transform 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    transition: transform 0.2s;
}

.output-area {
    position: relative;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    min-height: 120px;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: border-color 0.3s;
}

.output-area:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

#loremText {
    font-size: 1rem;
    line-height: 1.6;
    color: #e2e8f0;
    white-space: pre-wrap;
    /* Preserve basic formatting if needed */
}

.icon-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.icon-btn:active {
    transform: translateY(0);
}

/* Scrollbar styles for output */
.output-area::-webkit-scrollbar {
    width: 6px;
}

.output-area::-webkit-scrollbar-track {
    background: transparent;
}

.output-area::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.output-area::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}