/* Frontend Generation UI - Exonoor Theme */
.frontend-container {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
    overflow-y: auto;
    background: var(--bg-primary);
}

/* Linear-style Input Card */
.fe-linear-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

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

.fe-linear-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.fe-item-count {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-primary);
    padding: 4px 10px;
    border-radius: 12px;
}

.fe-linear-hint {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 16px;
}

.fe-linear-input-wrap {
    position: relative;
}

.fe-linear-input {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
    box-sizing: border-box;
}

.fe-linear-input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.15);
}

.fe-linear-input::placeholder {
    color: var(--text-muted);
}

.fe-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 6px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.fe-suggestion-category {
    padding: 8px 14px 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fe-suggestion-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    transition: background 0.15s;
}

.fe-suggestion-item:hover,
.fe-suggestion-item.focused {
    background: var(--bg-hover);
}

.fe-suggestion-item i {
    font-size: 16px;
    color: var(--accent);
    width: 24px;
    text-align: center;
}

.fe-suggestion-label {
    font-weight: 500;
    color: var(--text-primary);
    min-width: 120px;
}

.fe-suggestion-label strong {
    color: var(--accent);
    font-weight: 600;
}

.fe-suggestion-desc {
    font-size: 12px;
    color: var(--text-muted);
    flex: 1;
}

.fe-suggestion-empty {
    padding: 16px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

.fe-items-list {
    margin-top: 16px;
    max-height: 400px;
    overflow-y: auto;
}

.fe-items-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 32px;
    color: var(--text-muted);
    font-size: 13px;
}

.fe-items-empty i {
    font-size: 32px;
    opacity: 0.5;
}

.fe-items-category {
    padding: 8px 0 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 4px;
}

.fe-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    transition: background 0.15s;
}

.fe-item:hover {
    background: var(--bg-hover);
}

.fe-item i {
    font-size: 16px;
    color: var(--accent);
    width: 24px;
    text-align: center;
}

.fe-item-info {
    flex: 1;
    min-width: 0;
}

.fe-item-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 13px;
}

.fe-item-desc {
    display: block;
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fe-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    opacity: 0;
    transition:
        opacity 0.15s,
        background 0.15s,
        color 0.15s;
}

.fe-item:hover .fe-item-remove {
    opacity: 1;
}

.fe-item-remove:hover {
    background: rgba(244, 33, 46, 0.15);
    color: #f85149;
}

/* Config Card */
.fe-config-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.fe-config-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.fe-path-group {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}

.fe-path-input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 16px;
    border-radius: 8px;
    font-family: 'Plus Jakarta Sans', 'Cascadia Code', monospace;
    font-size: 13px;
    transition: border-color 0.2s;
}

.fe-path-input:focus {
    border-color: var(--accent);
    outline: none;
}

.fe-actions-row {
    display: flex;
    gap: 16px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.fe-btn-generate {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.fe-btn-generate:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.fe-btn-generate:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    filter: grayscale(1);
}

.fe-btn-sync {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid #10b981;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.fe-btn-sync:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.2);
}

/* Console Log */
.fe-console-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fe-console {
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 16px;
    font-family: 'Plus Jakarta Sans', monospace;
    font-size: 12px;
    color: #e6edf3;
    height: 300px;
    overflow-y: auto;
    position: relative;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
}

.fe-console-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    border-bottom: 1px solid #30363d;
    padding-bottom: 8px;
    color: #8b949e;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 10px;
}

.fe-log-line {
    margin-bottom: 4px;
    display: flex;
    gap: 12px;
    line-height: 1.5;
}

.fe-log-time {
    color: #8b949e;
    flex-shrink: 0;
}
.fe-log-msg.success {
    color: #3fb950;
}
.fe-log-msg.error {
    color: #f85149;
}
.fe-log-msg.info {
    color: #58a6ff;
}
.fe-log-msg.warn {
    color: #d29922;
}

/* Artifacts Grid */
.fe-artifacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 8px;
}

.artifact-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color 0.2s;
}

.artifact-card:hover {
    border-color: var(--accent);
}

.artifact-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.artifact-body {
    flex: 1;
    min-width: 0;
}

.artifact-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.artifact-desc {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Spinner */
.fe-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: fe-spin 1s ease-in-out infinite;
}

@keyframes fe-spin {
    to {
        transform: rotate(360deg);
    }
}
