/* =====================================================
   Schema.org Generator — styles.css
   Emerald Green dark theme
   ===================================================== */

:root {
    --primary: #00B894;
    --secondary: #55EFC4;
    --accent: #FDCB6E;
    --bg: #0A1A14;
    --surface: #0F2219;
    --surface2: #162C21;
    --border: rgba(0, 184, 148, 0.18);
    --text: #E0F5ED;
    --text-muted: #4A7A65;
    --radius: 12px;
    --tr: 0.2s ease;
}

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

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 20% 5%, rgba(0, 184, 148, 0.07) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.glass-card {
    background: rgba(15, 34, 25, 0.82);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 26, 20, 0.9);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 11px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
    background: rgba(0, 184, 148, 0.12);
    border: 1px solid rgba(0, 184, 148, 0.25);
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-title {
    font-size: 1rem;
    font-weight: 700;
}

.logo-sub {
    font-size: 0.62rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.header-actions {
    display: flex;
    gap: 7px;
    align-items: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #00A082);
    border: none;
    border-radius: 8px;
    color: #0A1A14;
    font-size: 0.82rem;
    font-weight: 700;
    padding: 8px 16px;
    cursor: pointer;
    transition: box-shadow var(--tr), transform var(--tr);
}

.btn-primary:hover {
    box-shadow: 0 0 16px rgba(0, 184, 148, 0.4);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.82rem;
    padding: 7px 12px;
    cursor: pointer;
    transition: all var(--tr);
}

.btn-ghost:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-sm {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.68rem;
    padding: 4px 10px;
    cursor: pointer;
    transition: all var(--tr);
}

.btn-sm:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Main */
.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px;
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 18px;
    position: relative;
    z-index: 1;
}

/* Type selector */
.forms-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.type-selector-card {
    overflow: hidden;
}

.type-selector-header {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
}

.type-selector-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
}

.type-tabs {
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.type-tab {
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 6px 11px;
    cursor: pointer;
    transition: all var(--tr);
}

.type-tab:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.type-tab.active {
    background: rgba(0, 184, 148, 0.12);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

/* Form */
.form-card {
    overflow: hidden;
}

.form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
}

.form-type-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary);
}

.form-hint {
    font-size: 0.62rem;
    color: var(--text-muted);
}

.form-fields {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 11px;
    max-height: 500px;
    overflow-y: auto;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.field-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    display: flex;
    gap: 4px;
    align-items: center;
}

.field-label .req {
    color: var(--accent);
    font-size: 0.65rem;
}

.field-input,
.field-textarea,
.field-select {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 0.82rem;
    padding: 8px 10px;
    outline: none;
    transition: border-color var(--tr);
    width: 100%;
}

.field-input:focus,
.field-textarea:focus,
.field-select:focus {
    border-color: var(--primary);
}

.field-textarea {
    resize: vertical;
    min-height: 72px;
    font-family: inherit;
}

.field-select {
    cursor: pointer;
}

.field-input::placeholder,
.field-textarea::placeholder {
    color: var(--text-muted);
}

/* FAQ fields */
.faq-item {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 9px;
    padding: 10px;
}

.faq-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.faq-item-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
}

.btn-remove-faq {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    transition: color var(--tr);
}

.btn-remove-faq:hover {
    color: #D63031;
}

.btn-add-faq {
    background: rgba(0, 184, 148, 0.08);
    border: 1px dashed rgba(0, 184, 148, 0.3);
    border-radius: 7px;
    color: var(--primary);
    font-size: 0.75rem;
    padding: 7px;
    cursor: pointer;
    width: 100%;
    transition: all var(--tr);
}

.btn-add-faq:hover {
    background: rgba(0, 184, 148, 0.15);
}

/* Output */
.output-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.preview-card {
    overflow: hidden;
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
}

.preview-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
}

.preview-sub {
    font-size: 0.68rem;
    color: var(--primary);
}

.rich-preview {
    padding: 16px;
}

.preview-empty {
    color: var(--text-muted);
    font-size: 0.82rem;
    font-style: italic;
}

/* Google Rich Results mock */
.google-result {
    background: #fff;
    border-radius: 8px;
    padding: 12px 16px;
    color: #202124;
    max-width: 600px;
}

.google-url {
    color: #0D652D;
    font-size: 0.72rem;
    margin-bottom: 2px;
}

.google-title {
    color: #1a0dab;
    font-size: 1.1rem;
    font-weight: normal;
    margin-bottom: 4px;
    text-decoration: underline;
    cursor: pointer;
}

.google-desc {
    color: #4d5156;
    font-size: 0.82rem;
    line-height: 1.5;
}

.google-stars {
    color: #f4b400;
    font-size: 0.78rem;
    margin: 3px 0;
}

.google-price {
    color: #202124;
    font-size: 0.82rem;
    font-weight: 600;
}

.google-date {
    color: #6e6e6e;
    font-size: 0.72rem;
}

.google-faq-item {
    border-top: 1px solid #e0e0e0;
    padding: 8px 0;
}

.google-faq-q {
    font-size: 0.85rem;
    font-weight: 500;
    color: #202124;
}

.google-faq-a {
    font-size: 0.78rem;
    color: #4d5156;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease;
}

/* Output card */
.output-card {
    overflow: hidden;
}

.output-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    background: var(--surface2);
}

.output-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
}

.output-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.validation-badge {
    font-size: 0.68rem;
    padding: 2px 8px;
    border-radius: 10px;
}

.validation-badge.valid {
    background: rgba(0, 184, 148, 0.12);
    color: var(--primary);
    border: 1px solid rgba(0, 184, 148, 0.25);
}

.validation-badge.error {
    background: rgba(214, 48, 49, 0.12);
    color: #D63031;
    border: 1px solid rgba(214, 48, 49, 0.25);
}

.output-embed-wrap {
    padding: 12px 14px;
}

.output-embed-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.68rem;
    color: var(--text-muted);
}

.json-output {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--secondary);
    line-height: 1.65;
    white-space: pre;
    overflow-x: auto;
    max-height: 380px;
    overflow-y: auto;
    padding: 8px 0;
}

/* Spec links */
.spec-links-card {
    overflow: hidden;
}

.spec-header {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-muted);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}

.spec-links {
    padding: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.spec-link-chip {
    background: rgba(0, 184, 148, 0.08);
    border: 1px solid rgba(0, 184, 148, 0.2);
    border-radius: 20px;
    padding: 3px 11px;
    font-size: 0.7rem;
    color: var(--primary);
    text-decoration: none;
    cursor: default;
}

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

@media (max-width: 640px) {
    .main {
        padding: 14px;
    }
}