:root {
    --bg: #0f172a;
    --bg-elevated: #020617;
    --card: #020617;
    --accent: #38bdf8;
    --accent-soft: rgba(56, 189, 248, 0.12);
    --accent-strong: #0ea5e9;
    --border-subtle: #1e293b;
    --text: #e2e8f0;
    --text-soft: #94a3b8;
    --danger: #fb7185;
    --radius-lg: 18px;
    --radius-md: 12px;
    --radius-pill: 999px;
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.75);
    --shadow-card: 0 16px 30px rgba(15, 23, 42, 0.65);
    --blur-bg: 18px;
}

/* Reset & base */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
    color: var(--text);
    background:
            radial-gradient(circle at top left, rgba(56, 189, 248, 0.16), transparent 55%),
            radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.12), transparent 55%),
            radial-gradient(circle at center, rgba(15, 118, 110, 0.15), transparent 55%),
            #020617;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 32px 16px;
}

/* App layout */
.app-container {
    position: relative;
    max-width: 980px;
    width: 100%;
    padding: 28px 26px 20px;
    background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.2), transparent 60%)
    border-box,
    radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.25), transparent 60%)
    border-box,
    rgba(15, 23, 42, 0.92);
    border-radius: 32px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    backdrop-filter: blur(var(--blur-bg));
    border: 1px solid rgba(148, 163, 184, 0.24);
}

/* header */
.app-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 6px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    margin-bottom: 18px;
}

.logo-circle {
    width: 52px;
    height: 52px;
    border-radius: 18px;
    background: radial-gradient(circle at 30% 30%, #e0f2fe 0, #0ea5e9 38%, #0284c7 74%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0f172a;
    font-weight: 800;
    font-size: 20px;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.6);
}

.app-title {
    font-size: 22px;
    letter-spacing: 0.02em;
    margin: 0 0 4px;
}

.app-subtitle {
    margin: 0;
    font-size: 13px;
    color: var(--text-soft);
}

/* main */
.app-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* cards */
.card {
    background:
            radial-gradient(circle at top left, rgba(56, 189, 248, 0.12), transparent 65%),
            radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.2), transparent 65%),
            rgba(15, 23, 42, 0.94);
    border-radius: 20px;
    padding: 16px 18px 14px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: var(--shadow-card);
}

.section-title {
    font-size: 15px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #a5b4fc;
    margin: 0 0 10px;
}

/* form layout */
.form-row {
    display: grid;
    grid-template-columns: 1.2fr 1.3fr;
    gap: 16px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

label {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5f5;
}

.helper-text {
    font-size: 11px;
    color: var(--text-soft);
}

/* segmented control */
.segmented-control {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    background: rgba(15, 23, 42, 0.9);
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.segment {
    border: none;
    background: transparent;
    color: var(--text-soft);
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.18s ease-out;
}

.segment.active {
    background: linear-gradient(135deg, #22d3ee, #0ea5e9);
    color: #0f172a;
    box-shadow: 0 8px 18px rgba(56, 189, 248, 0.45);
}

/* inputs */
.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon input {
    width: 100%;
    padding: 9px 38px 9px 11px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: rgba(15, 23, 42, 0.95);
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.input-with-icon input:focus {
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5);
    background: rgba(15, 23, 42, 0.98);
}

.icon-button {
    position: absolute;
    right: 5px;
    border-radius: 999px;
    width: 26px;
    height: 26px;
    border: none;
    background: rgba(15, 23, 42, 0.9);
    color: var(--text-soft);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}

/* textarea */
textarea {
    width: 100%;
    min-height: 120px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.55);
    background: rgba(15, 23, 42, 0.92);
    color: var(--text);
    padding: 11px 12px;
    font-size: 13px;
    resize: vertical;
    outline: none;
    line-height: 1.5;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea:focus {
    border-color: var(--accent-strong);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.5);
}

/* buttons */
.button-row {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.btn {
    border-radius: var(--radius-pill);
    border: none;
    padding: 8px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.btn.primary {
    background: linear-gradient(135deg, #22d3ee, #0ea5e9);
    color: #0f172a;
    box-shadow: 0 10px 20px rgba(56, 189, 248, 0.45);
}

.btn.secondary {
    background: rgba(15, 23, 42, 0.95);
    color: var(--text-soft);
    border: 1px solid rgba(148, 163, 184, 0.6);
}

.btn.ghost {
    background: transparent;
    color: var(--accent-strong);
    border: 1px dashed rgba(56, 189, 248, 0.7);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.7);
}

/* status */
.status-text {
    margin-top: 8px;
    font-size: 12px;
    color: var(--text-soft);
}

/* info card */
.info-card {
    background:
            linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.98)),
            radial-gradient(circle at top left, rgba(56, 189, 248, 0.24), transparent 60%);
}

.info-card ul {
    margin: 6px 0 0 18px;
    padding: 0;
    font-size: 13px;
    color: var(--text-soft);
}

/* footer */
.app-footer {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, 0.25);
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-soft);
}

/* responsive */
@media (max-width: 768px) {
    body {
        padding: 20px 10px;
    }

    .app-container {
        padding: 20px 18px 16px;
        border-radius: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .app-footer {
        flex-direction: column;
        gap: 4px;
        align-items: flex-start;
    }
}
