:root {
    --primary: #c0c0c0;
    --accent: #6e8efb;
    --accent-alt: #a777e3;
    --bg-dark: #0f111a;
    --card-bg: rgba(255, 255, 255, 0.05);
    --text-main: #ffffff;
    --text-dim: #b0b3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Background */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(80px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.3;
    animation: move-blobs 25s infinite alternate;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--accent);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-alt);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: #4facfe;
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes move-blobs {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(150px, 100px) scale(1.2);
    }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

.logo {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(135deg, #fff 0%, #a0a0a0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo span {
    color: var(--accent);
    -webkit-text-fill-color: var(--accent);
}

.tagline {
    color: var(--text-dim);
    margin-top: 0.5rem;
}

/* Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    align-items: start;
}

.generator-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
}

.sticky-card {
    position: sticky;
    top: 2rem;
}

.section-title {
    font-size: 1.1rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.section-title-sm {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Form */
.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.full-width {
    grid-column: span 2;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
}

input,
select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 12px 14px;
    color: #fff;
    font-family: inherit;
    transition: 0.3s;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}

option {
    background-color: #1a1d29;
    color: #fff;
}

/* Range */
.range-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

input[type="range"] {
    flex: 1;
    padding: 0;
    height: 6px;
    cursor: pointer;
}

#motion-val {
    font-weight: 700;
    color: var(--accent);
    min-width: 20px;
}

/* Output & Buttons */
.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.2rem;
}

.prompt-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
    min-height: 120px;
    max-height: 400px;
    overflow-y: auto;
    font-size: 0.95rem;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-alt) 100%);
    border: none;
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    padding: 10px 18px;
    border-radius: 10px;
    cursor: pointer;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* History */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 250px;
    overflow-y: auto;
}

.history-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-dim);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
}

.history-text {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    flex: 1;
    line-height: 1.4;
}

.history-copy-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--accent);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
}

.history-copy-btn:hover {
    background: var(--accent);
    color: #fff;
}

.history-item:hover {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}

.empty-msg {
    text-align: center;
    color: var(--text-dim);
    opacity: 0.5;
    font-style: italic;
    font-size: 0.9rem;
    padding: 20px;
}

/* Utils */
.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 2rem;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    background: var(--accent);
    font-size: 0.7rem;
    font-weight: 700;
    margin-top: 10px;
}

@media (max-width: 900px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .sticky-card {
        position: static;
    }
}

@media (max-width: 600px) {
    .input-grid {
        grid-template-columns: 1fr;
    }

    .full-width {
        grid-column: span 1;
    }

    .logo {
        font-size: 2.5rem;
    }
}