@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #07070d;
    min-height: 100vh;
    padding: 48px 20px;
    color: #fff;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: '';
    position: fixed;
    inset: -20%;
    background:
        radial-gradient(circle at 20% 25%, rgba(255, 0, 90, 0.45) 0%, transparent 45%),
        radial-gradient(circle at 80% 75%, rgba(0, 242, 234, 0.35) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(140, 70, 255, 0.25) 0%, transparent 55%);
    z-index: -2;
    animation: drift 18s ease-in-out infinite;
    filter: blur(80px);
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 56px 56px;
    z-index: -1;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

@keyframes drift {
    0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1); }
    33% { transform: translate(2%, -3%) rotate(8deg) scale(1.05); }
    66% { transform: translate(-2%, 3%) rotate(-8deg) scale(0.95); }
}

.container {
    max-width: 920px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

header {
    text-align: center;
    margin-bottom: 56px;
}

header::before {
    content: 'BUILT FOR CREATORS';
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: rgba(255, 255, 255, 0.5);
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 100px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
}

header h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 7vw, 4.75rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.04em;
    margin-bottom: 18px;
    background: linear-gradient(120deg, #fff 0%, #fff 30%, #ff0050 60%, #00f2ea 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 40px rgba(255, 0, 80, 0.25));
}

.subtitle {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 400;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.5;
}

main {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.form-section,
.output-section {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 40px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
    position: relative;
}

.form-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 0, 80, 0.6), transparent);
}

.output-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20%;
    right: 20%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 234, 0.6), transparent);
}

.form-group {
    margin-bottom: 22px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

input[type="text"],
select {
    width: 100%;
    padding: 15px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
}

input[type="text"]::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-weight: 400;
}

input[type="text"]:hover,
select:hover {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(0, 0, 0, 0.45);
}

input[type="text"]:focus,
select:focus {
    outline: none;
    border-color: rgba(255, 0, 80, 0.6);
    background: rgba(0, 0, 0, 0.55);
    box-shadow:
        0 0 0 4px rgba(255, 0, 80, 0.15),
        0 0 40px rgba(255, 0, 80, 0.2);
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' fill-opacity='0.6' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 44px;
}

select option {
    background: #0a0a12;
    color: #fff;
}

.generate-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #ff0050 0%, #ff3a8c 45%, #c200ff 100%);
    background-size: 200% 200%;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 14px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 12px 40px rgba(255, 0, 80, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
    animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.generate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    transition: left 0.6s;
}

.generate-btn:hover::before {
    left: 100%;
}

.generate-btn:hover {
    transform: translateY(-3px);
    box-shadow:
        0 22px 60px rgba(255, 0, 80, 0.55),
        0 0 50px rgba(194, 0, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

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

.output-section {
    display: none;
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.output-section.visible {
    display: block;
}

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

.output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.output-header h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.85rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    background: linear-gradient(120deg, #fff 0%, #00f2ea 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.output-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    letter-spacing: 0.02em;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.action-btn.copied {
    background: linear-gradient(135deg, #00d26a 0%, #00f2ea 100%);
    border-color: transparent;
    color: #000;
    font-weight: 700;
}

.script-output {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.script-block {
    background: rgba(0, 0, 0, 0.35);
    padding: 24px 26px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden;
}

.script-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #ff0050, #c200ff);
    border-radius: 18px 0 0 18px;
}

.script-block.extras::before {
    background: linear-gradient(180deg, #00f2ea, #00d4ff);
}

.script-block:hover {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.45);
    transform: translateX(2px);
}

.script-block h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.14em;
}

.time-badge {
    background: linear-gradient(135deg, #ff0050 0%, #ff3a8c 100%);
    color: #fff;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    box-shadow: 0 4px 16px rgba(255, 0, 80, 0.45);
}

.script-block.extras .time-badge {
    background: linear-gradient(135deg, #00f2ea 0%, #00d4ff 100%);
    color: #000;
    box-shadow: 0 4px 16px rgba(0, 242, 234, 0.45);
}

.script-block p {
    font-size: 1rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.85);
}

.hashtags {
    color: #ff5b9c !important;
    font-weight: 600;
    word-break: break-word;
    letter-spacing: 0.02em;
}

footer {
    text-align: center;
    margin-top: 48px;
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

@media (max-width: 600px) {
    body {
        padding: 28px 16px;
    }

    header {
        margin-bottom: 36px;
    }

    .form-section,
    .output-section {
        padding: 26px 22px;
        border-radius: 22px;
    }

    .output-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .output-header h2 {
        font-size: 1.5rem;
    }
}
