:root {
    --bg-color: #fff1f5;
    --bg-color-2: #eef7ff;
    --card-bg: rgba(255, 255, 255, 0.92);
    --text-primary: #5a1733;
    --text-secondary: #7a1d46;
    --accent: #d12f6a;
    --accent-strong: #9b5de5;
    --border: #f1d4e0;
    --success: #10b981;
    --shadow: 0 18px 40px rgba(16, 24, 40, 0.12);
    --radius-lg: 24px;
}

body {
    font-family: 'Manrope', system-ui, sans-serif;
    background: radial-gradient(circle at top left, var(--bg-color) 0%, #f7f0ff 45%, var(--bg-color-2) 100%);
    color: var(--text-primary);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
}

.container {
    width: 100%;
    max-width: 1000px;
}

h1 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-family: 'Fraunces', serif;
    background: linear-gradient(to right, #ea4c8a, #9b5de5);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    text-align: center;
    color: #9d174d;
    margin-bottom: 3rem;
}

.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.form-type-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin: 1.5rem 0 2.5rem;
}

.form-type-pill {
    border: 2px solid var(--accent);
    background: white;
    color: var(--accent);
    padding: 0.6rem 1.2rem;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.form-type-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(209, 47, 106, 0.18);
}

.form-type-pill.active {
    background: linear-gradient(to right, #ea4c8a, #9b5de5);
    color: white;
    border-color: transparent;
    box-shadow: 0 12px 24px rgba(234, 76, 138, 0.3);
}

.auth-bar {
    margin: 0 auto 2rem;
    max-width: 900px;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.auth-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    font-weight: 700;
}

.auth-pill.connected {
    color: #0f766e;
    border-color: #5eead4;
    background: #ecfeff;
}

.auth-actions form {
    margin: 0;
}

@media (max-width: 768px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

input[type="text"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #f3d7e5;
    border-radius: 0.5rem;
    font-family: inherit;
    box-sizing: border-box;
    /* Fix padding issue */
    transition: border 0.3s;
}

select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #f3d7e5;
    border-radius: 0.5rem;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}

input[type="text"]:focus,
textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 6px rgba(209, 47, 106, 0.08);
}

.mini-drop-zone {
    border: 2px dashed #fbcfe8;
    padding: 1rem;
    text-align: center;
    border-radius: 0.5rem;
    cursor: pointer;
    background: #fff6f9;
    transition: all 0.2s;
}

.mini-drop-zone:hover {
    background: #ffe8ef;
    border-color: var(--accent);
}

.mini-drop-zone input {
    display: none;
}


.btn-primary {
    background: linear-gradient(to right, #ea4c8a, #9b5de5);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 2rem;
    cursor: pointer;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(234, 76, 138, 0.32);
    transition: transform 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px rgba(234, 76, 138, 0.4);
}

.result-link {
    display: inline-block;
    margin-top: 1rem;
    font-weight: bold;
    color: var(--accent);
    text-decoration: none;
    font-size: 1.25rem;
    background: #fff6f9;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    border: 1px dashed var(--accent);
}

.hidden {
    display: none;
}

.animate-in {
    animation: fadeUp 0.5s ease-out forwards;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Sections */
.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #f3d7e5;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section summary {
    list-style: none;
    cursor: pointer;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.25rem 0;
}

.form-section summary::-webkit-details-marker {
    display: none;
}

.form-section summary::after {
    content: "+";
    font-weight: 900;
    color: var(--accent);
}

.form-section[open] summary::after {
    content: "–";
}

.form-section > *:not(summary) {
    margin-top: 1rem;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #9ca3af;
    font-size: 0.85rem;
}

.form-status {
    margin-top: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-card {
    grid-column: 1 / -1;
}

.form-panel {
    display: none;
}

.form-panel.active {
    display: block;
}

.form-placeholder {
    text-align: center;
    color: var(--text-secondary);
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: 1rem;
    padding: 2rem;
}

@media (max-width: 768px) {
    .form-card {
        grid-column: auto;
    }
}

/* Remove Reason Button */
.btn-remove-reason {
    background: #dc2626;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.2s;
    min-width: 40px;
}

.btn-remove-reason:hover {
    background: #991b1b;
}

.reason-item {
    margin-bottom: 1rem;
}


/* Theme buttons (fixed-width flex layout) */
.theme-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-bottom: 0.5rem;
    justify-content: center;
    align-items: stretch;
}

.theme-option {
    display: block;
    flex: 1 1 calc(50% - 0.9rem);
    max-width: calc(50% - 0.9rem);
    cursor: pointer;
}

.theme-option input[type="radio"] {
    display: none;
}

.theme-button {
    display: block;
    width: 100%;
    padding: 0.75rem 0.9rem;
    border-radius: 0.75rem;
    border: 2px solid #f3d7e5;
    background: #fff;
    color: var(--text-primary);
    font-weight: 600;
    text-align: center;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, color 0.2s;
    height: 100%;
    box-sizing: border-box;
}

.theme-option input[type="radio"]:checked + .theme-button {
    border-color: var(--accent);
    box-shadow: 0 8px 18px rgba(209, 47, 106, 0.18);
    color: var(--accent);
    transform: translateY(-1px);
}

@media (max-width: 560px) {
    .theme-option {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

.theme-add {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px dashed var(--border);
    border-radius: 1rem;
    background: #fff;
}

.theme-add .form-group {
    margin-bottom: 1rem;
}
